]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111903: Update AC to support "pycore_critical_section.h" header (gh-112251)
authorDonghee Na <donghee.na@python.org>
Sun, 19 Nov 2023 01:13:58 +0000 (01:13 +0000)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2023 01:13:58 +0000 (10:13 +0900)
Modules/_functoolsmodule.c
Modules/_io/bufferedio.c
Modules/_io/clinic/bufferedio.c.h
Modules/_io/clinic/textio.c.h
Modules/_io/textio.c
Modules/clinic/_functoolsmodule.c.h
Tools/clinic/clinic.py

index 2592c4d7f75631616ac2354d37c6dcb3ef8facf5..9ab847165dc09704e0339970e6911c70aa31bb2f 100644 (file)
@@ -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()
index 169b2b3d105669e50f121735c7927e2e70eccc31..d7123ab005aa62dd531fc02f1af3569d5fdca5da 100644 (file)
@@ -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()
index 3fe03506b6cfa5cbb9e520737d7f4a0399d67917..dd2fbb403c4a28c94536e0f41d869c41ea5354a3 100644 (file)
@@ -7,6 +7,7 @@ preserve
 #  include "pycore_runtime.h"     // _Py_ID()
 #endif
 #include "pycore_abstract.h"      // _PyNumber_Index()
+#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
 #include "pycore_modsupport.h"    // _PyArg_BadArgument()
 
 PyDoc_STRVAR(_io__BufferedIOBase_readinto__doc__,
@@ -1081,4 +1082,4 @@ skip_optional_pos:
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=b23847480eba3d9b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2d5f735188df3163 input=a9049054013a1b77]*/
index 76bf484f657656deeffcd143cf8f3e9ac1e49751..675e0ed2eab75e18ceeeb349d963f8f38603d5b5 100644 (file)
@@ -7,6 +7,7 @@ preserve
 #  include "pycore_runtime.h"     // _Py_ID()
 #endif
 #include "pycore_abstract.h"      // _Py_convert_optional_to_ssize_t()
+#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
 #include "pycore_modsupport.h"    // _PyArg_UnpackKeywords()
 
 PyDoc_STRVAR(_io__TextIOBase_detach__doc__,
@@ -1046,4 +1047,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
 
     return return_value;
 }
-/*[clinic end generated code: output=ec8ccae78ec3b379 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=8781a91be6d99e2c input=a9049054013a1b77]*/
index 9f4155a5dd63ee49fab7d661f3abb160f24cb028..545f467b7f0257be26e5369b45e063b8be8a216e 100644 (file)
@@ -9,7 +9,6 @@
 #include "Python.h"
 #include "pycore_call.h"              // _PyObject_CallMethod()
 #include "pycore_codecs.h"            // _PyCodecInfo_GetIncrementalDecoder()
-#include "pycore_critical_section.h"  // Py_BEGIN_CRITICAL_SECTION()
 #include "pycore_fileutils.h"         // _Py_GetLocaleEncoding()
 #include "pycore_interp.h"            // PyInterpreterState.fs_codec
 #include "pycore_long.h"              // _PyLong_GetZero()
index 11fe0439c08a5e16a5bd1c3fdeff20f96d05b569..e98984dc4d3a09a6fc6aa3f1cf1b676da306dd6b 100644 (file)
@@ -6,6 +6,7 @@ preserve
 #  include "pycore_gc.h"          // PyGC_Head
 #  include "pycore_runtime.h"     // _Py_ID()
 #endif
+#include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
 #include "pycore_modsupport.h"    // _PyArg_UnpackKeywords()
 
 PyDoc_STRVAR(_functools_cmp_to_key__doc__,
@@ -113,4 +114,4 @@ _functools__lru_cache_wrapper_cache_clear(PyObject *self, PyObject *Py_UNUSED(ig
 
     return return_value;
 }
-/*[clinic end generated code: output=5e3207fa0d28cdb1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=755265bb6d5ea751 input=a9049054013a1b77]*/
index f9326c1b2ca6356056a5761a3658536b965c6dce..b1dfcfea92a0d05ef2eeb90cb13647d025e15d73 100755 (executable)
@@ -1111,7 +1111,8 @@ class CLanguage(Language):
             if include:
                 clinic.add_include(include.filename, include.reason,
                                    condition=include.condition)
-
+        if f.critical_section:
+            clinic.add_include('pycore_critical_section.h', 'Py_BEGIN_CRITICAL_SECTION()')
         has_option_groups = parameters and (parameters[0].group or parameters[-1].group)
         simple_return = (f.return_converter.type == 'PyObject *'
                          and not f.critical_section)