32 lines
1012 B
Diff
32 lines
1012 B
Diff
From c344a8a370afed66e78db88c2d129f6672dae1e6 Mon Sep 17 00:00:00 2001
|
|
From: Steve Grubb <sgrubb@redhat.com>
|
|
Date: Tue, 24 Oct 2023 11:51:04 -0400
|
|
Subject: [PATCH] Fix deprecated python function
|
|
|
|
Reference:https://github.com/linux-audit/audit-userspace/commit/c344a8a370afed66e78db88c2d129f6672dae1e6
|
|
Conflict:NA
|
|
|
|
---
|
|
bindings/python/auparse_python.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/bindings/python/auparse_python.c b/bindings/python/auparse_python.c
|
|
index 78ef832c..1371ed54 100644
|
|
--- a/bindings/python/auparse_python.c
|
|
+++ b/bindings/python/auparse_python.c
|
|
@@ -290,7 +290,11 @@ static void auparse_callback(auparse_state_t *au,
|
|
if (debug) printf("<< auparse_callback\n");
|
|
arglist = Py_BuildValue("OiO", cb->py_AuParser, cb_event_type,
|
|
cb->user_data);
|
|
+#if PY_MINOR_VERSION >= 13
|
|
+ result = PyObject_CallObject(cb->func, arglist);
|
|
+#else
|
|
result = PyEval_CallObject(cb->func, arglist);
|
|
+#endif
|
|
Py_DECREF(arglist);
|
|
Py_XDECREF(result);
|
|
}
|
|
--
|
|
2.33.0
|
|
|