Francois De Serres wrote: > PyGILState_STATE gil = PyGILState_Ensure(); > result = PyEval_CallObject(my_callback, arglist); > PyGILState_Release(gil); > Py_DECREF(arglist); > Py_DECREF(result);
I think this should be: PyGILState_STATE gil = PyGILState_Ensure(); result = PyEval_CallObject(my_callback, arglist); Py_DECREF(arglist); Py_DECREF(result); PyGILState_Release(gil); The DECREFs need to be protected, that is where storage is recycled and such, and you still need Python's data structures to do that kind of work. --Scott David Daniels -- http://mail.python.org/mailman/listinfo/python-list