diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-05-20 10:42:17 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-05-20 10:42:17 +0200 |
commit | ed11a5d018e3fc234d7126832756a15c1af67d22 (patch) | |
tree | 4f5ee76e85299c314f1e923db480f3733bf48313 /Python/peephole.c | |
parent | 77e77a12731ad937e6567a2c0dea7dc51c80c69a (diff) | |
download | cpython-git-ed11a5d018e3fc234d7126832756a15c1af67d22.tar.gz |
Issue #8767: Restore building with --disable-unicode.
Original patch by Stefano Taschini.
Diffstat (limited to 'Python/peephole.c')
-rw-r--r-- | Python/peephole.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/peephole.c b/Python/peephole.c index 433fe27d0e..7521b9ce21 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); |