X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/84670d3dc9c9dc29fd3af42b2f25092b3b6c2a09..4bc08995411e21f3564f09e136809be68ddf96a8:/lib/python/enigma_python.i diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index 367d8f8e..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 %{ @@ -51,12 +56,17 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include +#include +#include extern void runMainloop(); extern PSignal1 &keyPressedSignal(); %} +RefCount(eListboxPythonStringContent) + #define DEBUG %include "stl.i" %include @@ -79,6 +89,9 @@ extern PSignal1 &keyPressedSignal(); %include %include %include +%include +%include +%include template class PSignal0 {