git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main/Makefile.am: support to extract version information from (git) tarballs created...
[enigma2.git]
/
lib
/
python
/
connections.h
diff --git
a/lib/python/connections.h
b/lib/python/connections.h
index ab123137db9a2ec6fc6d5538946e47fe210cd35c..ad76198a7ca1d35e29826a2f98a434288fb333ff 100644
(file)
--- a/
lib/python/connections.h
+++ b/
lib/python/connections.h
@@
-14,12
+14,14
@@
class PSignal
{
protected:
ePyObject m_list;
{
protected:
ePyObject m_list;
- bool *m_destroyed;
public:
PSignal();
~PSignal();
void callPython(SWIG_PYOBJECT(ePyObject) tuple);
public:
PSignal();
~PSignal();
void callPython(SWIG_PYOBJECT(ePyObject) tuple);
- PyObject *get(bool steal=false);
+#ifndef SWIG
+ PyObject *getSteal(bool clear=false);
+#endif
+ PyObject *get();
};
inline PyObject *PyFrom(int v)
};
inline PyObject *PyFrom(int v)
@@
-38,18
+40,13
@@
class PSignal0: public PSignal, public Signal0<R>
public:
R operator()()
{
public:
R operator()()
{
- bool destroyed=false;
- m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(0);
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
if (m_list)
{
PyObject *pArgs = PyTuple_New(0);
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- if (!destroyed) {
- m_destroyed = 0;
- return Signal0<R>::operator()();
- }
+ return Signal0<R>::operator()();
}
};
}
};
@@
-59,8
+56,6
@@
class PSignal1: public PSignal, public Signal1<R,V0>
public:
R operator()(V0 a0)
{
public:
R operator()(V0 a0)
{
- bool destroyed=false;
- m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(1);
if (m_list)
{
PyObject *pArgs = PyTuple_New(1);
@@
-68,10
+63,7
@@
public:
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- if (!destroyed) {
- m_destroyed = 0;
- return Signal1<R,V0>::operator()(a0);
- }
+ return Signal1<R,V0>::operator()(a0);
}
};
}
};
@@
-81,8
+73,6
@@
class PSignal2: public PSignal, public Signal2<R,V0,V1>
public:
R operator()(V0 a0, V1 a1)
{
public:
R operator()(V0 a0, V1 a1)
{
- bool destroyed=false;
- m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(2);
if (m_list)
{
PyObject *pArgs = PyTuple_New(2);
@@
-91,10
+81,7
@@
public:
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- if (!destroyed) {
- m_destroyed = 0;
- return Signal2<R,V0,V1>::operator()(a0, a1);
- }
+ return Signal2<R,V0,V1>::operator()(a0, a1);
}
};
}
};