From: Andreas Monzner Date: Fri, 24 Nov 2006 21:58:23 +0000 (+0000) Subject: remove non working python refcount debugging code X-Git-Tag: 2.6.0~2671 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/d9b91542e07a2296b69141433d863fe8028b148e remove non working python refcount debugging code --- diff --git a/lib/actions/action.h b/lib/actions/action.h index 79c2dd27..560fdbbf 100644 --- a/lib/actions/action.h +++ b/lib/actions/action.h @@ -7,6 +7,7 @@ #include #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#include #include #include #include diff --git a/lib/base/nconfig.cpp b/lib/base/nconfig.cpp index 878f4837..562b3503 100644 --- a/lib/base/nconfig.cpp +++ b/lib/base/nconfig.cpp @@ -1,5 +1,5 @@ #include -#include +#include PyObject *ePythonConfigQuery::m_queryFunc; diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index 9c2849b1..e8394c40 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include int eventData::CacheSize=0; descriptorMap eventData::descriptors; diff --git a/lib/dvb_ci/dvbci_ui.h b/lib/dvb_ci/dvbci_ui.h index 5237e2f4..b06eb454 100644 --- a/lib/dvb_ci/dvbci_ui.h +++ b/lib/dvb_ci/dvbci_ui.h @@ -5,7 +5,7 @@ /* avoid warnigs :) */ #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L -#include +#include #include #define MAX_SLOTS 4 diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index fd2091a1..261c548b 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include /* The basic idea is to have an interface which gives all relevant list diff --git a/lib/nav/core.cpp b/lib/nav/core.cpp index 0b4270d9..7f76fa3f 100644 --- a/lib/nav/core.cpp +++ b/lib/nav/core.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include void eNavigation::serviceEvent(iPlayableService* service, int event) { diff --git a/lib/python/Makefile.am b/lib/python/Makefile.am index e0d5f0cd..1cc01544 100644 --- a/lib/python/Makefile.am +++ b/lib/python/Makefile.am @@ -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 " > bla.cxx - cat enigma_python_wrap.cxx >> bla.cxx - mv bla.cxx enigma_python_wrap.cxx installdir = $(LIBDIR)/enigma2/python diff --git a/lib/python/connections.h b/lib/python/connections.h index 9da6a002..8a06f7fa 100644 --- a/lib/python/connections.h +++ b/lib/python/connections.h @@ -7,6 +7,7 @@ #include #undef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#include #include class PSignal diff --git a/lib/python/python.cpp b/lib/python/python.cpp index 2636a3d5..119bff1c 100644 --- a/lib/python/python.cpp +++ b/lib/python/python.cpp @@ -1,3 +1,4 @@ +#include #include /* 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 - DEFINE_REF(TestObj); TestObj::TestObj() diff --git a/lib/python/python.h b/lib/python/python.h index 27d2a9b1..46e1a03d 100644 --- a/lib/python/python.h +++ b/lib/python/python.h @@ -3,33 +3,10 @@ #include #include -#include -// 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(); diff --git a/lib/service/service.cpp b/lib/service/service.cpp index 181ec22f..8ac7ebd4 100644 --- a/lib/service/service.cpp +++ b/lib/service/service.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include eServiceReference::eServiceReference(const std::string &string) {