Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
I have questions when reading the source code of filepegen.c.
There is a code snippet in function_PyPegen_Parser_New:
p->tokens[0]=PyMem_Calloc(1,sizeof(Token));if (!p->tokens) {PyMem_Free(p->tokens);PyMem_Free(p);return (Parser*)PyErr_NoMemory();}
I think it makes more sense to checkp->tokens[0] but notp->tokens in if condition.
I look at the PR#19669 where the code was introduced and no one discussed this. Is this an oversight, or am I wrong?
Your environment
- CPython versions tested on: main branch