summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/deepfreeze.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/deepfreeze.py')
-rw-r--r--Tools/scripts/deepfreeze.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/scripts/deepfreeze.py b/Tools/scripts/deepfreeze.py
index dfa4b3a..3c48bac 100644
--- a/Tools/scripts/deepfreeze.py
+++ b/Tools/scripts/deepfreeze.py
@@ -18,7 +18,7 @@ import umarshal
from generate_global_objects import get_identifiers_and_strings
verbose = False
-identifiers = get_identifiers_and_strings()[0]
+identifiers, strings = get_identifiers_and_strings()
def isprintable(b: bytes) -> bool:
return all(0x20 <= c < 0x7f for c in b)
@@ -168,6 +168,8 @@ class Printer:
return f"& {name}.ob_base.ob_base"
def generate_unicode(self, name: str, s: str) -> str:
+ if s in strings:
+ return f"&_Py_STR({strings[s]})"
if s in identifiers:
return f"&_Py_ID({s})"
if re.match(r'\A[A-Za-z0-9_]+\Z', s):