X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ddc3964ed95d01e72229dc9af968a327cd84e56c..d85c75fc186d91f497d5997982db94259b041280:/lib/python/python.h diff --git a/lib/python/python.h b/lib/python/python.h index bde18146..46e1a03d 100644 --- a/lib/python/python.h +++ b/lib/python/python.h @@ -2,6 +2,36 @@ #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; +public: + ePyObject(void *ptr); + ePyObject(ePyObject &p); + ePyObject(); + ePyObject &operator=(ePyObject &p); + ePyObject &operator=(void *p); + ~ePyObject(); + void *get() { return m_object; } +}; */ class ePython { @@ -9,8 +39,10 @@ public: ePython(); ~ePython(); int execute(const std::string &pythonfile, const std::string &funcname); + static int call(PyObject *pFunc, PyObject *args); + static PyObject *resolve(const std::string &pythonfile, const std::string &funcname); private: - }; +#endif // SWIG #endif