Add PyDict_Copy() function to C API for dicts. It returns a new

dictionary that contains the same key/value pairs as p.
This commit is contained in:
Jeremy Hylton 2000-03-30 22:27:31 +00:00
parent c06653f567
commit a12c7a7620
4 changed files with 25 additions and 2 deletions

View file

@ -2081,6 +2081,10 @@ Returns true if its argument is a \ctype{PyDictObject}.
Returns a new empty dictionary.
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyDict_Copy}{PyObject *p}
Returns a new dictionary that contains the same key/value pairs as p.
\end{cfuncdesc}
\begin{cfuncdesc}{void}{PyDict_Clear}{PyDictObject *p}
Empties an existing dictionary of all key/value pairs.
\end{cfuncdesc}

View file

@ -1,4 +1,4 @@
# Created by kip Montanaro <skip@mojam.com>.
# Created by Skip Montanaro <skip@mojam.com>.
# Format:
# function ':' type ':' [param name] ':' [refcount effect] ':' [comment]
@ -88,6 +88,9 @@ PyDict_Keys:PyDictObject*:p:0:
PyDict_New:PyObject*::+1:
PyDict_Copy:PyObject*::+1:
PyDict_Copy:PyObject*:p:0:
PyDict_Next:int:::
PyDict_Next:PyDictObject*:p:0:
PyDict_Next:int:ppos::