Skip to content

Commit

Permalink
bpo-46449: deepfreeze get_code() now returns strong ref (GH-30987)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Jan 28, 2022
1 parent 44afdbd commit 5a9e423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/scripts/deepfreeze.py
Expand Up @@ -406,7 +406,7 @@ def generate(self, name: str, obj: object) -> str:
_Py_get_%%NAME%%_toplevel(void)
{
%%NAME%%_do_patchups();
return (PyObject *) &%%NAME%%_toplevel;
return Py_NewRef((PyObject *) &%%NAME%%_toplevel);
}
"""

Expand Down

0 comments on commit 5a9e423

Please sign in to comment.