mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +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
|
@ -2402,8 +2402,7 @@ builtin_vars(PyObject *self, PyObject *args)
|
|||
if (!PyArg_UnpackTuple(args, "vars", 0, 1, &v))
|
||||
return NULL;
|
||||
if (v == NULL) {
|
||||
d = PyEval_GetLocals();
|
||||
Py_XINCREF(d);
|
||||
d = Py_XNewRef(PyEval_GetLocals());
|
||||
}
|
||||
else {
|
||||
if (_PyObject_LookupAttr(v, &_Py_ID(__dict__), &d) == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue