summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-24 19:34:44 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-24 19:34:44 (GMT)
commit3831b0a0660621209ee3820e7a2752e69273aa4b (patch)
treed953fd7751a718300f1e9558ef0c901bf80514c9 /Include
parent4102d25b7eef868519b4c9b398690313cd36ef66 (diff)
parent07a1f65a9362810e186059ef96e5b9cb19cb9e44 (diff)
downloadcpython-3831b0a0660621209ee3820e7a2752e69273aa4b.zip
cpython-3831b0a0660621209ee3820e7a2752e69273aa4b.tar.gz
cpython-3831b0a0660621209ee3820e7a2752e69273aa4b.tar.bz2
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/modsupport.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h
index 833e33d..86719c6 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -15,10 +15,8 @@ extern "C" {
#define PyArg_Parse _PyArg_Parse_SizeT
#define PyArg_ParseTuple _PyArg_ParseTuple_SizeT
#define PyArg_ParseTupleAndKeywords _PyArg_ParseTupleAndKeywords_SizeT
-#ifndef Py_LIMITED_API
#define PyArg_VaParse _PyArg_VaParse_SizeT
#define PyArg_VaParseTupleAndKeywords _PyArg_VaParseTupleAndKeywords_SizeT
-#endif /* !Py_LIMITED_API */
#define Py_BuildValue _Py_BuildValue_SizeT
#define Py_VaBuildValue _Py_VaBuildValue_SizeT
#else
@@ -33,18 +31,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);