- factor out some SWIG macros
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 17 Aug 2005 02:13:50 +0000 (02:13 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 17 Aug 2005 02:13:50 +0000 (02:13 +0000)
lib/base/smartptr.h
lib/python/enigma_python.i
lib/python/swig.h [new file with mode: 0644]

index 7e441ab..f9d224b 100644 (file)
@@ -3,14 +3,7 @@
 
 #include "object.h"
 #include <stdio.h>
-
-#ifdef SWIG
-#define TEMPLATE_TYPEDEF(x, y) \
-%template(y) x; \
-typedef x y
-#else
-#define TEMPLATE_TYPEDEF(x, y) typedef x y
-#endif
+#include <lib/python/swig.h>
 
 template<class T>
 class ePtr
index c2d6261..01ba75b 100644 (file)
@@ -83,6 +83,7 @@ extern PSignal1<void,int> &keyPressedSignal();
 #define DEBUG
 %include "typemaps.i"
 %include "stl.i"
+%include <lib/python/swig.h>
 %include <lib/base/object.h>
 %include <lib/base/eerror.h>
 %include <lib/base/econfig.h>
diff --git a/lib/python/swig.h b/lib/python/swig.h
new file mode 100644 (file)
index 0000000..b5cb77a
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef __lib_python_swig_h
+#define __lib_python_swig_h
+
+#ifdef SWIG
+#define TEMPLATE_TYPEDEF(x, y) \
+%template(y) x; \
+typedef x y
+#else
+#define TEMPLATE_TYPEDEF(x, y) typedef x y
+#endif
+
+#ifdef SWIG
+#define SWIG_INPUT INPUT
+#define SWIG_OUTPUT OUTPUT
+#else
+#define SWIG_INPUT
+#define SWIG_OUTPUT
+#endif
+
+#endif