What are the recommendations for the use of the "object" type versus "PyObject *"? Ondrej pointed out a potential bug in my line_profiler package:
http://github.com/certik/line_profiler/commit/dc3ad198f8a810d34da5da71ffccf01c5e05a161 I have a cdef function that serves as the callback for the PyEval_SetTrace() functionality. It has a PyObject* argument that is sometimes NULL. This argument happens to be unused. In the version of Cython I originally developed line_profile under , no code referenced this argument. In the development version of Cython that Ondrej used to compile line_profiler, a Py_INCREF is apparently generated. When the argument is NULL, this obviously fails. Is this intentional? Should "object" be avoided when the argument could possibly be NULL? Or should the generated code use Py_XINCREF/Py_XDECREF instead to avoid failure? Thanks. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
