mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
gh-99537: Use Py_SETREF(var, NULL) in C code (#99687)
Replace "Py_DECREF(var); var = NULL;" with "Py_SETREF(var, NULL);".
This commit is contained in:
parent
5d9183c7ad
commit
81f7359f67
22 changed files with 44 additions and 87 deletions
|
|
@ -84,7 +84,7 @@ get_proxy_settings(PyObject* Py_UNUSED(mod), PyObject *Py_UNUSED(ignored))
|
|||
if (v == NULL) goto error;
|
||||
|
||||
r = PyDict_SetItemString(result, "exclude_simple", v);
|
||||
Py_DECREF(v); v = NULL;
|
||||
Py_SETREF(v, NULL);
|
||||
if (r == -1) goto error;
|
||||
|
||||
anArray = CFDictionaryGetValue(proxyDict,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue