diff options
| author | Mladen Horvat <acid-burn@opendreambox.org> | 2011-04-13 16:17:43 +0200 |
|---|---|---|
| committer | Mladen Horvat <acid-burn@opendreambox.org> | 2011-04-13 16:17:43 +0200 |
| commit | 8a21c8eebc037850431ac627061e46e48e93a0ec (patch) | |
| tree | 16ea09f5e26546a98106bbf044575894037aa6e5 /lib/python/connections.h | |
| parent | c3c412e8765520205b7cf8413ddf8abca74f1bc3 (diff) | |
| parent | 348cf0e4d7fa1e615635984c9325fc0e8fa4e72b (diff) | |
| download | enigma2-8a21c8eebc037850431ac627061e46e48e93a0ec.tar.gz enigma2-8a21c8eebc037850431ac627061e46e48e93a0ec.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2 into acid-burn/network_changes_next
Diffstat (limited to 'lib/python/connections.h')
| -rw-r--r-- | lib/python/connections.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/python/connections.h b/lib/python/connections.h index b4cd1c79..374749ab 100644 --- a/lib/python/connections.h +++ b/lib/python/connections.h @@ -80,4 +80,23 @@ public: } }; +template <class R, class V0, class V1, class V2> +class PSignal3: public PSignal, public Signal3<R,V0,V1,V2> +{ +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<R,V0,V1,V2>::operator()(a0, a1, a2); + } +}; + #endif |
