Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114)

This commit is contained in:
Zackery Spytz 2018-09-10 00:27:31 -06:00 committed by Serhiy Storchaka
parent 0afada163c
commit 5061a74a4c
1 changed files with 1 additions and 1 deletions

View File

@ -1324,7 +1324,7 @@ verify_identifier(struct tok_state *tok)
if (tok->decoding_erred)
return 0;
s = PyUnicode_DecodeUTF8(tok->start, tok->cur - tok->start, NULL);
if (s == NULL || PyUnicode_READY(s) == -1) {
if (s == NULL) {
if (PyErr_ExceptionMatches(PyExc_UnicodeDecodeError)) {
PyErr_Clear();
tok->done = E_IDENTIFIER;