diff options
author | colorfulappl <colorfulappl@qq.com> | 2022-11-24 12:24:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 12:24:18 (GMT) |
commit | 69f6cc77d0f1664f983a83b6ae707d99a99f5c4f (patch) | |
tree | 4efabca7535e491a1e43901ab255b8cd1c65beec /Tools | |
parent | ae185fdcca9d48aef425468de8a8a31300280932 (diff) | |
download | cpython-69f6cc77d0f1664f983a83b6ae707d99a99f5c4f.zip cpython-69f6cc77d0f1664f983a83b6ae707d99a99f5c4f.tar.gz cpython-69f6cc77d0f1664f983a83b6ae707d99a99f5c4f.tar.bz2 |
gh-64490: Fix refcount error when arguments are packed to tuple in argument clinic (#99233)
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/clinic/clinic.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index a8687e3..94e17ee 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -956,7 +956,7 @@ class CLanguage(Language): parser_code.append(normalize_snippet(""" %s = PyTuple_New(%s); for (Py_ssize_t i = 0; i < %s; ++i) {{ - PyTuple_SET_ITEM(%s, i, args[%d + i]); + PyTuple_SET_ITEM(%s, i, Py_NewRef(args[%d + i])); }} """ % ( p.converter.parser_name, |