Skip to content

Commit

Permalink
Replace deprecated PyEval_CallObject will PyObject_Call when build fo…
Browse files Browse the repository at this point in the history
…r python >= 3.0

Fixes issue #551
  • Loading branch information
mlschroe committed Feb 13, 2024
1 parent 600aa2b commit 34b7a4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bindings/solv.i
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,12 @@ returnself(matchsolvable)
SWIGINTERN int loadcallback(Pool *pool, Repodata *data, void *d) {
XRepodata *xd = new_XRepodata(data->repo, data->repodataid);
PyObject *args = Py_BuildValue("(O)", SWIG_NewPointerObj(SWIG_as_voidptr(xd), SWIGTYPE_p_XRepodata, SWIG_POINTER_OWN | 0));
%#if PY_VERSION_HEX >= 0x03000000
PyObject *result = PyObject_Call((PyObject *)d, args, NULL);
%#else
PyObject *result = PyEval_CallObject((PyObject *)d, args);
%#endif

int ecode = 0;
int vresult = 0;
Py_DECREF(args);
Expand Down

0 comments on commit 34b7a4e

Please sign in to comment.