Skip to content

Commit

Permalink
Move GIl manipulation right after module creation
Browse files Browse the repository at this point in the history
So that it also affects objects created at module loading time.

This seems to fix #2271
  • Loading branch information
serge-sans-paille committed Jan 11, 2025
1 parent 092d09f commit 9dc7a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pythran/cxxgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ def __str__(self):
PyObject* theModule = PyModule_Create(&moduledef);
if(! theModule)
return theModule;
{freethreading}
PyObject * theDoc = Py_BuildValue("(ss)",
"{version}",
"{hash}");
Expand All @@ -731,7 +732,6 @@ def __str__(self):
theDoc);
{extraobjects}
{freethreading}
return theModule;
}}
'''.format(name=self.name,
Expand Down

0 comments on commit 9dc7a79

Please sign in to comment.