]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46449: deepfreeze get_code() now returns strong ref (GH-30987)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Fri, 28 Jan 2022 12:41:13 +0000 (18:11 +0530)
committerGitHub <noreply@github.com>
Fri, 28 Jan 2022 12:41:13 +0000 (13:41 +0100)
Tools/scripts/deepfreeze.py

index db44ba89c671e23d19f4bc1d47126e7093a34dbf..080980f6d0ae5d94c9d73f708949facab9260ef5 100644 (file)
@@ -406,7 +406,7 @@ PyObject *
 _Py_get_%%NAME%%_toplevel(void)
 {
     %%NAME%%_do_patchups();
-    return (PyObject *) &%%NAME%%_toplevel;
+    return Py_NewRef((PyObject *) &%%NAME%%_toplevel);
 }
 """