Dan S wrote: > But as you can see, my C code doesn't perform any malloc() or > suchlike, so I'm stumped. > > I'd be grateful for any further thoughts Could it be your memory leak is in:
return PyFloat_FromDouble(3.1415927); // temporary You are creating a "python float object" from something. What if you return Py_None instead of your float?: Py_INCREF(Py_None); return PyNone; I do not know if it will help you but I guess it falls in the "any further thought" category :-) Best regards, Armando _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion