aboutsummaryrefslogtreecommitdiff
path: root/lib/python/python.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/python.h')
-rw-r--r--lib/python/python.h20
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