]> granicus.if.org Git - python/commitdiff
Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114)
authorZackery Spytz <zspytz@gmail.com>
Mon, 10 Sep 2018 06:27:31 +0000 (00:27 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 10 Sep 2018 06:27:31 +0000 (09:27 +0300)
Parser/tokenizer.c

index 6566fdead3807f2482bdf633816339177d6e1607..fc75bae537660990e3f72284625a75b249406653 100644 (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;