Kaydet (Commit) 89f8b802 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

use helpful PyUnicode_IS_ASCII macro

üst 5eda913c
...@@ -537,7 +537,7 @@ new_identifier(const char* n, PyArena *arena) ...@@ -537,7 +537,7 @@ new_identifier(const char* n, PyArena *arena)
assert(PyUnicode_IS_READY(id)); assert(PyUnicode_IS_READY(id));
/* Check whether there are non-ASCII characters in the /* Check whether there are non-ASCII characters in the
identifier; if so, normalize to NFKC. */ 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 *m = PyImport_ImportModuleNoBlock("unicodedata");
PyObject *id2; PyObject *id2;
if (!m) if (!m)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment