Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
serhiy-storchaka and vstinner authored May 12, 2020
commit 750d91fe0de7b72b991ca3c749248d0f82207024
3 changes: 1 addition & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,8 +2320,7 @@ valid_identifier(PyObject *s)
return 0;
}
/* Since there is no way to return an error from PyUnicode_IsIdentifier()
we have to call PyUnicode_READY() to ensure that the string object is
in the "canonical" representation. */
we have to call explicitly PyUnicode_READY(). */
if (PyUnicode_READY(s) < 0) {
return 0;
}
Expand Down
3 changes: 0 additions & 3 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -12373,9 +12373,6 @@ static PyObject *
unicode_isidentifier_impl(PyObject *self)
/*[clinic end generated code: output=fe585a9666572905 input=2d807a104f21c0c5]*/
{
/* Since there is no way to return an error from PyUnicode_IsIdentifier()
we have to call PyUnicode_READY() to ensure that the string object is
in the "canonical" representation. */
if (PyUnicode_READY(self) < 0) {
return NULL;
}
Expand Down