]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111863: Rename term Py_NOGIL to Py_GIL_DISABLED in sysconfig (gh-112307)
authorDonghee Na <donghee.na@python.org>
Wed, 22 Nov 2023 01:32:43 +0000 (01:32 +0000)
committerGitHub <noreply@github.com>
Wed, 22 Nov 2023 01:32:43 +0000 (10:32 +0900)
Lib/test/test_sys.py
Modules/_sysconfig.c

index ae73f5a7de7421dd9619c44e47a113a4aac81b2e..7f49fb004272bba96cbb668f2acb12e714b1b62b 100644 (file)
@@ -1209,8 +1209,8 @@ class SysModuleTest(unittest.TestCase):
     @unittest.skipUnless(hasattr(sys, 'abiflags'), 'need sys.abiflags')
     def test_disable_gil_abi(self):
         abi_threaded = 't' in sys.abiflags
-        py_nogil = (sysconfig.get_config_var('Py_GIL_DISABLED') == 1)
-        self.assertEqual(py_nogil, abi_threaded)
+        py_gil_disabled = (sysconfig.get_config_var('Py_GIL_DISABLED') == 1)
+        self.assertEqual(py_gil_disabled, abi_threaded)
 
 
 @test.support.cpython_only
index 2918913c18ed1e97fef0d3733a0e31ba57e5860f..c76b9e6b3ebafab54e383b62b35486128ef74f87 100644 (file)
@@ -58,11 +58,11 @@ _sysconfig_config_vars_impl(PyObject *module)
 #endif
 
 #ifdef Py_GIL_DISABLED
-    PyObject *py_nogil = _PyLong_GetOne();
+    PyObject *py_gil_disabled = _PyLong_GetOne();
 #else
-    PyObject *py_nogil = _PyLong_GetZero();
+    PyObject *py_gil_disabled = _PyLong_GetZero();
 #endif
-    if (PyDict_SetItemString(config, "Py_GIL_DISABLED", py_nogil) < 0) {
+    if (PyDict_SetItemString(config, "Py_GIL_DISABLED", py_gil_disabled) < 0) {
         Py_DECREF(config);
         return NULL;
     }