mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
Added internal routine PyString_Fini() which deletes all interned
strings. For use in Py_Finalize() only.
This commit is contained in:
parent
29e46a9a12
commit
8cf0476474
@ -1073,3 +1073,21 @@ PyString_InternFromString(cp)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
PyString_Fini()
|
||||
{
|
||||
int i;
|
||||
#ifdef INTERN_STRINGS
|
||||
Py_XDECREF(interned);
|
||||
interned = NULL;
|
||||
#endif
|
||||
for (i = 0; i < UCHAR_MAX + 1; i++) {
|
||||
Py_XDECREF(characters[i]);
|
||||
characters[i] = NULL;
|
||||
}
|
||||
#ifndef DONT_SHARE_SHORT_STRINGS
|
||||
Py_XDECREF(nullstring);
|
||||
nullstring = NULL;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user