Strange problem with C API

John Machin sjmachin at lexicon.net
Tue Feb 26 17:09:50 EST 2002


amrit040 at yahoo.com (Amrit) wrote in message news:<71c0a06e.0202260513.4b67841f at posting.google.com>...
>   /*  Make the output tuple */
>   retvec=(PyObject *) malloc(2*sizeof(PyObject));
>   retvec=Py_BuildValue("(ff)",min,max);
>   return(retvec);

An afterthought:

You should lose the malloc() -- not only pointless (some compilers
would even give you a warning like 'retvec is assigned a value which
is not used') but also leaks memory.



More information about the Python-list mailing list