gh-100227: Move dict_state.global_version to PyInterpreterState (gh-102338)

https://github.com/python/cpython/issues/100227
This commit is contained in:
Eric Snow 2023-03-09 08:16:30 -07:00 committed by GitHub
parent 58d761e5b5
commit b45d14b886
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 160 additions and 109 deletions

View file

@ -1679,7 +1679,7 @@ dummy_func(
DEOPT_IF(ep->me_key != name, STORE_ATTR);
old_value = ep->me_value;
DEOPT_IF(old_value == NULL, STORE_ATTR);
new_version = _PyDict_NotifyEvent(PyDict_EVENT_MODIFIED, dict, name, value);
new_version = _PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, value);
ep->me_value = value;
}
else {
@ -1687,7 +1687,7 @@ dummy_func(
DEOPT_IF(ep->me_key != name, STORE_ATTR);
old_value = ep->me_value;
DEOPT_IF(old_value == NULL, STORE_ATTR);
new_version = _PyDict_NotifyEvent(PyDict_EVENT_MODIFIED, dict, name, value);
new_version = _PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, value);
ep->me_value = value;
}
Py_DECREF(old_value);