X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/31688e1b8f028059a700a92a8276c97928abd260..4bc08995411e21f3564f09e136809be68ddf96a8:/lib/python/enigma_python.i diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index b84dbd14..8e55b74f 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -33,6 +33,11 @@ is usually caused by not marking PSignals as immutable. */ +%define RefCount(...) +%typemap(newfree) __VA_ARGS__ * { eDebug("adding ref"); $1->AddRef(); } +%extend __VA_ARGS__ { ~__VA_ARGS__() { eDebug("removing ref!"); self->Release(); } } +%ignore __VA_ARGS__::~__VA_ARGS__(); +%enddef %module enigma %{ @@ -53,12 +58,15 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include extern void runMainloop(); extern PSignal1 &keyPressedSignal(); %} +RefCount(eListboxPythonStringContent) + #define DEBUG %include "stl.i" %include @@ -83,6 +91,7 @@ extern PSignal1 &keyPressedSignal(); %include %include %include +%include template class PSignal0 {