diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-04-24 18:21:17 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-04-24 18:21:17 (GMT) |
commit | fb88636199c12f63d6c8c89f311cdafc91f30d2f (patch) | |
tree | 24b2758c45ac543fe9970f861ca091852a8f4a94 /Include/dictobject.h | |
parent | b962171414aa2cfe3dbfbd4294819a4153a7bd6c (diff) | |
download | cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.zip cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.tar.gz cpython-fb88636199c12f63d6c8c89f311cdafc91f30d2f.tar.bz2 |
prevent the dict constructor from accepting non-string keyword args #8419
This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments
are all strings, using an optimized method if possible.
Diffstat (limited to 'Include/dictobject.h')
-rw-r--r-- | Include/dictobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index d8c409e..5623379 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -126,6 +126,7 @@ PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key); PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, long hash); PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused); PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp); +PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp); /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */ PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other); |