mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-105718: Fix buffer allocation in tokenizer with readline (#105728)
This commit is contained in:
parent
d0f1afd942
commit
abfbab6415
3 changed files with 11 additions and 5 deletions
|
@ -68,7 +68,7 @@ typedef struct _tokenizer_mode {
|
|||
struct tok_state {
|
||||
/* Input state; buf <= cur <= inp <= end */
|
||||
/* NB an entire line is held in the buffer */
|
||||
char *buf; /* Input buffer, or NULL; malloc'ed if fp != NULL */
|
||||
char *buf; /* Input buffer, or NULL; malloc'ed if fp != NULL or readline != NULL */
|
||||
char *cur; /* Next character in buffer */
|
||||
char *inp; /* End of data in buffer */
|
||||
int fp_interactive; /* If the file descriptor is interactive */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue