aboutsummaryrefslogtreecommitdiff
path: root/lib/base/ebase.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-25 17:18:48 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-11-25 17:18:48 +0000
commit6dcb75c26bbfec04b381bb99d75404f9fe50635d (patch)
treeb4b0e4e7b92c2d6563a848279cb5b48e7e183f96 /lib/base/ebase.cpp
parent26a6141301937e0ef501b4cd7ae61b4f2293b7e5 (diff)
downloadenigma2-6dcb75c26bbfec04b381bb99d75404f9fe50635d.tar.gz
enigma2-6dcb75c26bbfec04b381bb99d75404f9fe50635d.zip
python object refcount debugging code second try
Diffstat (limited to 'lib/base/ebase.cpp')
-rw-r--r--lib/base/ebase.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/base/ebase.cpp b/lib/base/ebase.cpp
index 67e02347..480c8ea8 100644
--- a/lib/base/ebase.cpp
+++ b/lib/base/ebase.cpp
@@ -131,7 +131,7 @@ void eMainloop::removeSocketNotifier(eSocketNotifier *sn)
eFatal("removed socket notifier which is not present");
}
-int eMainloop::processOneEvent(unsigned int user_timeout, PyObject **res, PyObject *additional)
+int eMainloop::processOneEvent(unsigned int user_timeout, PyObject **res, ePyObject additional)
{
int return_reason = 0;
/* get current time */
@@ -222,7 +222,7 @@ int eMainloop::processOneEvent(unsigned int user_timeout, PyObject **res, PyObje
{
if (!*res)
*res = PyList_New(0);
- PyObject *it = PyTuple_New(2);
+ ePyObject it = PyTuple_New(2);
PyTuple_SET_ITEM(it, 0, PyInt_FromLong(pfd[i].fd));
PyTuple_SET_ITEM(it, 1, PyInt_FromLong(pfd[i].revents));
PyList_Append(*res, it);
@@ -272,7 +272,7 @@ void eMainloop::removeTimer(eTimer* e)
m_timer_list.remove(e);
}
-int eMainloop::iterate(unsigned int user_timeout, PyObject **res, PyObject *dict)
+int eMainloop::iterate(unsigned int user_timeout, PyObject **res, ePyObject dict)
{
int ret = 0;
@@ -320,9 +320,9 @@ void eMainloop::reset()
app_quit_now=false;
}
-PyObject *eMainloop::poll(PyObject *timeout, PyObject *dict)
+PyObject *eMainloop::poll(ePyObject timeout, ePyObject dict)
{
- PyObject *res = 0;
+ PyObject *res=0;
if (app_quit_now)
{
@@ -333,11 +333,12 @@ PyObject *eMainloop::poll(PyObject *timeout, PyObject *dict)
int user_timeout = (timeout == Py_None) ? 0 : PyInt_AsLong(timeout);
iterate(user_timeout, &res, dict);
+ ePyObject ret(res);
- if (!res) /* return empty list on timeout */
- res = PyList_New(0);
+ if (!ret) /* return empty list on timeout */
+ return PyList_New(0);
- return res;
+ return ret;
}
void eMainloop::interruptPoll()