diff options
author | Donghee Na <donghee.na@python.org> | 2023-12-26 16:48:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-26 16:48:33 (GMT) |
commit | 8f5b9987066f46daa67b622d913ff2c51c949ed4 (patch) | |
tree | ba31f7d886c3f97daeb9d424fe6809c439ea289d /Include | |
parent | 36adc79041f4d2764e1daf7db5bb478923e89a1f (diff) | |
download | cpython-8f5b9987066f46daa67b622d913ff2c51c949ed4.zip cpython-8f5b9987066f46daa67b622d913ff2c51c949ed4.tar.gz cpython-8f5b9987066f46daa67b622d913ff2c51c949ed4.tar.bz2 |
gh-111971: Make _PyUnicode_FromId thread-safe in --disable-gil (gh-113489)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/object.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 762e8a3..d6482f4 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -39,6 +39,10 @@ typedef struct _Py_Identifier { // Index in PyInterpreterState.unicode.ids.array. It is process-wide // unique and must be initialized to -1. Py_ssize_t index; + // Hidden PyMutex struct for non free-threaded build. + struct { + uint8_t v; + } mutex; } _Py_Identifier; #ifndef Py_BUILD_CORE |