remove non working python refcount debugging code
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 24 Nov 2006 21:58:23 +0000 (21:58 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 24 Nov 2006 21:58:23 +0000 (21:58 +0000)
lib/actions/action.h
lib/base/nconfig.cpp
lib/dvb/epgcache.cpp
lib/dvb_ci/dvbci_ui.h
lib/gui/elistboxcontent.cpp
lib/nav/core.cpp
lib/python/Makefile.am
lib/python/connections.h
lib/python/python.cpp
lib/python/python.h
lib/service/service.cpp

index 79c2dd2..560fdbb 100644 (file)
@@ -7,6 +7,7 @@
 #include <features.h>
 #undef _POSIX_C_SOURCE
 #define _POSIX_C_SOURCE 200112L
+#include <Python.h>
 #include <lib/python/python.h>
 #include <string>
 #include <map>
index 878f483..562b350 100644 (file)
@@ -1,5 +1,5 @@
 #include <lib/base/nconfig.h>
-#include <lib/python/python.h>
+#include <Python.h>
 
 PyObject *ePythonConfigQuery::m_queryFunc;
 
index 9c2849b..e8394c4 100644 (file)
@@ -14,7 +14,7 @@
 #include <lib/base/eerror.h>
 #include <lib/dvb/pmt.h>
 #include <lib/dvb/db.h>
-#include <lib/python/python.h>
+#include <Python.h>
 
 int eventData::CacheSize=0;
 descriptorMap eventData::descriptors;
index 5237e2f..b06eb45 100644 (file)
@@ -5,7 +5,7 @@
                 /* avoid warnigs :) */
 #undef _POSIX_C_SOURCE
 #define _POSIX_C_SOURCE 200112L
-#include <lib/python/python.h>
+#include <Python.h>
 #include <lib/python/connections.h>
 
 #define MAX_SLOTS 4
index fd2091a..261c548 100644 (file)
@@ -1,7 +1,7 @@
 #include <lib/gui/elistbox.h>
 #include <lib/gui/elistboxcontent.h>
 #include <lib/gdi/font.h>
-#include <lib/python/python.h>
+#include <Python.h>
 
 /*
     The basic idea is to have an interface which gives all relevant list
index 0b4270d..7f76fa3 100644 (file)
@@ -1,6 +1,6 @@
 #include <lib/nav/core.h>
 #include <lib/base/eerror.h>
-#include <lib/python/python.h>
+#include <Python.h>
 
 void eNavigation::serviceEvent(iPlayableService* service, int event)
 {
index e0d5f0c..1cc0154 100644 (file)
@@ -11,9 +11,6 @@ libenigma_python_a_SOURCES = \
 
 enigma_python_wrap.cxx: enigma_python.i
        swig -I$(top_srcdir)/ -c++ -python enigma_python.i
-       echo "#include <lib/python/python.h>" > bla.cxx
-       cat enigma_python_wrap.cxx >> bla.cxx
-       mv bla.cxx enigma_python_wrap.cxx
 
 installdir = $(LIBDIR)/enigma2/python
 
index 9da6a00..8a06f7f 100644 (file)
@@ -7,6 +7,7 @@
 #include <features.h>
 #undef _POSIX_C_SOURCE
 #define _POSIX_C_SOURCE 200112L
+#include <Python.h>
 #include <lib/python/python.h>
 
 class PSignal
index 2636a3d..119bff1 100644 (file)
@@ -1,3 +1,4 @@
+#include <lib/python/python.h>
 #include <lib/base/eerror.h>
                 /* avoid warnigs :) */
 #undef _POSIX_C_SOURCE
@@ -7,44 +8,6 @@
 extern "C" void init_enigma();
 extern void bsodFatal();
 
-void Impl_Py_DECREF(const char* file, int line, PyObject *obj)
-{
-       if (!obj)
-       {
-               eDebug("decref python object null pointer %s %d!!!",
-                       file, line);
-               bsodFatal();
-       }
-       if (obj->ob_refcnt <= 0)
-       {
-               eDebug("decref python object with refcounting value %d (%s %d)!!!", obj->ob_refcnt, file, line);
-               bsodFatal();
-       }
-       Py_DECREF(obj);
-}
-
-void Impl_Py_INCREF(const char* file, int line, PyObject *obj)
-{
-       if (!obj)
-       {
-               eDebug("incref python object null pointer %s %d!!!", file, line);
-               bsodFatal();
-       }
-       if (obj->ob_refcnt <= 0)
-       {
-               eDebug("incref python object with refcounting value %d (%s %d)!!!", obj->ob_refcnt, file, line);
-               bsodFatal();
-       }
-       if (obj->ob_refcnt == 0x7FFFFFFF)
-       {
-               eDebug("incref python object with refcounting value %d (MAX_INT!!!) (%s %d)!!!", obj->ob_refcnt, file, line);
-               bsodFatal();
-       }
-       Py_INCREF(obj);
-}
-
-#include <lib/python/python.h>
-
 DEFINE_REF(TestObj);
 
 TestObj::TestObj()
index 27d2a9b..46e1a03 100644 (file)
@@ -3,33 +3,10 @@
 
 #include <string>
 #include <lib/base/object.h>
-#include <Python.h>
 
-// useable for debugging python refcounting
-#undef Py_DECREF
-#undef Py_XDECREF
-#undef Py_INCREF
-#undef Py_XINCREF
-#define Py_XDECREF(obj) Impl_Py_XDECREF(__FILE__, __LINE__, obj)
-#define Py_DECREF(obj) Impl_Py_DECREF(__FILE__, __LINE__, obj)
-#define Py_XINCREF(obj) Impl_Py_XINCREF(__FILE__, __LINE__, obj)
-#define Py_INCREF(obj) Impl_Py_INCREF(__FILE__, __LINE__, obj)
-
-void Impl_Py_DECREF(const char* file, int line, PyObject *obj);
-
-inline void Impl_Py_XDECREF(const char* file, int line, PyObject *obj)
-{
-       if (obj)
-               Impl_Py_DECREF(file, line, obj);
-}
+typedef struct _object PyObject;
 
-void Impl_Py_INCREF(const char* file, int line, PyObject *obj);
-
-inline void Impl_Py_XINCREF(const char* file, int line, PyObject *obj)
-{
-       if (obj)
-               Impl_Py_INCREF(file, line, obj);
-}
+// useable for debugging python refcounting
 
 extern PyObject *New_TestObj();
 
index 181ec22..8ac7ebd 100644 (file)
@@ -4,7 +4,7 @@
 #include <lib/service/service.h>
 #include <lib/base/init_num.h>
 #include <lib/base/init.h>
-#include <lib/python/python.h>
+#include <Python.h>
 
 eServiceReference::eServiceReference(const std::string &string)
 {