embedding python in C, working but with exception at the end

Fredrik Lundh fredrik at pythonware.com
Sat Sep 3 16:45:57 CEST 2005


brobigi at yahoo.com wrote:

> Program crashes at line Py_Finalize(). Program tries to read some
>memory location and suffer run time exception.

PyTuple_SetItem "steals" a reference, so changing

    Py_XDECREF(stringarg);
    Py_XDECREF(args);

to just

    Py_XDECREF(args);

might fix the problem.

</F> 






More information about the Python-list mailing list