X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/7c12c1089cfbee5b0a390d5f3de37f85de210263..9289748ceda0195c346437632be8558587441287:/lib/python/python.h diff --git a/lib/python/python.h b/lib/python/python.h index 94359176..46e1a03d 100644 --- a/lib/python/python.h +++ b/lib/python/python.h @@ -2,7 +2,24 @@ #define __lib_python_python_h #include +#include +typedef struct _object PyObject; + +// useable for debugging python refcounting + +extern PyObject *New_TestObj(); + +class TestObj +{ +DECLARE_REF(TestObj); +public: + TestObj(); + ~TestObj(); +}; +TEMPLATE_TYPEDEF(ePtr, TestObjPtr); + +#ifndef SWIG /* class ePyObject { void *m_object; @@ -16,17 +33,16 @@ public: void *get() { return m_object; } }; */ -typedef struct _object PyObject; - class ePython { public: ePython(); ~ePython(); int execute(const std::string &pythonfile, const std::string &funcname); - static void call(PyObject *pFunc, PyObject *args); + static int call(PyObject *pFunc, PyObject *args); static PyObject *resolve(const std::string &pythonfile, const std::string &funcname); private: }; +#endif // SWIG #endif