]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-103718: Correctly set f-string buffers in all cases (GH-103815)
authorLysandros Nikolaou <lisandrosnik@gmail.com>
Tue, 25 Apr 2023 01:31:21 +0000 (19:31 -0600)
committerGitHub <noreply@github.com>
Tue, 25 Apr 2023 01:31:21 +0000 (01:31 +0000)
commit57f8f9a66d4d0b5e590f7746a58136b3b45b1336
treef00a9a19fa8c4896b56548a307f15b3ad21b66af
parent3df3b91e6a0d84bcb954ec894d17f4603bdf428f
gh-103718: Correctly set f-string buffers in all cases (GH-103815)

Turns out we always need to remember/restore fstring buffers in all of
the stack of tokenizer modes, cause they might change to
`TOK_REGULAR_MODE` and have newlines inside the braces (which is when we
need to reallocate the buffer and restore the fstring ones).
Parser/tokenizer.c