diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-10-23 23:57:36 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-10-23 23:57:36 +0000 |
| commit | ec5a129c62b75f939830c0585780bdedf7c78460 (patch) | |
| tree | 0654ed5b36d884ab90977b51591761add5c4684d /lib/base/ebase.cpp | |
| parent | a367a550862868926f84e845940ce2391be415fd (diff) | |
| download | enigma2-ec5a129c62b75f939830c0585780bdedf7c78460.tar.gz enigma2-ec5a129c62b75f939830c0585780bdedf7c78460.zip | |
fix garbage collection (Modules/gcmodule.c:380: move_unreachable: Assertion
`gc->gc.gc_refs > 0`)
Diffstat (limited to 'lib/base/ebase.cpp')
| -rw-r--r-- | lib/base/ebase.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/base/ebase.cpp b/lib/base/ebase.cpp index 62746f4b..bcfab61c 100644 --- a/lib/base/ebase.cpp +++ b/lib/base/ebase.cpp @@ -368,16 +368,19 @@ struct eTimerPy static int eTimerPy_traverse(eTimerPy *self, visitproc visit, void *arg) { - PyObject *obj = self->tm->timeout.get(); - Py_VISIT(obj); + PyObject *obj = self->tm->timeout.get(true); + if (obj) { + Py_VISIT(obj); + } return 0; } static int eTimerPy_clear(eTimerPy *self) { - PyObject *obj = self->tm->timeout.get(); - Py_CLEAR(obj); + PyObject *obj = self->tm->timeout.get(true); + if (obj) + Py_CLEAR(obj); return 0; } @@ -572,16 +575,18 @@ struct eSocketNotifierPy static int eSocketNotifierPy_traverse(eSocketNotifierPy *self, visitproc visit, void *arg) { - PyObject *obj = self->sn->activated.get(); - Py_VISIT(obj); + PyObject *obj = self->sn->activated.get(true); + if (obj) + Py_VISIT(obj); return 0; } static int eSocketNotifierPy_clear(eSocketNotifierPy *self) { - PyObject *obj = self->sn->activated.get(); - Py_CLEAR(obj); + PyObject *obj = self->sn->activated.get(true); + if (obj) + Py_CLEAR(obj); return 0; } |
