FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-111863: Rename term Py_NOGIL to Py_GIL_DISABLED in sysconfig by corona10 · Pull Request #112307 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .py  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions Lib/test/test_sys.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1209,8 +1209,8 @@ def test_pystats(self):
@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
Expand Down
6 changes: 3 additions & 3 deletions Modules/_sysconfig.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

Back | FazBrowse Home | New Git URL