seg. fault with Py_BuildValue?
Christian Heimes
lists at cheimes.de
Thu May 29 10:31:03 EDT 2008
Christian Meesters schrieb:
> Hi
>
> I'm having trouble with Py_BuildValue. I was able to pinpoint the following
> statement as the one causing a seg. fault with my script:
>
> static PyObject * funcname(PyObject *self, PyObject *args) {
> ....
> return Py_BuildValue("(OO)", x, y);
> }
> where x & y are both of type PyObject.
>
> Any suggestions here? Do I need to handle the output of Py_BuildValue
> somehow before returning? How? Need to decref x & y before returning?
Check if either x or y are NULL.
Christian
More information about the Python-list
mailing list