aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/ast_opt.c
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-10-28 20:34:11 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-10-28 20:34:11 +0000
commitef9875b11a33dbd25e92bc6b4cf692c18c9ba0ce (patch)
tree1f2fd4e4d9e585da35937b42fbda5f854af04728 /contrib/tools/python3/Python/ast_opt.c
parent37ae9cc90160b53eb0e22021c47b3996a01cd656 (diff)
parente3c8507a3d1cb090278f211232ddfde3bedc54d4 (diff)
downloadydb-ef9875b11a33dbd25e92bc6b4cf692c18c9ba0ce.tar.gz
Merge branch 'rightlib' into mergelibs-241028-2033
Diffstat (limited to 'contrib/tools/python3/Python/ast_opt.c')
-rw-r--r--contrib/tools/python3/Python/ast_opt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/tools/python3/Python/ast_opt.c b/contrib/tools/python3/Python/ast_opt.c
index e881b7fe2d..e8a53786ff 100644
--- a/contrib/tools/python3/Python/ast_opt.c
+++ b/contrib/tools/python3/Python/ast_opt.c
@@ -275,10 +275,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;