mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
gh-114329: Add PyList_GetItemRef
function (GH-114504)
The new `PyList_GetItemRef` is similar to `PyList_GetItem`, but returns a strong reference instead of a borrowed reference. Additionally, if the passed "list" object is not a list, the function sets a `TypeError` instead of calling `PyErr_BadInternalCall()`.
This commit is contained in:
parent
0e71a295e9
commit
d0f1307580
12 changed files with 68 additions and 11 deletions
1
PC/python3dll.c
generated
1
PC/python3dll.c
generated
|
@ -324,6 +324,7 @@ EXPORT_FUNC(PyIter_Send)
|
|||
EXPORT_FUNC(PyList_Append)
|
||||
EXPORT_FUNC(PyList_AsTuple)
|
||||
EXPORT_FUNC(PyList_GetItem)
|
||||
EXPORT_FUNC(PyList_GetItemRef)
|
||||
EXPORT_FUNC(PyList_GetSlice)
|
||||
EXPORT_FUNC(PyList_Insert)
|
||||
EXPORT_FUNC(PyList_New)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue