func,PyDict_MergeFromSeq2,3.2,,
func,PyDict_New,3.2,,
func,PyDict_Next,3.2,,
+func,PyDict_SetDefaultRef,3.15,,
func,PyDict_SetItem,3.2,,
func,PyDict_SetItemString,3.2,,
func,PyDict_Size,3.2,,
PyAPI_FUNC(PyObject *) PyDict_SetDefault(
PyObject *mp, PyObject *key, PyObject *defaultobj);
-// Inserts `key` with a value `default_value`, if `key` is not already present
-// in the dictionary. If `result` is not NULL, then the value associated
-// with `key` is returned in `*result` (either the existing value, or the now
-// inserted `default_value`).
-// Returns:
-// -1 on error
-// 0 if `key` was not present and `default_value` was inserted
-// 1 if `key` was present and `default_value` was not inserted
-PyAPI_FUNC(int) PyDict_SetDefaultRef(PyObject *mp, PyObject *key, PyObject *default_value, PyObject **result);
-
/* Get the number of items of a dictionary. */
static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
PyDictObject *mp;
PyAPI_FUNC(int) PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result);
#endif
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030F0000
+// Inserts `key` with a value `default_value`, if `key` is not already present
+// in the dictionary. If `result` is not NULL, then the value associated
+// with `key` is returned in `*result` (either the existing value, or the now
+// inserted `default_value`).
+// Returns:
+// -1 on error
+// 0 if `key` was not present and `default_value` was inserted
+// 1 if `key` was present and `default_value` was not inserted
+PyAPI_FUNC(int) PyDict_SetDefaultRef(PyObject *mp, PyObject *key, PyObject *default_value, PyObject **result);
+#endif
+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
#endif
"PyDict_MergeFromSeq2",
"PyDict_New",
"PyDict_Next",
+ "PyDict_SetDefaultRef",
"PyDict_SetItem",
"PyDict_SetItemString",
"PyDict_Size",
--- /dev/null
+Add :c:func:`PyDict_SetDefaultRef` to the Stable ABI.
added = '3.15'
[const.Py_mod_token]
added = '3.15'
+[function.PyDict_SetDefaultRef]
+ added = '3.15'
EXPORT_FUNC(PyDict_MergeFromSeq2)
EXPORT_FUNC(PyDict_New)
EXPORT_FUNC(PyDict_Next)
+EXPORT_FUNC(PyDict_SetDefaultRef)
EXPORT_FUNC(PyDict_SetItem)
EXPORT_FUNC(PyDict_SetItemString)
EXPORT_FUNC(PyDict_Size)