mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add _PyArg_ParseStack() helper function
Issue #29286. Function similar to PyArg_ParseTuple(), but uses a C array of PyObject* to pass arguments. Don't support the compatibility mode.
This commit is contained in:
parent
3e1fad6913
commit
6518a93cb1
2 changed files with 82 additions and 24 deletions
|
@ -79,17 +79,27 @@ typedef struct _PyArg_Parser {
|
|||
} _PyArg_Parser;
|
||||
#ifdef PY_SSIZE_T_CLEAN
|
||||
#define _PyArg_ParseTupleAndKeywordsFast _PyArg_ParseTupleAndKeywordsFast_SizeT
|
||||
#define _PyArg_ParseStack _PyArg_ParseStack_SizeT
|
||||
#define _PyArg_ParseStackAndKeywords _PyArg_ParseStackAndKeywords_SizeT
|
||||
#define _PyArg_VaParseTupleAndKeywordsFast _PyArg_VaParseTupleAndKeywordsFast_SizeT
|
||||
#endif
|
||||
PyAPI_FUNC(int) _PyArg_ParseTupleAndKeywordsFast(PyObject *, PyObject *,
|
||||
struct _PyArg_Parser *, ...);
|
||||
PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords(PyObject **args, Py_ssize_t nargs, PyObject *kwnames,
|
||||
struct _PyArg_Parser *, ...);
|
||||
PyAPI_FUNC(int) _PyArg_ParseStack(
|
||||
PyObject **args,
|
||||
Py_ssize_t nargs,
|
||||
const char *format,
|
||||
...);
|
||||
PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords(
|
||||
PyObject **args,
|
||||
Py_ssize_t nargs,
|
||||
PyObject *kwnames,
|
||||
struct _PyArg_Parser *,
|
||||
...);
|
||||
PyAPI_FUNC(int) _PyArg_VaParseTupleAndKeywordsFast(PyObject *, PyObject *,
|
||||
struct _PyArg_Parser *, va_list);
|
||||
void _PyArg_Fini(void);
|
||||
#endif
|
||||
#endif /* Py_LIMITED_API */
|
||||
|
||||
PyAPI_FUNC(int) PyModule_AddObject(PyObject *, const char *, PyObject *);
|
||||
PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, const char *, long);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue