diff Python/ast.c @ 44572:db5e01c33eb7 legacy-trunk

Make Python compile with --disable-unicode.
author Georg Brandl <georg@python.org>
date Mon, 07 Jan 2008 18:16:36 +0000
parents 17479a09ec7c
children 8da9ebf73026
line wrap: on
line diff
--- a/Python/ast.c	Mon Jan 07 17:25:53 2008 +0000
+++ b/Python/ast.c	Mon Jan 07 18:16:36 2008 +0000
@@ -1246,6 +1246,7 @@
     case STRING: {
         PyObject *str = parsestrplus(c, n);
         if (!str) {
+#ifdef Py_USING_UNICODE
             if (PyErr_ExceptionMatches(PyExc_UnicodeError)){
                 PyObject *type, *value, *tback, *errstr;
                 PyErr_Fetch(&type, &value, &tback);
@@ -1263,6 +1264,7 @@
                 Py_DECREF(value);
                 Py_XDECREF(tback);
             }
+#endif
             return NULL;
         }
         PyArena_AddPyObject(c->c_arena, str);