include <lib/python/python.h> and use New_TestObj to create a testobject..
#include <lib/driver/etimezone.h>
#include <lib/gdi/lcd.h>
#include <lib/dvb_ci/dvbci_ui.h>
#include <lib/driver/etimezone.h>
#include <lib/gdi/lcd.h>
#include <lib/dvb_ci/dvbci_ui.h>
+#include <lib/python/python.h>
extern void runMainloop();
extern void quitMainloop(int exit_code);
extern void runMainloop();
extern void quitMainloop(int exit_code);
%include <lib/gdi/lcd.h>
%include <lib/dvb_ci/dvbci_ui.h>
%include <lib/dvb/db.h>
%include <lib/gdi/lcd.h>
%include <lib/dvb_ci/dvbci_ui.h>
%include <lib/dvb/db.h>
+%include <lib/python/python.h>
/************** eptr **************/
%template(eActionMapPtr) ePtr<eActionMap>;
/************** eptr **************/
%template(eActionMapPtr) ePtr<eActionMap>;
result = *res;
return 0;
}
result = *res;
return 0;
}
+PyObject *New_TestObj()
+{
+ TestObj *result = (TestObj *)new TestObj();
+ return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_TestObj, 1);
+}
extern "C" void init_enigma();
extern "C" void init_enigma();
+DEFINE_REF(TestObj);
+
+TestObj::TestObj()
+{
+ eDebug("create %p", this);
+}
+
+TestObj::~TestObj()
+{
+ eDebug("destroy %p", this);
+}
+
#if 0
ePyObject::ePyObject(void *ptr): m_object(ptr)
{
#if 0
ePyObject::ePyObject(void *ptr): m_object(ptr)
{
#define __lib_python_python_h
#include <string>
#define __lib_python_python_h
#include <string>
+#include <lib/base/object.h>
+typedef struct _object PyObject;
+
+// useable for debugging python refcounting
+
+extern PyObject *New_TestObj();
+
+class TestObj
+{
+DECLARE_REF(TestObj);
+public:
+ TestObj();
+ ~TestObj();
+};
+TEMPLATE_TYPEDEF(ePtr<TestObj>, TestObjPtr);
+
+#ifndef SWIG
/* class ePyObject
{
void *m_object;
/* class ePyObject
{
void *m_object;
void *get() { return m_object; }
}; */
void *get() { return m_object; }
}; */
-typedef struct _object PyObject;
-
static PyObject *resolve(const std::string &pythonfile, const std::string &funcname);
private:
};
static PyObject *resolve(const std::string &pythonfile, const std::string &funcname);
private:
};