From: Zackery Spytz Date: Mon, 10 Sep 2018 06:27:31 +0000 (-0600) Subject: Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114) X-Git-Tag: v3.8.0a1~1082 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5061a74a4c8686764a299d82df048bf858dd263b;p=thirdparty%2FPython%2Fcpython.git Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114) --- diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 6566fdead380..fc75bae53766 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -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;