From fb88636199c12f63d6c8c89f311cdafc91f30d2f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 24 Apr 2010 18:21:17 +0000 Subject: 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. --- Include/modsupport.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Include/modsupport.h') diff --git a/Include/modsupport.h b/Include/modsupport.h index 23e8fa66a7..57886df890 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -27,6 +27,7 @@ PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...); PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3); PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, const char *, char **, ...); +PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *); PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...); PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...); -- cgit v1.2.1