From b0be45b239043cd776ed888e0aff54866af913c5 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Thu, 4 Apr 2024 10:31:56 +0200 Subject: signature: Fix an old refcounting bug This bug was a long existing oversight since 2018-10-14 ! amends 2533dab013455bf94da2d4766e54abaf4d735e1e This bug has been hiding undetected for a really long time between innocent lines of code since version 5.15. But now someone has finally uncovered it and it will be brought to justice. Actually, I should be ashamed of myself. Thanks to Joris van Rantwijk for finding this glitch. Change-Id: Id86db1caea8c18c3a2d4d1707c0101fe8aa3d6d8 Task-number: PYSIDE-795 Fixes: PYSIDE-2660 Pick-to: 6.5 Reviewed-by: Friedemann Kleint (cherry picked from commit f89113e21645b5076d47b656140f0ceecf35fa09) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 8b302d296a58cba9a43c93aca06fad4526a7d13e) --- sources/shiboken6/libshiboken/signature/signature_extend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/shiboken6/libshiboken/signature/signature_extend.cpp b/sources/shiboken6/libshiboken/signature/signature_extend.cpp index ca560d00f..7292f8216 100644 --- a/sources/shiboken6/libshiboken/signature/signature_extend.cpp +++ b/sources/shiboken6/libshiboken/signature/signature_extend.cpp @@ -77,7 +77,7 @@ PyObject *pyside_md_get___signature__(PyObject *ob_md, PyObject *modifier) { AutoDecRef func(name_key_to_func(ob_md)); if (func.object() == Py_None) - return Py_None; + Py_RETURN_NONE; if (func.isNull()) Py_FatalError("missing mapping in MethodDescriptor"); return pyside_cf_get___signature__(func, modifier); -- cgit v1.2.3