]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Always use PyObject_Call as suggested by Jan Kolarik
authorMichael Schroeder <mls@suse.de>
Tue, 13 Feb 2024 15:33:48 +0000 (16:33 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 13 Feb 2024 15:33:48 +0000 (16:33 +0100)
PyObject_Call is available since python 2.2

bindings/solv.i

index 372c862a66a8e6703e48a7d602d0950e6d61c11f..16333059dd13b7045698f628d56d498833b3449f 100644 (file)
@@ -1729,11 +1729,7 @@ 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;