mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -12,8 +12,7 @@ _build_return_object(mod_ty module, int mode, PyObject *filename_ob, PyArena *ar
|
|||
} else if (mode == 1) {
|
||||
result = PyAST_mod2obj(module);
|
||||
} else {
|
||||
result = Py_None;
|
||||
Py_INCREF(result);
|
||||
result = Py_NewRef(Py_None);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue