{
protected:
ePyObject m_list;
+ bool *m_destroyed;
public:
PSignal();
~PSignal();
public:
R operator()()
{
+ bool destroyed=false;
+ m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(0);
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- return Signal0<R>::operator()();
+ if (!destroyed) {
+ m_destroyed = 0;
+ return Signal0<R>::operator()();
+ }
}
};
public:
R operator()(V0 a0)
{
+ bool destroyed=false;
+ m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(1);
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- return Signal1<R,V0>::operator()(a0);
+ if (!destroyed) {
+ m_destroyed = 0;
+ return Signal1<R,V0>::operator()(a0);
+ }
}
};
public:
R operator()(V0 a0, V1 a1)
{
+ bool destroyed=false;
+ m_destroyed = &destroyed;
if (m_list)
{
PyObject *pArgs = PyTuple_New(2);
callPython(pArgs);
Org_Py_DECREF(pArgs);
}
- return Signal2<R,V0,V1>::operator()(a0, a1);
+ if (!destroyed) {
+ m_destroyed = 0;
+ return Signal2<R,V0,V1>::operator()(a0, a1);
+ }
}
};