mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-99300: Use Py_NewRef() in Parser/ directory (#99330)
Replace Py_INCREF() with Py_NewRef() in C files of the Parser/ directory and in the PEG generator.
This commit is contained in:
parent
1e197e63e2
commit
4ce2a202c7
4 changed files with 5 additions and 11 deletions
|
@ -417,9 +417,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end,
|
|||
PyMem_Free(str);
|
||||
return NULL;
|
||||
}
|
||||
Py_INCREF(p->tok->filename);
|
||||
|
||||
tok->filename = p->tok->filename;
|
||||
tok->filename = Py_NewRef(p->tok->filename);
|
||||
tok->lineno = t->lineno + lines - 1;
|
||||
|
||||
Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, p->flags, p->feature_version,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue