aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-01-29 00:19:00 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-01-29 00:19:00 +0000
commitcd621fe499141885e5a0d8b4e42a0f8a7f41a9ac (patch)
treee9f03b14359517e117726500cf71c3e3d34789a9 /lib/python
parent31688e1b8f028059a700a92a8276c97928abd260 (diff)
downloadenigma2-cd621fe499141885e5a0d8b4e42a0f8a7f41a9ac.tar.gz
enigma2-cd621fe499141885e5a0d8b4e42a0f8a7f41a9ac.zip
fixed refcount of eListboxPythonStringContent
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/enigma_python.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i
index b84dbd14..ae15d0d9 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
%{
@@ -59,6 +64,8 @@ extern void runMainloop();
extern PSignal1<void,int> &keyPressedSignal();
%}
+RefCount(eListboxPythonStringContent)
+
#define DEBUG
%include "stl.i"
%include <lib/base/object.h>