Hi, I have two problems using the C/API to write a C dll, the first and serious: 1) The Scenario (pLocal, pGlobal are not changed by the dll during one "init-> fini" cycle) - Py_Initialize() - PyRun_String("x=1", Py_single_input, pGlobal, pLocal) - PyRun_String("x:=1", Py_eval_input, pGlobal, pLocal) -> returns -1; Hint: if the string contains a valid statement ("x==1") there is no exception at finalize - Py_Finalize() ---> access violation At the Py_Finalize an access violation appears. As I'm having trouble building python by myself I have no debug version available to see whats goin' on in the finalize(). Of course it is an invalid statement, but an access violation is still not nice. the 2nd) In Py_DECREF in the case the variable will be deleted, it would be helpful to set the variable to NULL. Otherwise I have to check it (ob_refcnt) in my code as well. If the API is used in an invalid way, please tell how the right way is. Kind Regards, Matthias --
|
_______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com