GH-95909: Make _PyArg_Parser initialization thread safe (GH-95958)

This commit is contained in:
Kumar Aditya 2022-08-16 23:52:14 +05:30 committed by GitHub
parent 48174fa0b9
commit 9b30b965f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 12 deletions

View file

@ -14,6 +14,9 @@ extern "C" {
#include "pycore_interp.h" // PyInterpreterState
#include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_ids
struct _getargs_runtime_state {
PyThread_type_lock mutex;
};
/* ceval state */
@ -114,6 +117,7 @@ typedef struct pyruntimestate {
struct _ceval_runtime_state ceval;
struct _gilstate_runtime_state gilstate;
struct _getargs_runtime_state getargs;
PyPreConfig preconfig;