summaryrefslogtreecommitdiffstats
path: root/Python/ast_opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ast_opt.c')
-rw-r--r--Python/ast_opt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ast_opt.c b/Python/ast_opt.c
index 41e906c..6d1bfaf 100644
--- a/Python/ast_opt.c
+++ b/Python/ast_opt.c
@@ -273,10 +273,9 @@ parse_literal(PyObject *fmt, Py_ssize_t *ppos, PyArena *arena)
PyObject *str = PyUnicode_Substring(fmt, start, pos);
/* str = str.replace('%%', '%') */
if (str && has_percents) {
- _Py_DECLARE_STR(percent, "%");
_Py_DECLARE_STR(dbl_percent, "%%");
Py_SETREF(str, PyUnicode_Replace(str, &_Py_STR(dbl_percent),
- &_Py_STR(percent), -1));
+ _Py_LATIN1_CHR('%'), -1));
}
if (!str) {
return NULL;