mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix SyntaxError
indicator printing too many spaces for multi-line strings (GH-14433)
This commit is contained in:
parent
e1b9002472
commit
5b94f3578c
3 changed files with 17 additions and 0 deletions
|
@ -956,6 +956,7 @@ tok_nextc(struct tok_state *tok)
|
|||
while (!done) {
|
||||
Py_ssize_t curstart = tok->start == NULL ? -1 :
|
||||
tok->start - tok->buf;
|
||||
Py_ssize_t cur_multi_line_start = tok->multi_line_start - tok->buf;
|
||||
Py_ssize_t curvalid = tok->inp - tok->buf;
|
||||
Py_ssize_t newsize = curvalid + BUFSIZ;
|
||||
char *newbuf = tok->buf;
|
||||
|
@ -968,6 +969,7 @@ tok_nextc(struct tok_state *tok)
|
|||
}
|
||||
tok->buf = newbuf;
|
||||
tok->cur = tok->buf + cur;
|
||||
tok->multi_line_start = tok->buf + cur_multi_line_start;
|
||||
tok->line_start = tok->cur;
|
||||
tok->inp = tok->buf + curvalid;
|
||||
tok->end = tok->buf + newsize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue