summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-04-19 17:41:36 (GMT)
committerGitHub <noreply@github.com>2022-04-19 17:41:36 (GMT)
commitab0d35d70dfe0b4c11583f8f735a8cc49b58c58b (patch)
treeed1f726c61787498c0d7fa9890c932d6945ee881 /Python
parent3c4380651301f255ef8149b638a1fae205ede575 (diff)
downloadcpython-ab0d35d70dfe0b4c11583f8f735a8cc49b58c58b.zip
cpython-ab0d35d70dfe0b4c11583f8f735a8cc49b58c58b.tar.gz
cpython-ab0d35d70dfe0b4c11583f8f735a8cc49b58c58b.tar.bz2
bpo-46712: share more global strings in deepfreeze (gh-32152)
(for gh-90868)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 4108b89..ceaf852 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -782,6 +782,7 @@ compiler_set_qualname(struct compiler *c)
}
if (base != NULL) {
+ _Py_DECLARE_STR(dot, ".");
name = PyUnicode_Concat(base, &_Py_STR(dot));
Py_DECREF(base);
if (name == NULL)
@@ -3945,6 +3946,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names);
}
else {
+ _Py_DECLARE_STR(empty, "");
ADDOP_NAME(c, IMPORT_NAME, &_Py_STR(empty), names);
}
for (i = 0; i < n; i++) {
@@ -4885,6 +4887,7 @@ compiler_joined_str(struct compiler *c, expr_ty e)
Py_ssize_t value_count = asdl_seq_LEN(e->v.JoinedStr.values);
if (value_count > STACK_USE_GUIDELINE) {
+ _Py_DECLARE_STR(empty, "");
ADDOP_LOAD_CONST_NEW(c, &_Py_STR(empty));
ADDOP_NAME(c, LOAD_METHOD, &_Py_ID(join), names);
ADDOP_I(c, BUILD_LIST, 0);