diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 811b1bd84d24174..c1991188a7b3023 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -334,6 +334,8 @@ var,PyListIter_Type,3.2,, var,PyListRevIter_Type,3.2,, function,PyList_Append,3.2,, function,PyList_AsTuple,3.2,, +function,PyList_Clear,3.13,, +function,PyList_Extend,3.13,, function,PyList_GetItem,3.2,, function,PyList_GetSlice,3.2,, function,PyList_Insert,3.2,, diff --git a/Include/listobject.h b/Include/listobject.h index 0883c554db1e67c..04b15a00ededf46 100644 --- a/Include/listobject.h +++ b/Include/listobject.h @@ -35,8 +35,11 @@ PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); + +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000 PyAPI_FUNC(int) PyList_Extend(PyObject *self, PyObject *iterable); PyAPI_FUNC(int) PyList_Clear(PyObject *self); +#endif PyAPI_FUNC(int) PyList_Sort(PyObject *); PyAPI_FUNC(int) PyList_Reverse(PyObject *); diff --git a/Lib/test/test_stable_abi_ctypes.py b/Lib/test/test_stable_abi_ctypes.py index 4976ac3642bbe46..d56ca5cbd649260 100644 --- a/Lib/test/test_stable_abi_ctypes.py +++ b/Lib/test/test_stable_abi_ctypes.py @@ -363,6 +363,8 @@ def test_windows_feature_macros(self): "PyListRevIter_Type", "PyList_Append", "PyList_AsTuple", + "PyList_Clear", + "PyList_Extend", "PyList_GetItem", "PyList_GetSlice", "PyList_Insert", diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index 22b25dd0ec141fd..3a4ea5223271dca 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -2481,3 +2481,7 @@ [function._Py_SetRefcnt] added = '3.13' abi_only = true +[function.PyList_Clear] + added = '3.13' +[function.PyList_Extend] + added = '3.13' diff --git a/PC/python3dll.c b/PC/python3dll.c index 07aa84c91f9fc7f..2addca9b9d00b58 100755 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -323,6 +323,8 @@ EXPORT_FUNC(PyIter_Next) EXPORT_FUNC(PyIter_Send) EXPORT_FUNC(PyList_Append) EXPORT_FUNC(PyList_AsTuple) +EXPORT_FUNC(PyList_Clear) +EXPORT_FUNC(PyList_Extend) EXPORT_FUNC(PyList_GetItem) EXPORT_FUNC(PyList_GetSlice) EXPORT_FUNC(PyList_Insert)