summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-08 03:16:29 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-03-08 03:16:29 (GMT)
commit00e9886bd90490e1afc729a1abac384ba70fa6a1 (patch)
tree40c539d4a7866de9d9838a64c68e4a89c13d5a91 /Include
parent763edc1c6a5a212f876c5b6b018a1d2d2054a334 (diff)
downloadcpython-00e9886bd90490e1afc729a1abac384ba70fa6a1.zip
cpython-00e9886bd90490e1afc729a1abac384ba70fa6a1.tar.gz
cpython-00e9886bd90490e1afc729a1abac384ba70fa6a1.tar.bz2
Add PyDict_SetDefault. (closes #17327)
Patch by Stefan Behnel and I.
Diffstat (limited to 'Include')
-rw-r--r--Include/dictobject.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h
index d89aac8..16bd1d6 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -53,6 +53,8 @@ PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
PyAPI_FUNC(PyObject *) PyDict_GetItemWithError(PyObject *mp, PyObject *key);
PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp,
struct _Py_Identifier *key);
+PyAPI_FUNC(PyObject *) PyDict_SetDefault(
+ PyObject *mp, PyObject *key, PyObject *defaultobj);
PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);