Replace deprecated PyEval_CallObject with PyObject_CallObject

This commit is contained in:
Scott Talbert
2022-01-11 17:35:31 -05:00
parent 77fa6cf8cc
commit 6da0064551
5 changed files with 9 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
// Call the event handler, passing the event object
tuple = PyTuple_New(1);
PyTuple_SET_ITEM(tuple, 0, arg); // steals ref to arg
result = PyEval_CallObject(func, tuple);
result = PyObject_CallObject(func, tuple);
if ( result ) {
Py_DECREF(result); // result is ignored, but we still need to decref it
PyErr_Clear(); // Just in case...