Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 4 Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ assign_version_tag(struct type_cache *cache, PyTypeObject *type)
if (type->tp_version_tag == 0) {
// Wrap-around or just starting Python - clear the whole cache
type_cache_clear(cache, 1);
return 1;
return 0;
}

bases = type->tp_bases;
Expand Down Expand Up @@ -3361,6 +3361,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
#if MCACHE_STATS
cache->hits++;
#endif
assert(_PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG));
return entry->value;
}

Expand Down Expand Up @@ -3398,6 +3399,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
cache->misses++;
}
#endif
assert(_PyType_HasFeature(type, Py_TPFLAGS_VALID_VERSION_TAG));
Py_SETREF(entry->name, Py_NewRef(name));
}
return res;
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.