mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00: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
1 changed files with 18 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue