PYTHONINC=/usr/include/python2.5
python ../../cython.py refnanny.pyx
-gcc -shared -pthread -fPIC -fwrapv -O2 -Wall \
+gcc -shared -pthread -fPIC -fwrapv -g -Wall \
-fno-strict-aliasing -I$PYTHONINC \
-o refnanny.so -I. refnanny.c
-from python_ref cimport Py_INCREF, Py_DECREF
+from python_ref cimport Py_INCREF, Py_DECREF, Py_XDECREF
cimport python_exc as exc
msg += "\n Acquired on lines: " + ", ".join(["%d" % x for x in linenos])
self.errors.append("References leaked: %s" % msg)
if self.errors:
- raise RefnannyException("\n".join(self.errors))
+ print self.errors
+# raise RefnannyException("\n".join(self.errors))
cdef public void* __Pyx_Refnanny_NewContext(char* funcname, int lineno) except NULL:
ctx = RefnannyContext()
Py_DECREF(obj)
cdef public int __Pyx_Refnanny_FinishContext(void* ctx) except -1:
- cdef exc.PyObject* type, *value, *tb
- if exc.PyErr_Occurred():
- exc.PyErr_Fetch(&type, &value, &tb)
- Py_DECREF(<object>type); Py_DECREF(<object>value); Py_DECREF(<object>tb)
- print "cleared!"
- print (exc.PyErr_Occurred() == NULL)
+# cdef exc.PyObject* type, *value, *tb
+## if exc.PyErr_Occurred():
+## exc.PyErr_Fetch(&type, &value, &tb)
+## Py_XDECREF(<object>type); Py_XDECREF(<object>value); Py_XDECREF(<object>tb)
+## print "cleared!"
+## print (exc.PyErr_Occurred() == NULL)
obj = <object>ctx
try:
obj.end()