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

gh-128137: Update PyASCIIObject to handle interned field with the atomic operation by corona10 · Pull Request #128196 · python/cpython · GitHub

Repository navigation

Merged
Prev Previous commit
Next Next commit
fix
  • Loading branch information
corona10 committed Jan 2, 2025
commit 4fa26a8c6fc1f4d60eaecc54eafc8ea1cc7b198f
2 changes: 1 addition & 1 deletion Include/cpython/unicodeobject.h
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 @@ -198,7 +198,7 @@ typedef struct {
/* Use only if you know it's a string */
static inline unsigned int PyUnicode_CHECK_INTERNED(PyObject *op) {
#ifdef Py_GIL_DISABLED
return _Py_atomic_load_uint8_relaxed(&_PyASCIIObject_CAST(op)->state.interned);
return _Py_atomic_load_uint16_relaxed(&_PyASCIIObject_CAST(op)->state.interned);
#else
return _PyASCIIObject_CAST(op)->state.interned;
#endif
Comment thread
kumaraditya303 marked this conversation as resolved.
Expand Down

Back | FazBrowse Home | New Git URL