diff options
author | Barry Warsaw <barry@python.org> | 2001-02-23 16:40:48 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-02-23 16:40:48 (GMT) |
commit | a903ad9855947ae885c4407be8d10ef8d5521010 (patch) | |
tree | b18bccba92efafdcac4ec1bf24a9a8068b8e3cf9 /Objects | |
parent | 8d7f0869ee672d7e9e8e1bf126bf717d8223ee2b (diff) | |
download | cpython-a903ad9855947ae885c4407be8d10ef8d5521010.zip cpython-a903ad9855947ae885c4407be8d10ef8d5521010.tar.gz cpython-a903ad9855947ae885c4407be8d10ef8d5521010.tar.bz2 |
_Py_ReleaseInternedStrings(): Private API function to decref and
release the interned string dictionary. This is useful for memory
use debugging because it eliminates a huge source of noise from the
reports. Only defined when INTERN_STRINGS is defined.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 9cf64ba..740cbe2 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3217,3 +3217,13 @@ PyString_Fini(void) } #endif } + +#ifdef INTERN_STRINGS +void _Py_ReleaseInternedStrings(void) +{ + if (interned) { + Py_DECREF(interned); + interned = NULL; + } +} +#endif /* INTERN_STRINGS */ |