Problems with embedding + extending
Mark Charsley
mark.charsley at REMOVE_THIS.radioscape.com
Thu Dec 5 08:50:00 EST 2002
In article <mailman.1039092975.18806.python-list at python.org>,
aloysio at impa.br (Aloysio Paiva de Figueiredo) wrote:
>
> The following (example) program aborts in the Py_Finalize() call. I
> can't figure out why. Can anyone help me?
> static PyObject *alfa_out(PyObject *self, PyObject *args)
> {
> char *s;
>
> if (!PyArg_ParseTuple(args, "s", &s)) {
> return NULL;
> }
>
> fprintf(stdout, s);
>
> return Py_None;
> }
I'm fairly sure that you need to increment Py_None's reference count
before returning it.
Mark
More information about the Python-list
mailing list