PyArg_ParseTuple() & Py_DECREF()

rwgk at my-deja.com rwgk at my-deja.com
Sat Mar 4 00:14:49 CET 2000


Consider the following two lines of source code at the
beginning of a C extension function:

  PyObject *O;
  if (! PyArg_ParseTuple(args, "O", &O)) return NULL;

Is it necessary to call Py_DECREF(O) before leaving the
extension function?

Thanks!
        Ralf


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list