Skip to content

Commit

Permalink
Python 3.13: Replace deprecated PyEval_CallObject()
Browse files Browse the repository at this point in the history
The function has been deprecated since Python 3.9 and will be removed
from Python 3.13.

See: https://docs.python.org/3.13/whatsnew/3.13.html#id9
  • Loading branch information
penguinpee authored and malaterre committed Apr 22, 2024
1 parent 6c44530 commit 1b6207d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Wrapping/Python/gdcmswig.i
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ static bool callback_helper(gdcm::DataSet const & ds1, gdcm::DataSet const & ds2
/* fail */
assert(0);
}
result = PyEval_CallObject(func, arglist);
result = PyObject_CallObject(func, arglist);
Py_DECREF(arglist);
if (result && result != Py_None) {
PyErr_SetString(PyExc_TypeError,
Expand Down
2 changes: 1 addition & 1 deletion Wrapping/SWIGCommon/gdcmcommon.i
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static bool callback_helper(gdcm::DataSet const & ds1, gdcm::DataSet const & ds2
/* fail */
assert(0);
}
result = PyEval_CallObject(func, arglist);
result = PyObject_CallObject(func, arglist);
Py_DECREF(arglist);
if (result && result != Py_None) {
PyErr_SetString(PyExc_TypeError,
Expand Down

0 comments on commit 1b6207d

Please sign in to comment.