From 5061a74a4c8686764a299d82df048bf858dd263b Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 10 Sep 2018 00:27:31 -0600 Subject: [PATCH] Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114) --- Parser/tokenizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 6566fdead38..fc75bae5376 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;