From 07a1f65a9362810e186059ef96e5b9cb19cb9e44 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 24 Jan 2017 21:27:12 +0200 Subject: [PATCH] Issue #29083: Fixed the declaration of some public API functions. PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and Py_BuildValue() were not available in limited API of version < 3.3 when PY_SSIZE_T_CLEAN is defined. --- Include/modsupport.h | 10 +++++----- Misc/NEWS | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Include/modsupport.h b/Include/modsupport.h index 829aaf85968..6d4b6dcf2e7 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -29,18 +29,18 @@ PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...); PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...); PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, const char *, char **, ...); +PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list); +PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, va_list); +#endif 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 *, ...); -#endif + #ifndef Py_LIMITED_API PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kw); PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args); - -PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list); -PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, - const char *, char **, va_list); #endif PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list); diff --git a/Misc/NEWS b/Misc/NEWS index 19d90af1525..eb79d5c96f9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -37,6 +37,15 @@ Library leading dots could match related hostnames again (e.g. .b.c matches a.b.c). Patch by Milan Oberkirch. +C API +----- + +- Issue #29083: Fixed the declaration of some public API functions. + PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in + limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and + Py_BuildValue() were not available in limited API of version < 3.3 when + PY_SSIZE_T_CLEAN is defined. + What's New in Python 3.5.3? ===========================