summaryrefslogtreecommitdiffstats
path: root/Python/suggestions.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/suggestions.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/suggestions.c')
-rw-r--r--Python/suggestions.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/suggestions.c b/Python/suggestions.c
index eee61b2..ad645c7 100644
--- a/Python/suggestions.c
+++ b/Python/suggestions.c
@@ -173,8 +173,7 @@ calculate_suggestions(PyObject *dir,
suggestion_distance = current_distance;
}
}
- Py_XINCREF(suggestion);
- return suggestion;
+ return Py_XNewRef(suggestion);
}
static PyObject *