Make Python compile with --disable-unicode.

This commit is contained in:
Georg Brandl 2008-01-07 18:16:36 +00:00
parent aed6c66aa8
commit dfe5dc8455
4 changed files with 8 additions and 0 deletions

View file

@ -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);