summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-07 18:16:36 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-07 18:16:36 (GMT)
commitdfe5dc8455de93fddb3030416e41b92d3a0fd267 (patch)
tree4a088e75d976c7383f525d730f4f5f5a88cd0a49 /Python/ast.c
parentaed6c66aa8c9d1d2af9e60323e688452dfd6b6c7 (diff)
downloadcpython-dfe5dc8455de93fddb3030416e41b92d3a0fd267.zip
cpython-dfe5dc8455de93fddb3030416e41b92d3a0fd267.tar.gz
cpython-dfe5dc8455de93fddb3030416e41b92d3a0fd267.tar.bz2
Make Python compile with --disable-unicode.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index b084e01..ddcd0a0 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1246,6 +1246,7 @@ ast_for_atom(struct compiling *c, const node *n)
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 @@ ast_for_atom(struct compiling *c, const node *n)
Py_DECREF(value);
Py_XDECREF(tback);
}
+#endif
return NULL;
}
PyArena_AddPyObject(c->c_arena, str);