summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/scripts/deepfreeze.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/scripts/deepfreeze.py b/Tools/scripts/deepfreeze.py
index a7546a8..a1ef85e 100644
--- a/Tools/scripts/deepfreeze.py
+++ b/Tools/scripts/deepfreeze.py
@@ -150,6 +150,8 @@ class Printer:
def generate_bytes(self, name: str, b: bytes) -> str:
if b == b"":
return "(PyObject *)&_Py_SINGLETON(bytes_empty)"
+ if len(b) == 1:
+ return f"(PyObject *)&_Py_SINGLETON(bytes_characters[{b[0]}])"
self.write("static")
with self.indent():
with self.block("struct"):