summaryrefslogtreecommitdiffstats
path: root/Python/peephole.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/peephole.c')
-rw-r--r--Python/peephole.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/peephole.c b/Python/peephole.c
index 433fe27..7521b9c 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -135,6 +135,7 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
will return a surrogate. In both the cases skip the
optimization in order to produce compatible pycs.
*/
+#ifdef Py_USING_UNICODE
if (newconst != NULL &&
PyUnicode_Check(v) && PyUnicode_Check(newconst)) {
Py_UNICODE ch = PyUnicode_AS_UNICODE(newconst)[0];
@@ -147,6 +148,7 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
return 0;
}
}
+#endif
break;
case BINARY_LSHIFT:
newconst = PyNumber_Lshift(v, w);