diff Python/peephole.c @ 77072:d7aff4423172 2.7

Issue #8767: Restore building with --disable-unicode. Original patch by Stefano Taschini.
author Martin v. Löwis <martin@v.loewis.de>
date Sun, 20 May 2012 10:42:17 +0200
parents 3cffa2009a92
children 15db88f6321d
line wrap: on
line diff
--- a/Python/peephole.c	Sat May 19 23:35:05 2012 -0700
+++ b/Python/peephole.c	Sun May 20 10:42:17 2012 +0200
@@ -135,6 +135,7 @@
                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 @@
                     return 0;
                 }
             }
+#endif
             break;
         case BINARY_LSHIFT:
             newconst = PyNumber_Lshift(v, w);