Skip to content

Commit df07364

Browse files
pythongh-140544: use faster _PyInterpreterState_GET for type lock (python#140584)
1 parent ef4665f commit df07364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/typeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class object "PyObject *" "&PyBaseObject_Type"
7272
// the type has been revealed to other threads or we only do those updates
7373
// while the stop-the-world mechanism is active. The slots and flags are read
7474
// in many places without holding a lock and without atomics.
75-
#define TYPE_LOCK &PyInterpreterState_Get()->types.mutex
75+
#define TYPE_LOCK &_PyInterpreterState_GET()->types.mutex
7676
#define BEGIN_TYPE_LOCK() Py_BEGIN_CRITICAL_SECTION_MUTEX(TYPE_LOCK)
7777
#define END_TYPE_LOCK() Py_END_CRITICAL_SECTION()
7878

0 commit comments

Comments
 (0)