(Solution) Re: Problem with embedding - can only make about 150 calls...
Skip Montanaro
skip at pobox.com
Sun Oct 7 14:38:31 EDT 2001
Mads> I found a solution
>> static PyObject * MyTest(PyObject * self, PyObject *args) {
>> return Py_None;
Mads> return Py_BuildValue("");
>> }
One problem with your Py_None return is that you didn't Py_INCREF it first.
Over time Py_None's refcount may well have dropped to zero. Blammo!
Py_BuildValue("") returns an INCREF'd object.
--
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/
More information about the Python-list
mailing list