Replace uses of deprecated PyEval_CallObject() with PyObject_Call()

Python 3.9 has deprecated PyEval_CallObject(), replace with a more
modern and documented interface (https://bugs.python.org/issue29548).
This commit is contained in:
Panu Matilainen 2020-10-28 09:09:47 +02:00
parent dd5c0446a3
commit 4821d42abb
1 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ rpmts_SolveCallback(rpmts ts, rpmds ds, const void * data)
args = Py_BuildValue("(OiNNi)", cbInfo->tso,
rpmdsTagN(ds), utf8FromString(rpmdsN(ds)),
utf8FromString(rpmdsEVR(ds)), rpmdsFlags(ds));
result = PyEval_CallObject(cbInfo->cb, args);
result = PyObject_Call(cbInfo->cb, args, NULL);
Py_DECREF(args);
if (!result) {
@ -553,7 +553,7 @@ rpmtsCallback(const void * arg, const rpmCallbackType what,
Py_DECREF(o);
}
result = PyEval_CallObject(cbInfo->cb, args);
result = PyObject_Call(cbInfo->cb, args, NULL);
Py_DECREF(args);
if (!result) {