Skip to content

Commit c1f3ed5

Browse files
committed
Fix assert for default build.
1 parent 1a2fee1 commit c1f3ed5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Objects/typeobject.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,11 @@ type_modified_unlocked(PyTypeObject *type)
11781178
needed.
11791179
*/
11801180
ASSERT_NEW_TYPE_OR_LOCKED(type);
1181+
#ifdef Py_GIL_DISABLED
1182+
// This function is re-entrant and it's not safe to call it
1183+
// with the world stopped.
11811184
assert(!types_world_is_stopped());
1185+
#endif
11821186
if (type->tp_version_tag == 0) {
11831187
return;
11841188
}

0 commit comments

Comments
 (0)