From cd621fe499141885e5a0d8b4e42a0f8a7f41a9ac Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 29 Jan 2005 00:19:00 +0000 Subject: fixed refcount of eListboxPythonStringContent --- lib/python/enigma_python.i | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/python/enigma_python.i') 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 &keyPressedSignal(); %} +RefCount(eListboxPythonStringContent) + #define DEBUG %include "stl.i" %include -- cgit v1.2.3