mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef() and Py_XNewRef().
This commit is contained in:
parent
19c1462e8d
commit
8211cf5d28
18 changed files with 40 additions and 74 deletions
|
@ -515,8 +515,7 @@ parse_syntax_error(PyObject *err, PyObject **message, PyObject **filename,
|
|||
if (v == Py_None) {
|
||||
Py_DECREF(v);
|
||||
_Py_DECLARE_STR(anon_string, "<string>");
|
||||
*filename = &_Py_STR(anon_string);
|
||||
Py_INCREF(*filename);
|
||||
*filename = Py_NewRef(&_Py_STR(anon_string));
|
||||
}
|
||||
else {
|
||||
*filename = v;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue