From 9289748ceda0195c346437632be8558587441287 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 10 Jan 2006 14:23:28 +0000 Subject: add a dummy class to debug python refcounting (add entrys of TestObj to your tuple or list) include and use New_TestObj to create a testobject.. --- 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 16ca40cf..5a6f126e 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -79,6 +79,7 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include extern void runMainloop(); extern void quitMainloop(int exit_code); @@ -182,6 +183,7 @@ typedef long time_t; %include %include %include +%include /************** eptr **************/ %template(eActionMapPtr) ePtr; @@ -243,4 +245,9 @@ RESULT SwigFromPython(ePtr &result, PyObject *obj) result = *res; return 0; } +PyObject *New_TestObj() +{ + TestObj *result = (TestObj *)new TestObj(); + return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_TestObj, 1); +} %} -- cgit v1.2.3