summaryrefslogtreecommitdiffstats
path: root/Python/thread.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-11-10 08:03:39 (GMT)
committerGitHub <noreply@github.com>2022-11-10 08:03:39 (GMT)
commitd8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20 (patch)
tree7055b2d966bf41e636751177cea0248b56072e92 /Python/thread.c
parentf883b7f8ee3209b52863fc662343c8cd81abdc59 (diff)
downloadcpython-d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20.zip
cpython-d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20.tar.gz
cpython-d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20.tar.bz2
gh-99300: Use Py_NewRef() in Python/ directory (#99302)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Python/ directory.
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/thread.c b/Python/thread.c
index 8c8a4e8..3c1e78e 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -207,8 +207,7 @@ PyThread_GetInfo(void)
if (value == NULL)
#endif
{
- Py_INCREF(Py_None);
- value = Py_None;
+ value = Py_NewRef(Py_None);
}
PyStructSequence_SET_ITEM(threadinfo, pos++, value);
return threadinfo;