8000 bpo-31592: Fix an assertion failure in Python/ast.c in case of a bad unicodedata.normalize() by orenmn · Pull Request #3767 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-31592: Fix an assertion failure in Python/ast.c in case of a bad unicodedata.normalize() #3767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 30, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use _Py_IDENTIFIER()
  • Loading branch information
orenmn committed Sep 28, 2017
commit 56c7eadc4e344b06d401f21157b5151994126b5f
4 changes: 2 additions & 2 deletions Python/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,18 +645,18 @@ new_identifier(const char *n, struct compiling *c)
identifier; if so, normalize to NFKC. */
if (!PyUnicode_IS_ASCII(id)) {
PyObject *id2;
_Py_IDENTIFIER(NFKC);
if (!c->c_normalize && !init_normalization(c)) {
Py_DECREF(id);
return NULL;
}
PyObject *form = PyUnicode_FromString("NFKC");
PyObject *form = _PyUnicode_FromId(&PyId_NFKC);
if (form == NULL) {
Py_DECREF(id);
return NULL;
}
PyObject *args[2] = {form, id};
id2 = _PyObject_FastCall(c->c_normalize, args, 2);
Py_DECREF(form);
Py_DECREF(id);
if (!id2)
return NULL;
Expand Down
0