bpo-46417: Clear symtable identifiers at exit (GH-30809)

Add _PySymtable_Fini() function, called by finalize_interp_clear().

Update test_cmd_line.test_showrefcount() to tolerate negative
reference count.
This commit is contained in:
Victor Stinner 2022-01-23 00:06:56 +01:00 committed by GitHub
parent 1ded8ed8e8
commit 12f4ac3bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 3 deletions

View file

@ -128,6 +128,8 @@ extern struct symtable* _Py_SymtableStringObjectFlags(
int start,
PyCompilerFlags *flags);
extern void _PySymtable_Fini(void);
#ifdef __cplusplus
}
#endif