summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorJeremy Kloth <jeremy.kloth@gmail.com>2022-03-22 12:53:51 (GMT)
committerGitHub <noreply@github.com>2022-03-22 12:53:51 (GMT)
commit88872a29f19092d2fde27365af230abd6d301941 (patch)
treec3b3f338395d4f3015cf1e9c37689a30019126b1 /Tools/scripts
parent7d810b6a4eab6eba689acc5bb05f85515478d690 (diff)
downloadcpython-88872a29f19092d2fde27365af230abd6d301941.zip
cpython-88872a29f19092d2fde27365af230abd6d301941.tar.gz
cpython-88872a29f19092d2fde27365af230abd6d301941.tar.bz2
bpo-47084: Clear Unicode cached representations on finalization (GH-32032)
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/deepfreeze.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tools/scripts/deepfreeze.py b/Tools/scripts/deepfreeze.py
index d208258..1831c15 100644
--- a/Tools/scripts/deepfreeze.py
+++ b/Tools/scripts/deepfreeze.py
@@ -185,6 +185,7 @@ class Printer:
else:
self.write("PyCompactUnicodeObject _compact;")
self.write(f"{datatype} _data[{len(s)+1}];")
+ self.deallocs.append(f"_PyStaticUnicode_Dealloc((PyObject *)&{name});")
with self.block(f"{name} =", ";"):
if ascii:
with self.block("._ascii =", ","):