diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-01-10 14:23:28 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-01-10 14:23:28 +0000 |
| commit | 9289748ceda0195c346437632be8558587441287 (patch) | |
| tree | e02bb25d4a78f226d0cd6634bb145b97f6af9c46 /lib/python/python.h | |
| parent | 9ef4b143f371d6b1b38a3abebcf38b336e03a583 (diff) | |
| download | enigma2-9289748ceda0195c346437632be8558587441287.tar.gz enigma2-9289748ceda0195c346437632be8558587441287.zip | |
add a dummy class to debug python refcounting (add entrys of TestObj to your tuple or list)
include <lib/python/python.h> and use New_TestObj to create a testobject..
Diffstat (limited to 'lib/python/python.h')
| -rw-r--r-- | lib/python/python.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/python/python.h b/lib/python/python.h index e9a2b8db..46e1a03d 100644 --- a/lib/python/python.h +++ b/lib/python/python.h @@ -2,7 +2,24 @@ #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; @@ -16,8 +33,6 @@ public: void *get() { return m_object; } }; */ -typedef struct _object PyObject; - class ePython { public: @@ -28,5 +43,6 @@ public: static PyObject *resolve(const std::string &pythonfile, const std::string &funcname); private: }; +#endif // SWIG #endif |
