[Python-checkins] Remove unneeded PyUnicode_READY() in tokenizer.c (GH-9114)

Serhiy Storchaka webhook-mailer at python.org
Mon Sep 10 02:27:35 EDT 2018


https://github.com/python/cpython/commit/5061a74a4c8686764a299d82df048bf858dd263b
commit: 5061a74a4c8686764a299d82df048bf858dd263b
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-09-10T09:27:31+03:00
summary:

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

files:
M Parser/tokenizer.c

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;



More information about the Python-checkins mailing list