Commits

Robert Kern committed 2fa093b

BUG: object cannot be used for arguments that may be NULL. Newer versions of Cython will create Py_INCREFs that will segfault. Thanks to Ondrej Certik for identifying the bug and the fix.

Comments (0)

Files changed (1)

 
 
 cdef extern from "frameobject.h":
-    ctypedef int (*Py_tracefunc)(object self, PyFrameObject *py_frame, int what, object arg)
+    ctypedef int (*Py_tracefunc)(object self, PyFrameObject *py_frame, int what, PyObject *arg)
 
 cdef extern from "Python.h":
     ctypedef long long PY_LONG_LONG
 
 
 cdef int python_trace_callback(object self, PyFrameObject *py_frame, int what,
-    object arg):
+    PyObject *arg):
     """ The PyEval_SetTrace() callback.
     """
     cdef object code, line_entries, key