diff options
author | Victor Stinner <vstinner@python.org> | 2022-11-10 08:03:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 08:03:39 (GMT) |
commit | d8f239d86eb70c31aa4c4ac46a1d0a27bdb14b20 (patch) | |
tree | 7055b2d966bf41e636751177cea0248b56072e92 /Python/suggestions.c | |
parent | f883b7f8ee3209b52863fc662343c8cd81abdc59 (diff) | |
download | cpython-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.c | 3 |
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 * |