Skip to content

Commit

Permalink
pythongh-111903: Update AC to support "pycore_critical_section.h" header
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Nov 18, 2023
1 parent e52cc80 commit 5682cf4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion Modules/_functoolsmodule.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION
#include "pycore_dict.h" // _PyDict_Pop_KnownHash()
#include "pycore_long.h" // _PyLong_GetZero()
#include "pycore_moduleobject.h" // _PyModule_GetState()
Expand Down
1 change: 0 additions & 1 deletion Modules/_io/bufferedio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "Python.h"
#include "pycore_bytesobject.h" // _PyBytes_Join()
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_pyerrors.h" // _Py_FatalErrorFormat()
#include "pycore_pylifecycle.h" // _Py_IsInterpreterFinalizing()
Expand Down
3 changes: 2 additions & 1 deletion Modules/_io/clinic/bufferedio.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Modules/clinic/_functoolsmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5306,6 +5306,8 @@ def at_critical_section(self, *args: str) -> None:
fail("Up to 2 critical section variables are supported")
self.target_critical_section.extend(args)
self.critical_section = True
if self.critical_section:
clinic.add_include('pycore_critical_section.h', 'Py_BEGIN_CRITICAL_SECTION()')

def at_staticmethod(self) -> None:
if self.kind is not CALLABLE:
Expand Down

0 comments on commit 5682cf4

Please sign in to comment.