File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1127,6 +1127,14 @@ type_modified_unlocked(PyTypeObject *type)
11271127 }
11281128 }
11291129
1130+ set_version_unlocked (type , 0 ); /* 0 is not a valid version tag */
1131+ if (PyType_HasFeature (type , Py_TPFLAGS_HEAPTYPE )) {
1132+ // This field *must* be invalidated if the type is modified (see the
1133+ // comment on struct _specialization_cache):
1134+ FT_ATOMIC_STORE_PTR_RELAXED (
1135+ ((PyHeapTypeObject * )type )-> _spec_cache .getitem , NULL );
1136+ }
1137+
11301138 // Notify registered type watchers, if any
11311139 if (type -> tp_watched ) {
11321140 // Note that PyErr_FormatUnraisable is re-entrant and the watcher
@@ -1148,14 +1156,6 @@ type_modified_unlocked(PyTypeObject *type)
11481156 bits >>= 1 ;
11491157 }
11501158 }
1151-
1152- set_version_unlocked (type , 0 ); /* 0 is not a valid version tag */
1153- if (PyType_HasFeature (type , Py_TPFLAGS_HEAPTYPE )) {
1154- // This field *must* be invalidated if the type is modified (see the
1155- // comment on struct _specialization_cache):
1156- FT_ATOMIC_STORE_PTR_RELAXED (
1157- ((PyHeapTypeObject * )type )-> _spec_cache .getitem , NULL );
1158- }
11591159}
11601160
11611161void
You can’t perform that action at this time.
0 commit comments