gh-128033: change PyMutex_LockFast to take PyMutex as argument (#128054)

Change `PyMutex_LockFast` to take `PyMutex` as argument.
This commit is contained in:
Kumar Aditya 2024-12-18 20:49:00 +05:30 committed by GitHub
parent 8a433b683f
commit 91c55085a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -300,7 +300,7 @@ GETITEM(PyObject *v, Py_ssize_t i) {
// avoid any potentially escaping calls (like PyStackRef_CLOSE) while the
// object is locked.
#ifdef Py_GIL_DISABLED
# define LOCK_OBJECT(op) PyMutex_LockFast(&(_PyObject_CAST(op))->ob_mutex._bits)
# define LOCK_OBJECT(op) PyMutex_LockFast(&(_PyObject_CAST(op))->ob_mutex)
# define UNLOCK_OBJECT(op) PyMutex_Unlock(&(_PyObject_CAST(op))->ob_mutex)
#else
# define LOCK_OBJECT(op) (1)