pyke/, ...: Extract utilities into a sort-of reusable library.
[catacomb-python] / pgen.c
diff --git a/pgen.c b/pgen.c
index 98daa73..58f6845 100644 (file)
--- a/pgen.c
+++ b/pgen.c
@@ -406,8 +406,7 @@ static void pgevent_kill(PyObject *me)
 static void pgevent_pydealloc(PyObject *me)
 {
   pgevent_pyobj *ev = (pgevent_pyobj *)me;
-  if (ev->r) Py_DECREF(ev->r);
-  FREEOBJ(me);
+  Py_XDECREF(ev->r); FREEOBJ(me);
 }
 
 #define PGEVENT_CHECK(me) do {                                         \