(Solution) Re: Problem with embedding - can only make about 150 calls...
Mads Bondo Dydensborg
madsdyd at challenge.dk
Sun Oct 7 14:42:30 EDT 2001
On Sun, 7 Oct 2001, Skip Montanaro wrote:
>
> 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.
Yes, I understand this now. Boy do I feel silly.
Mads
--
Mads Bondo Dydensborg. madsdyd at challenge.dk
You know you're a Linux geek when...
You can reconstruct your fstab from scratch, and not even think about it.
- segfault
More information about the Python-list
mailing list