summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-01-16 14:49:20 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-01-16 14:49:20 (GMT)
commit89f8b802026b4e45c692db05107100eaad1c888d (patch)
tree2b83c9b624abe6ee5326a38702475987824d95b0
parent5eda913cd23d3fcfae7eff4c26239c83e337b6a3 (diff)
downloadcpython-89f8b802026b4e45c692db05107100eaad1c888d.zip
cpython-89f8b802026b4e45c692db05107100eaad1c888d.tar.gz
cpython-89f8b802026b4e45c692db05107100eaad1c888d.tar.bz2
use helpful PyUnicode_IS_ASCII macro
-rw-r--r--Python/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c
index df2c63d..9776a6a 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)