gh-112075: Make _PyDict_LoadGlobal thread safe (#117529)

Make _PyDict_LoadGlobal threadsafe
This commit is contained in:
Dino Viehland 2024-04-04 12:26:07 -07:00 • committed by GitHub
parent 42205143f8
commit 434bc593df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 23 additions and 29 deletions

View file

@ -97,6 +97,7 @@ extern void _PyDictKeys_DecRef(PyDictKeysObject *keys);
* -1 when no entry found, -3 when compare raises error.
*/
extern Py_ssize_t _Py_dict_lookup(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject **value_addr);
extern Py_ssize_t _Py_dict_lookup_threadsafe(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject **value_addr);
extern Py_ssize_t _PyDict_LookupIndex(PyDictObject *, PyObject *);
extern Py_ssize_t _PyDictKeys_StringLookup(PyDictKeysObject* dictkeys, PyObject *key);