We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a1edd8 commit 1069a64Copy full SHA for 1069a64
Include/cpython/bytearrayobject.h
@@ -29,6 +29,10 @@ static inline char* PyByteArray_AS_STRING(PyObject *op)
29
30
static inline Py_ssize_t PyByteArray_GET_SIZE(PyObject *op) {
31
PyByteArrayObject *self = _PyByteArray_CAST(op);
32
+#ifdef Py_GIL_DISABLED
33
+ return _Py_atomic_load_ssize_relaxed(&(_PyVarObject_CAST(self)->ob_size));
34
+#else
35
return Py_SIZE(self);
36
+#endif
37
}
38
#define PyByteArray_GET_SIZE(self) PyByteArray_GET_SIZE(_PyObject_CAST(self))
0 commit comments