From 851f33df9606402c901bbf301afb41d4435184b7 Mon Sep 17 00:00:00 2001 From: Michal Ambroz <723625+xambroz@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:20:21 +0200 Subject: [PATCH] Python 3.13 compatibility Use PyObject instead of PyEval for python 3.13 compatibility --- swig/openscap.i | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/swig/openscap.i b/swig/openscap.i index 9ba869c547..7970481f00 100644 --- a/swig/openscap.i +++ b/swig/openscap.i @@ -318,7 +318,7 @@ int rule_result_output_callback_wrapper(struct xccdf_rule_result* rule_result, v PyGILState_Release(state); return 1; } - result = PyEval_CallObject(func,arglist); + result = PyObject_CallObject(func,arglist); if (result == NULL) { if (PyErr_Occurred() != NULL) PyErr_PrintEx(0); @@ -355,7 +355,7 @@ int rule_start_callback_wrapper(struct xccdf_rule* rule, void *arg) PyGILState_Release(state); return 1; } - result = PyEval_CallObject(func,arglist); + result = PyObject_CallObject(func,arglist); if (result == NULL) { if (PyErr_Occurred() != NULL) PyErr_PrintEx(0); @@ -392,7 +392,7 @@ int agent_reporter_callback_wrapper(const struct oval_result_definition* res_def PyGILState_Release(state); return 1; } - result = PyEval_CallObject(func,arglist); + result = PyObject_CallObject(func,arglist); if (result == NULL) { if (PyErr_Occurred() != NULL) PyErr_PrintEx(0); @@ -427,7 +427,7 @@ int validate_callback_wrapper(const char* file, int line, const char* msg, void PyGILState_Release(state); return 1; } - result = PyEval_CallObject(func,arglist); + result = PyObject_CallObject(func,arglist); if (result == NULL) { if (PyErr_Occurred() != NULL) PyErr_PrintEx(0); @@ -463,7 +463,7 @@ char * sub_callback_wrapper(xccdf_subst_type_t type, const char *id, void *arg) PyGILState_Release(state); return NULL; } - result = PyEval_CallObject(func, arglist); + result = PyObject_CallObject(func, arglist); if (result == NULL) { if (PyErr_Occurred() != NULL) PyErr_PrintEx(0);