diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-08-29 22:50:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 22:50:45 (GMT) |
commit | fbca90856d96273fd87c0b126f6e7966af7fbf7b (patch) | |
tree | 70be23311a03992573d5fb029acb03b208613440 /Include/pystate.h | |
parent | de427556746aa41a8b5198924ce423021bc0c718 (diff) | |
download | cpython-fbca90856d96273fd87c0b126f6e7966af7fbf7b.zip cpython-fbca90856d96273fd87c0b126f6e7966af7fbf7b.tar.gz cpython-fbca90856d96273fd87c0b126f6e7966af7fbf7b.tar.bz2 |
bpo-34523: Use _PyCoreConfig instead of globals (GH-9005)
Use the core configuration of the interpreter, rather
than using global configuration variables. For example, replace
Py_QuietFlag with core_config->quiet.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r-- | Include/pystate.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index e410665..80ee0d1 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -249,7 +249,9 @@ PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *); PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_Get(void); #endif #ifdef Py_BUILD_CORE - /* Macro which should only be used for performance critical code */ + /* Macro which should only be used for performance critical code. + Need "#include "internal/pystate.h". See also _PyInterpreterState_Get() + and _PyGILState_GetInterpreterStateUnsafe(). */ # define _PyInterpreterState_GET_UNSAFE() (PyThreadState_GET()->interp) #endif #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 @@ -369,7 +371,9 @@ PyAPI_FUNC(int) PyGILState_Check(void); GILState implementation. Return NULL before _PyGILState_Init() is called and after _PyGILState_Fini() - is called. */ + is called. + + See also _PyInterpreterState_Get() and _PyInterpreterState_GET_UNSAFE(). */ PyAPI_FUNC(PyInterpreterState *) _PyGILState_GetInterpreterStateUnsafe(void); #endif /* !Py_LIMITED_API */ |