summaryrefslogtreecommitdiff
path: root/Include/modsupport.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-09 00:29:49 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-12-09 00:29:49 +0100
commite9abde4642451f17d98e43aacc2bac74f83451c3 (patch)
tree466818933aebd4a9fd82c97f436dc19f57aa3d89 /Include/modsupport.h
parentb551b6c9f083af7bffba224ca32e72175e7f8d54 (diff)
downloadcpython-git-e9abde4642451f17d98e43aacc2bac74f83451c3.tar.gz
Add _Py_VaBuildStack() function
Issue #28915: Similar to Py_VaBuildValue(), but work on a C array of PyObject*, instead of creating a tuple.
Diffstat (limited to 'Include/modsupport.h')
-rw-r--r--Include/modsupport.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Include/modsupport.h b/Include/modsupport.h
index 39be12864a..46f548228e 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -21,9 +21,16 @@ extern "C" {
#endif /* !Py_LIMITED_API */
#define Py_BuildValue _Py_BuildValue_SizeT
#define Py_VaBuildValue _Py_VaBuildValue_SizeT
+#define _Py_VaBuildStack _Py_VaBuildStack_SizeT
#else
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list);
+PyAPI_FUNC(PyObject **) _Py_VaBuildStack_SizeT(
+ PyObject **small_stack,
+ Py_ssize_t small_stack_len,
+ const char *format,
+ va_list va,
+ Py_ssize_t *p_nargs);
#endif /* !Py_LIMITED_API */
#endif
@@ -47,6 +54,12 @@ PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *,
const char *, char **, va_list);
#endif
PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list);
+PyAPI_FUNC(PyObject **) _Py_VaBuildStack(
+ PyObject **small_stack,
+ Py_ssize_t small_stack_len,
+ const char *format,
+ va_list va,
+ Py_ssize_t *p_nargs);
#ifndef Py_LIMITED_API
typedef struct _PyArg_Parser {