From e07304de86defb8d3a09902b5f9f7593fa9863ac Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Feb 2023 17:29:59 +0000 Subject: [PATCH] Revert "python: fix call of Python handlers of events" This reverts one part of commit 85235aec83 related to reference counts. Py_BuildValue always increments the reference count (when it succeeds) and I could not reproduce the Python 3 problem that was described there. Reviewed-by: Laszlo Ersek --- python/handle.c | 1 - 1 file changed, 1 deletion(-) diff --git a/python/handle.c b/python/handle.c index bf639b578..8eeabe60a 100644 --- a/python/handle.c +++ b/python/handle.c @@ -139,7 +139,6 @@ guestfs_int_py_event_callback_wrapper (guestfs_h *g, goto out; } - Py_INCREF (args); py_r = PyObject_CallObject (py_callback, args); Py_DECREF (args); if (py_r != NULL)