32 lines
1009 B
Diff
32 lines
1009 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 1ba59cf..bdcf816 100644
|
|
--- a/bindings/python/auparse_python.c
|
|
+++ b/bindings/python/auparse_python.c
|
|
@@ -291,7 +291,11 @@ static void auparse_callback(auparse_state_t *au, auparse_cb_event_t cb_event_ty
|
|
PyObject *result;
|
|
|
|
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.43.0
|
|
|