From: Benjamin Peterson Date: Mon, 16 Jan 2012 14:49:20 +0000 (-0500) Subject: use helpful PyUnicode_IS_ASCII macro X-Git-Tag: v3.3.0a1~384 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=89f8b802026b4e45c692db05107100eaad1c888d;p=thirdparty%2FPython%2Fcpython.git use helpful PyUnicode_IS_ASCII macro --- diff --git a/Python/ast.c b/Python/ast.c index df2c63da1b68..9776a6a15151 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -537,7 +537,7 @@ new_identifier(const char* n, PyArena *arena) assert(PyUnicode_IS_READY(id)); /* Check whether there are non-ASCII characters in the identifier; if so, normalize to NFKC. */ - if (PyUnicode_MAX_CHAR_VALUE((PyUnicodeObject *)id) >= 128) { + if (PyUnicode_IS_ASCII(id)) { PyObject *m = PyImport_ImportModuleNoBlock("unicodedata"); PyObject *id2; if (!m)