bpo-34301: Add _PyInterpreterState_Get() helper function (GH-8592)

sys_setcheckinterval() now uses a local variable to parse arguments,
before writing into interp->check_interval.
This commit is contained in:
Victor Stinner 2018-08-03 15:33:52 +02:00 committed by GitHub
parent 2ebd3813af
commit caba55b3b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 107 additions and 93 deletions

View file

@ -96,7 +96,7 @@ extern Py_ssize_t null_strings, one_strings;
void
dump_counts(FILE* f)
{
PyInterpreterState *interp = PyThreadState_GET()->interp;
PyInterpreterState *interp = _PyInterpreterState_Get();
if (!interp->core_config.show_alloc_count) {
return;
}