unpacking Python tuple in C

pjd duraip at extendsys.com
Wed Dec 13 13:21:48 CET 2000


>
> PyArg_ParseTuple(result, "dd",  &double1, &double2)
>

> PyObject* floatFromPy0 = PyTuple_GetItem(result, 0);
>   *double1= PyFloat_AsDouble(floatFromPy0)

I suspect you are passing a pointer to pointer (to a double) in
PyArg_ParseTuple. It should just be a pointer.

cheers
pj


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list