Skip to content

Commit 4c7c24e

Browse files
committed
gh-151818: Add a test on CALL_LIST_APPEND error path
* Add _PyList_Capacity() internal function to _testinternalcapi. * Add Modules/_testinternalcapi/list.c file.
1 parent 3cd4283 commit 4c7c24e

16 files changed

Lines changed: 1039 additions & 1053 deletions

Include/internal/pycore_list.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ union _PyStackRef;
7777
PyAPI_FUNC(PyObject *)_PyList_FromStackRefStealOnSuccess(const union _PyStackRef *src, Py_ssize_t n);
7878
PyAPI_FUNC(PyObject *)_PyList_AsTupleAndClear(PyListObject *v);
7979

80+
// Export for '_testinternalcapi' shared extension
81+
PyAPI_FUNC(Py_ssize_t) _PyList_Capacity(PyListObject *self);
82+
8083
#ifdef __cplusplus
8184
}
8285
#endif

0 commit comments

Comments
 (0)