X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2Fconnections.h;h=374749abb9505200a3ff7a37745536ac27987c72;hp=b4cd1c7996452d09cdd3700861ce1458130a2129;hb=36cca1d3f31265929ef3443999ab7fd242b4dae5;hpb=be4aa74e26480dc08d7eb4ea2565fc02d0b1e414 diff --git a/lib/python/connections.h b/lib/python/connections.h index b4cd1c7..374749a 100644 --- a/lib/python/connections.h +++ b/lib/python/connections.h @@ -80,4 +80,23 @@ public: } }; +template +class PSignal3: public PSignal, public Signal3 +{ +public: + R operator()(V0 a0, V1 a1, V2 a2) + { + if (m_list) + { + PyObject *pArgs = PyTuple_New(3); + PyTuple_SET_ITEM(pArgs, 0, PyFrom(a0)); + PyTuple_SET_ITEM(pArgs, 1, PyFrom(a1)); + PyTuple_SET_ITEM(pArgs, 2, PyFrom(a2)); + callPython(pArgs); + Org_Py_DECREF(pArgs); + } + return Signal3::operator()(a0, a1, a2); + } +}; + #endif