summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-08-29 17:23:08 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2022-08-29 17:23:35 +0200
commit43e3b41defefc4ecfbecc099692ba97d1c5b2e97 (patch)
treea696eb3c3a67d641f2a7a195ae2d393834e629e8 /python
parent5eca7fb65b7337409a02f9f94fde608edf7d1b0a (diff)
downloadlibxslt-43e3b41defefc4ecfbecc099692ba97d1c5b2e97.tar.gz
Migrate from PyEval_ to PyObject_
PyEval_ functions are deprecated.
Diffstat (limited to 'python')
-rw-r--r--python/libxslt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/libxslt.c b/python/libxslt.c
index 0758d606..0e2786ce 100644
--- a/python/libxslt.c
+++ b/python/libxslt.c
@@ -299,7 +299,7 @@ libxslt_xsltElementPreCompCallback(xsltStylesheetPtr style, xmlNodePtr inst,
pyobj_element_f);
Py_INCREF(pyobj_precomp_f); /* Protect refcount against reentrant manipulation of callback hash */
- result = PyEval_CallObject(pyobj_precomp_f, args);
+ result = PyObject_CallObject(pyobj_precomp_f, args);
Py_DECREF(pyobj_precomp_f);
Py_DECREF(args);
@@ -357,7 +357,7 @@ libxslt_xsltElementTransformCallback(xsltTransformContextPtr ctxt,
libxslt_xsltElemPreCompPtrWrap(comp));
Py_INCREF(func); /* Protect refcount against reentrant manipulation of callback hash */
- result = PyEval_CallObject(func, args);
+ result = PyObject_CallObject(func, args);
Py_DECREF(func);
Py_DECREF(args);
@@ -468,7 +468,7 @@ libxslt_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs) {
}
Py_INCREF(current_function);
- result = PyEval_CallObject(current_function, list);
+ result = PyObject_CallObject(current_function, list);
Py_DECREF(current_function);
Py_DECREF(list);
@@ -961,7 +961,7 @@ libxslt_xsltErrorFuncHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg,
Py_XINCREF(libxslt_xsltPythonErrorFuncCtxt);
message = libxml_charPtrWrap(str);
PyTuple_SetItem(list, 1, message);
- result = PyEval_CallObject(libxslt_xsltPythonErrorFuncHandler, list);
+ result = PyObject_CallObject(libxslt_xsltPythonErrorFuncHandler, list);
Py_XDECREF(list);
Py_XDECREF(result);
}