Skip to content

Conversation

@benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Oct 15, 2021

Thank you to Eryk Sun for the suggestions in #28965 (comment).

https://bugs.python.org/issue45479

Comment on lines 260 to 264
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can skip reassigning to c after GETC in the common case of '\r\n':

c = GETC(stream);
if (c != '\n') {
    ungetc(c, stream);
    c = '\n';
}

Thank you to Eryk Sun for the suggestions in #28965 (comment).
@benjaminp benjaminp merged commit 9ce9cfe into python:main Oct 15, 2021
@benjaminp benjaminp deleted the more-bpo-45479 branch October 15, 2021 06:10
ShivnarenSrinivasan pushed a commit to ShivnarenSrinivasan/cpython that referenced this pull request Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants