diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 10:38:36 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 10:38:36 +0200 |
commit | dcacb24f386ae1b107462181af42b6826ec15fb7 (patch) | |
tree | ed05b3b498c8ef724d116a5c46c3fb20ce395773 /Python/ast.c | |
parent | 08445566b23e60a05193826e327472776644c2b6 (diff) | |
download | cpython-dcacb24f386ae1b107462181af42b6826ec15fb7.tar.gz |
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c index a52fd093e6..987297924e 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -527,6 +527,7 @@ static PyObject *parsestrplus(struct compiling *, const node *n, static identifier new_identifier(const char* n, PyArena *arena) { + _Py_identifier(normalize); PyObject* id = PyUnicode_DecodeUTF8(n, strlen(n), NULL); if (!id || PyUnicode_READY(id) == -1) return NULL; @@ -537,7 +538,7 @@ new_identifier(const char* n, PyArena *arena) PyObject *id2; if (!m) return NULL; - id2 = PyObject_CallMethod(m, "normalize", "sO", "NFKC", id); + id2 = _PyObject_CallMethodId(m, &PyId_normalize, "sO", "NFKC", id); Py_DECREF(m); if (!id2) return NULL; |