From 3e1fad6913689f1cbb08657ee5f65439a4639303 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 17 Jan 2017 01:29:01 +0100 Subject: Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords Issue #29286. --- Include/abstract.h | 4 +- Include/modsupport.h | 4 +- Modules/_io/clinic/_iomodule.c.h | 2 +- Modules/_io/clinic/textio.c.h | 2 +- Modules/_sha3/clinic/sha3module.c.h | 4 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 8 +- Modules/clinic/_asynciomodule.c.h | 12 +-- Modules/clinic/_bz2module.c.h | 2 +- Modules/clinic/_codecsmodule.c.h | 4 +- Modules/clinic/_datetimemodule.c.h | 2 +- Modules/clinic/_elementtree.c.h | 12 +-- Modules/clinic/_hashopenssl.c.h | 2 +- Modules/clinic/_lzmamodule.c.h | 2 +- Modules/clinic/_pickle.c.h | 8 +- Modules/clinic/_sre.c.h | 30 +++---- Modules/clinic/_ssl.c.h | 16 ++-- Modules/clinic/_winapi.c.h | 6 +- Modules/clinic/binascii.c.h | 6 +- Modules/clinic/cmathmodule.c.h | 2 +- Modules/clinic/grpmodule.c.h | 4 +- Modules/clinic/md5module.c.h | 2 +- Modules/clinic/posixmodule.c.h | 134 ++++++++++++++-------------- Modules/clinic/pyexpat.c.h | 2 +- Modules/clinic/sha1module.c.h | 2 +- Modules/clinic/sha256module.c.h | 4 +- Modules/clinic/sha512module.c.h | 4 +- Modules/clinic/zlibmodule.c.h | 10 +-- Objects/abstract.c | 2 +- Objects/clinic/bytearrayobject.c.h | 10 +-- Objects/clinic/bytesobject.c.h | 10 +-- Objects/clinic/unicodeobject.c.h | 10 +-- PC/clinic/_testconsole.c.h | 4 +- PC/clinic/winreg.c.h | 10 +-- PC/clinic/winsound.c.h | 6 +- Python/clinic/_warnings.c.h | 2 +- Python/clinic/bltinmodule.c.h | 2 +- Python/getargs.c | 6 +- Tools/clinic/clinic.py | 2 +- 38 files changed, 177 insertions(+), 177 deletions(-) diff --git a/Include/abstract.h b/Include/abstract.h index d96e8a5..43bf251 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -171,7 +171,7 @@ PyAPI_FUNC(PyObject*) _PyStack_AsTupleSlice( kwnames must only contains str strings, no subclass, and all keys must be unique. kwnames is not checked, usually these checks are done before or - later calling _PyStack_AsDict(). For example, _PyArg_ParseStack() raises an + later calling _PyStack_AsDict(). For example, _PyArg_ParseStackAndKeywords() raises an error if a key is not a string. */ PyAPI_FUNC(PyObject *) _PyStack_AsDict( PyObject **values, @@ -185,7 +185,7 @@ PyAPI_FUNC(PyObject *) _PyStack_AsDict( The stack uses borrowed references. The type of keyword keys is not checked, these checks should be done - later (ex: _PyArg_ParseStack). */ + later (ex: _PyArg_ParseStackAndKeywords). */ PyAPI_FUNC(PyObject **) _PyStack_UnpackDict( PyObject **args, Py_ssize_t nargs, diff --git a/Include/modsupport.h b/Include/modsupport.h index 8306ae7..188f0b1 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -79,12 +79,12 @@ 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_ParseStack(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, +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); diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index f2e91a9..e60562c 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -149,7 +149,7 @@ _io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int closefd = 1; PyObject *opener = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener)) { goto exit; } diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index f39c355..96696c3 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -61,7 +61,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject **args, Py PyObject *input; int final = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &input, &final)) { goto exit; } diff --git a/Modules/_sha3/clinic/sha3module.c.h b/Modules/_sha3/clinic/sha3module.c.h index 7688e7d..5d073d8 100644 --- a/Modules/_sha3/clinic/sha3module.c.h +++ b/Modules/_sha3/clinic/sha3module.c.h @@ -112,7 +112,7 @@ _sha3_shake_128_digest(SHA3object *self, PyObject **args, Py_ssize_t nargs, PyOb static _PyArg_Parser _parser = {"k:digest", _keywords, 0}; unsigned long length; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &length)) { goto exit; } @@ -142,7 +142,7 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject **args, Py_ssize_t nargs, P static _PyArg_Parser _parser = {"k:hexdigest", _keywords, 0}; unsigned long length; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &length)) { goto exit; } diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index 84ffd12..f3571c4 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -30,7 +30,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject **arg PyObject *input; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &input, &errors)) { goto exit; } @@ -68,7 +68,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject **arg Py_buffer input = {NULL, NULL}; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &input, &errors)) { goto exit; } @@ -105,7 +105,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb PyObject *input; int final = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &input, &final)) { goto exit; } @@ -154,7 +154,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb Py_buffer input = {NULL, NULL}; int final = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &input, &final)) { goto exit; } diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 052d252..13decff 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -280,7 +280,7 @@ _asyncio_Task_current_task(PyTypeObject *type, PyObject **args, Py_ssize_t nargs static _PyArg_Parser _parser = {"|O:current_task", _keywords, 0}; PyObject *loop = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &loop)) { goto exit; } @@ -312,7 +312,7 @@ _asyncio_Task_all_tasks(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, P static _PyArg_Parser _parser = {"|O:all_tasks", _keywords, 0}; PyObject *loop = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &loop)) { goto exit; } @@ -412,7 +412,7 @@ _asyncio_Task_get_stack(TaskObj *self, PyObject **args, Py_ssize_t nargs, PyObje static _PyArg_Parser _parser = {"|$O:get_stack", _keywords, 0}; PyObject *limit = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &limit)) { goto exit; } @@ -450,7 +450,7 @@ _asyncio_Task_print_stack(TaskObj *self, PyObject **args, Py_ssize_t nargs, PyOb PyObject *limit = Py_None; PyObject *file = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &limit, &file)) { goto exit; } @@ -479,7 +479,7 @@ _asyncio_Task__step(TaskObj *self, PyObject **args, Py_ssize_t nargs, PyObject * static _PyArg_Parser _parser = {"|O:_step", _keywords, 0}; PyObject *exc = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &exc)) { goto exit; } @@ -508,7 +508,7 @@ _asyncio_Task__wakeup(TaskObj *self, PyObject **args, Py_ssize_t nargs, PyObject static _PyArg_Parser _parser = {"O:_wakeup", _keywords, 0}; PyObject *fut; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fut)) { goto exit; } diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 1ca810c..967bd77 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -130,7 +130,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject **args, Py_ssize Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &max_length)) { goto exit; } diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index 056287d..2b10639 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -71,7 +71,7 @@ _codecs_encode(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw const char *encoding = NULL; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &obj, &encoding, &errors)) { goto exit; } @@ -110,7 +110,7 @@ _codecs_decode(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw const char *encoding = NULL; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &obj, &encoding, &errors)) { goto exit; } diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index dcb992b..6cbcdea 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -27,7 +27,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyO static _PyArg_Parser _parser = {"|O:now", _keywords, 0}; PyObject *tz = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &tz)) { goto exit; } diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 1b309cd..fe2b91c 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -151,7 +151,7 @@ _elementtree_Element_find(ElementObject *self, PyObject **args, Py_ssize_t nargs PyObject *path; PyObject *namespaces = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path, &namespaces)) { goto exit; } @@ -184,7 +184,7 @@ _elementtree_Element_findtext(ElementObject *self, PyObject **args, Py_ssize_t n PyObject *default_value = Py_None; PyObject *namespaces = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path, &default_value, &namespaces)) { goto exit; } @@ -215,7 +215,7 @@ _elementtree_Element_findall(ElementObject *self, PyObject **args, Py_ssize_t na PyObject *path; PyObject *namespaces = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path, &namespaces)) { goto exit; } @@ -246,7 +246,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyObject **args, Py_ssize_t n PyObject *path; PyObject *namespaces = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path, &namespaces)) { goto exit; } @@ -277,7 +277,7 @@ _elementtree_Element_get(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *key; PyObject *default_value = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &key, &default_value)) { goto exit; } @@ -323,7 +323,7 @@ _elementtree_Element_iter(ElementObject *self, PyObject **args, Py_ssize_t nargs static _PyArg_Parser _parser = {"|O:iter", _keywords, 0}; PyObject *tag = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &tag)) { goto exit; } diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 0445352..ecb5ba4 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -33,7 +33,7 @@ _hashlib_scrypt(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k long maxmem = 0; long dklen = 64; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &password, &salt, &PyLong_Type, &n_obj, &PyLong_Type, &r_obj, &PyLong_Type, &p_obj, &maxmem, &dklen)) { goto exit; } diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 9e60759..29116cb 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -96,7 +96,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject **args, Py_ssize_ Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &max_length)) { goto exit; } diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 9ad4c37..9f2a94a 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -401,7 +401,7 @@ _pickle_dump(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna PyObject *protocol = NULL; int fix_imports = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &obj, &file, &protocol, &fix_imports)) { goto exit; } @@ -446,7 +446,7 @@ _pickle_dumps(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn PyObject *protocol = NULL; int fix_imports = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &obj, &protocol, &fix_imports)) { goto exit; } @@ -503,7 +503,7 @@ _pickle_load(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna const char *encoding = "ASCII"; const char *errors = "strict"; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &file, &fix_imports, &encoding, &errors)) { goto exit; } @@ -551,7 +551,7 @@ _pickle_loads(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn const char *encoding = "ASCII"; const char *errors = "strict"; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &fix_imports, &encoding, &errors)) { goto exit; } diff --git a/Modules/clinic/_sre.c.h b/Modules/clinic/_sre.c.h index f664652..f836231 100644 --- a/Modules/clinic/_sre.c.h +++ b/Modules/clinic/_sre.c.h @@ -85,7 +85,7 @@ _sre_SRE_Pattern_match(PatternObject *self, PyObject **args, Py_ssize_t nargs, P Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -118,7 +118,7 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyObject **args, Py_ssize_t narg Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -153,7 +153,7 @@ _sre_SRE_Pattern_search(PatternObject *self, PyObject **args, Py_ssize_t nargs, Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -186,7 +186,7 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject **args, Py_ssize_t nargs, Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -221,7 +221,7 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyObject **args, Py_ssize_t nargs Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -253,7 +253,7 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyObject **args, Py_ssize_t nargs, Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &pos, &endpos)) { goto exit; } @@ -285,7 +285,7 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject **args, Py_ssize_t nargs, P PyObject *string; Py_ssize_t maxsplit = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string, &maxsplit)) { goto exit; } @@ -318,7 +318,7 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyObject **args, Py_ssize_t nargs, PyO PyObject *string; Py_ssize_t count = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &repl, &string, &count)) { goto exit; } @@ -351,7 +351,7 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyObject **args, Py_ssize_t nargs, Py PyObject *string; Py_ssize_t count = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &repl, &string, &count)) { goto exit; } @@ -397,7 +397,7 @@ _sre_SRE_Pattern___deepcopy__(PatternObject *self, PyObject **args, Py_ssize_t n static _PyArg_Parser _parser = {"O:__deepcopy__", _keywords, 0}; PyObject *memo; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &memo)) { goto exit; } @@ -434,7 +434,7 @@ _sre_compile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna PyObject *groupindex; PyObject *indexgroup; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &pattern, &flags, &PyList_Type, &code, &groups, &PyDict_Type, &groupindex, &PyTuple_Type, &indexgroup)) { goto exit; } @@ -464,7 +464,7 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyOb static _PyArg_Parser _parser = {"O:expand", _keywords, 0}; PyObject *template; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &template)) { goto exit; } @@ -497,7 +497,7 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyOb static _PyArg_Parser _parser = {"|O:groups", _keywords, 0}; PyObject *default_value = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &default_value)) { goto exit; } @@ -530,7 +530,7 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject **args, Py_ssize_t nargs, P static _PyArg_Parser _parser = {"|O:groupdict", _keywords, 0}; PyObject *default_value = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &default_value)) { goto exit; } @@ -673,7 +673,7 @@ _sre_SRE_Match___deepcopy__(MatchObject *self, PyObject **args, Py_ssize_t nargs static _PyArg_Parser _parser = {"O:__deepcopy__", _keywords, 0}; PyObject *memo; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &memo)) { goto exit; } diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 29f5838..fcebde8 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -485,7 +485,7 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject **args, Py_ssize_t PyObject *keyfile = NULL; PyObject *password = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &certfile, &keyfile, &password)) { goto exit; } @@ -519,7 +519,7 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject **args, Py_s PyObject *capath = NULL; PyObject *cadata = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &cafile, &capath, &cadata)) { goto exit; } @@ -559,7 +559,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject **args, Py_ssize_t na int server_side; PyObject *hostname_obj = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, PySocketModule.Sock_Type, &sock, &server_side, &hostname_obj)) { goto exit; } @@ -594,7 +594,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject **args, Py_ssize_t nargs int server_side; PyObject *hostname_obj = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &PySSLMemoryBIO_Type, &incoming, &PySSLMemoryBIO_Type, &outgoing, &server_side, &hostname_obj)) { goto exit; } @@ -713,7 +713,7 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject **args, Py_ssize_t na static _PyArg_Parser _parser = {"|p:get_ca_certs", _keywords, 0}; int binary_form = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &binary_form)) { goto exit; } @@ -1025,7 +1025,7 @@ _ssl_txt2obj(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna const char *txt; int name = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &txt, &name)) { goto exit; } @@ -1090,7 +1090,7 @@ _ssl_enum_certificates(PyObject *module, PyObject **args, Py_ssize_t nargs, PyOb static _PyArg_Parser _parser = {"s:enum_certificates", _keywords, 0}; const char *store_name; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &store_name)) { goto exit; } @@ -1129,7 +1129,7 @@ _ssl_enum_crls(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"s:enum_crls", _keywords, 0}; const char *store_name; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &store_name)) { goto exit; } diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index 5bfbaf0..94f8885 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -110,7 +110,7 @@ _winapi_ConnectNamedPipe(PyObject *module, PyObject **args, Py_ssize_t nargs, Py HANDLE handle; int use_overlapped = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &handle, &use_overlapped)) { goto exit; } @@ -686,7 +686,7 @@ _winapi_ReadFile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject * int size; int use_overlapped = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &handle, &size, &use_overlapped)) { goto exit; } @@ -880,7 +880,7 @@ _winapi_WriteFile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject PyObject *buffer; int use_overlapped = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &handle, &buffer, &use_overlapped)) { goto exit; } diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 743bf46..b457ff8 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -117,7 +117,7 @@ binascii_b2a_base64(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObjec Py_buffer data = {NULL, NULL}; int newline = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &newline)) { goto exit; } @@ -494,7 +494,7 @@ binascii_a2b_qp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k Py_buffer data = {NULL, NULL}; int header = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, ascii_buffer_converter, &data, &header)) { goto exit; } @@ -536,7 +536,7 @@ binascii_b2a_qp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k int istext = 1; int header = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, "etabs, &istext, &header)) { goto exit; } diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index 05431fa..3955a27 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -869,7 +869,7 @@ cmath_isclose(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn double abs_tol = 0.0; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &a, &b, &rel_tol, &abs_tol)) { goto exit; } diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h index 0282b4e..d774d88 100644 --- a/Modules/clinic/grpmodule.c.h +++ b/Modules/clinic/grpmodule.c.h @@ -24,7 +24,7 @@ grp_getgrgid(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna static _PyArg_Parser _parser = {"O:getgrgid", _keywords, 0}; PyObject *id; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &id)) { goto exit; } @@ -56,7 +56,7 @@ grp_getgrnam(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna static _PyArg_Parser _parser = {"U:getgrnam", _keywords, 0}; PyObject *name; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &name)) { goto exit; } diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index a841fe5..eb12039 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -85,7 +85,7 @@ _md5_md5(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"|O:md5", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 2c0074a..9b98dd2 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -42,7 +42,7 @@ os_stat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) { goto exit; } @@ -79,7 +79,7 @@ os_lstat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) path_t path = PATH_T_INITIALIZE("lstat", "path", 0, 0); int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -144,7 +144,7 @@ os_access(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames int follow_symlinks = 1; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode, FACCESSAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks)) { goto exit; } @@ -246,7 +246,7 @@ os_chdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"O&:chdir", _keywords, 0}; path_t path = PATH_T_INITIALIZE("chdir", "path", 0, PATH_HAVE_FCHDIR); - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path)) { goto exit; } @@ -284,7 +284,7 @@ os_fchdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames static _PyArg_Parser _parser = {"O&:fchdir", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, fildes_converter, &fd)) { goto exit; } @@ -340,7 +340,7 @@ os_chmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode, FCHMODAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) { goto exit; } @@ -378,7 +378,7 @@ os_fchmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames int fd; int mode; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd, &mode)) { goto exit; } @@ -416,7 +416,7 @@ os_lchmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames path_t path = PATH_T_INITIALIZE("lchmod", "path", 0, 0); int mode; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode)) { goto exit; } @@ -462,7 +462,7 @@ os_chflags(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname unsigned long flags; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &flags, &follow_symlinks)) { goto exit; } @@ -503,7 +503,7 @@ os_lchflags(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam path_t path = PATH_T_INITIALIZE("lchflags", "path", 0, 0); unsigned long flags; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &flags)) { goto exit; } @@ -540,7 +540,7 @@ os_chroot(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames static _PyArg_Parser _parser = {"O&:chroot", _keywords, 0}; path_t path = PATH_T_INITIALIZE("chroot", "path", 0, 0); - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path)) { goto exit; } @@ -577,7 +577,7 @@ os_fsync(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"O&:fsync", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, fildes_converter, &fd)) { goto exit; } @@ -633,7 +633,7 @@ os_fdatasync(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna static _PyArg_Parser _parser = {"O&:fdatasync", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, fildes_converter, &fd)) { goto exit; } @@ -696,7 +696,7 @@ os_chown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid, FCHOWNAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) { goto exit; } @@ -737,7 +737,7 @@ os_fchown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames uid_t uid; gid_t gid; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) { goto exit; } @@ -776,7 +776,7 @@ os_lchown(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames uid_t uid; gid_t gid; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid)) { goto exit; } @@ -865,7 +865,7 @@ os_link(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dst_dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd, &follow_symlinks)) { goto exit; } @@ -913,7 +913,7 @@ os_listdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname static _PyArg_Parser _parser = {"|O&:listdir", _keywords, 0}; path_t path = PATH_T_INITIALIZE("listdir", "path", 1, PATH_HAVE_FDOPENDIR); - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path)) { goto exit; } @@ -1046,7 +1046,7 @@ os__getvolumepathname(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObj static _PyArg_Parser _parser = {"U:_getvolumepathname", _keywords, 0}; PyObject *path; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path)) { goto exit; } @@ -1087,7 +1087,7 @@ os_mkdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int mode = 511; int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode, MKDIRAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -1154,7 +1154,7 @@ os_getpriority(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw int which; int who; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &which, &who)) { goto exit; } @@ -1190,7 +1190,7 @@ os_setpriority(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw int who; int priority; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &which, &who, &priority)) { goto exit; } @@ -1232,7 +1232,7 @@ os_rename(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) { goto exit; } @@ -1277,7 +1277,7 @@ os_replace(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd)) { goto exit; } @@ -1318,7 +1318,7 @@ os_rmdir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) path_t path = PATH_T_INITIALIZE("rmdir", "path", 0, 0); int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -1354,7 +1354,7 @@ os_system(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames Py_UNICODE *command; long _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &command)) { goto exit; } @@ -1393,7 +1393,7 @@ os_system(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames PyObject *command = NULL; long _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, PyUnicode_FSConverter, &command)) { goto exit; } @@ -1465,7 +1465,7 @@ os_unlink(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames path_t path = PATH_T_INITIALIZE("unlink", "path", 0, 0); int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -1504,7 +1504,7 @@ os_remove(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames path_t path = PATH_T_INITIALIZE("remove", "path", 0, 0); int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -1590,7 +1590,7 @@ os_utime(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, ×, &ns, FUTIMENSAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks)) { goto exit; } @@ -1623,7 +1623,7 @@ os__exit(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"i:_exit", _keywords, 0}; int status; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -1705,7 +1705,7 @@ os_execve(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames PyObject *argv; PyObject *env; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &argv, &env)) { goto exit; } @@ -1882,7 +1882,7 @@ os_sched_get_priority_max(PyObject *module, PyObject **args, Py_ssize_t nargs, P static _PyArg_Parser _parser = {"i:sched_get_priority_max", _keywords, 0}; int policy; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &policy)) { goto exit; } @@ -1916,7 +1916,7 @@ os_sched_get_priority_min(PyObject *module, PyObject **args, Py_ssize_t nargs, P static _PyArg_Parser _parser = {"i:sched_get_priority_min", _keywords, 0}; int policy; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &policy)) { goto exit; } @@ -2416,7 +2416,7 @@ os_getpgid(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname static _PyArg_Parser _parser = {"" _Py_PARSE_PID ":getpgid", _keywords, 0}; pid_t pid; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &pid)) { goto exit; } @@ -2866,7 +2866,7 @@ os_wait3(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"i:wait3", _keywords, 0}; int options; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &options)) { goto exit; } @@ -2904,7 +2904,7 @@ os_wait4(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) pid_t pid; int options; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &pid, &options)) { goto exit; } @@ -3098,7 +3098,7 @@ os_symlink(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname int target_is_directory = 0; int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &src, path_converter, &dst, &target_is_directory, SYMLINKAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -3320,7 +3320,7 @@ os_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int dir_fd = DEFAULT_DIR_FD; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &flags, &mode, OPENAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -3357,7 +3357,7 @@ os_close(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"i:close", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd)) { goto exit; } @@ -3450,7 +3450,7 @@ os_dup2(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) int fd2; int inheritable = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd, &fd2, &inheritable)) { goto exit; } @@ -3713,7 +3713,7 @@ os_fstat(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static _PyArg_Parser _parser = {"i:fstat", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd)) { goto exit; } @@ -3938,7 +3938,7 @@ os_mkfifo(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames int mode = 438; int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode, MKFIFOAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -3991,7 +3991,7 @@ os_mknod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) dev_t device = 0; int dir_fd = DEFAULT_DIR_FD; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &mode, _Py_Dev_Converter, &device, MKNODAT_DIR_FD_CONVERTER, &dir_fd)) { goto exit; } @@ -4175,7 +4175,7 @@ os_truncate(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam path_t path = PATH_T_INITIALIZE("truncate", "path", 0, PATH_HAVE_FTRUNCATE); Py_off_t length; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, Py_off_t_converter, &length)) { goto exit; } @@ -4466,7 +4466,7 @@ os_WIFCONTINUED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4505,7 +4505,7 @@ os_WIFSTOPPED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4544,7 +4544,7 @@ os_WIFSIGNALED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4583,7 +4583,7 @@ os_WIFEXITED(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4622,7 +4622,7 @@ os_WEXITSTATUS(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4661,7 +4661,7 @@ os_WTERMSIG(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4700,7 +4700,7 @@ os_WSTOPSIG(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam int status; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &status)) { goto exit; } @@ -4775,7 +4775,7 @@ os_statvfs(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname static _PyArg_Parser _parser = {"O&:statvfs", _keywords, 0}; path_t path = PATH_T_INITIALIZE("statvfs", "path", 0, PATH_HAVE_FSTATVFS); - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path)) { goto exit; } @@ -4812,7 +4812,7 @@ os__getdiskusage(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject * static _PyArg_Parser _parser = {"u:_getdiskusage", _keywords, 0}; Py_UNICODE *path; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path)) { goto exit; } @@ -4892,7 +4892,7 @@ os_pathconf(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam int name; long _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, conv_path_confname, &name)) { goto exit; } @@ -5039,7 +5039,7 @@ os_startfile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna path_t filepath = PATH_T_INITIALIZE("startfile", "filepath", 0, 0); Py_UNICODE *operation = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &filepath, &operation)) { goto exit; } @@ -5103,7 +5103,7 @@ os_device_encoding(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject static _PyArg_Parser _parser = {"i:device_encoding", _keywords, 0}; int fd; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &fd)) { goto exit; } @@ -5255,7 +5255,7 @@ os_getxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam path_t attribute = PATH_T_INITIALIZE("getxattr", "attribute", 0, 0); int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, path_converter, &attribute, &follow_symlinks)) { goto exit; } @@ -5305,7 +5305,7 @@ os_setxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam int flags = 0; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, path_converter, &attribute, &value, &flags, &follow_symlinks)) { goto exit; } @@ -5356,7 +5356,7 @@ os_removexattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw path_t attribute = PATH_T_INITIALIZE("removexattr", "attribute", 0, 0); int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, path_converter, &attribute, &follow_symlinks)) { goto exit; } @@ -5402,7 +5402,7 @@ os_listxattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna path_t path = PATH_T_INITIALIZE("listxattr", "path", 1, 1); int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path, &follow_symlinks)) { goto exit; } @@ -5645,7 +5645,7 @@ os_DirEntry_stat(DirEntry *self, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"|$p:stat", _keywords, 0}; int follow_symlinks = 1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &follow_symlinks)) { goto exit; } @@ -5676,7 +5676,7 @@ os_DirEntry_is_dir(DirEntry *self, PyObject **args, Py_ssize_t nargs, PyObject * int follow_symlinks = 1; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &follow_symlinks)) { goto exit; } @@ -5711,7 +5711,7 @@ os_DirEntry_is_file(DirEntry *self, PyObject **args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; int _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &follow_symlinks)) { goto exit; } @@ -5787,7 +5787,7 @@ os_scandir(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname static _PyArg_Parser _parser = {"|O&:scandir", _keywords, 0}; path_t path = PATH_T_INITIALIZE("scandir", "path", 1, 0); - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, path_converter, &path)) { goto exit; } @@ -5824,7 +5824,7 @@ os_fspath(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames static _PyArg_Parser _parser = {"O:fspath", _keywords, 0}; PyObject *path; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &path)) { goto exit; } @@ -5857,7 +5857,7 @@ os_getrandom(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna Py_ssize_t size; int flags = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &size, &flags)) { goto exit; } diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 75a096c..35a20ca 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -249,7 +249,7 @@ pyexpat_ParserCreate(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObje const char *namespace_separator = NULL; PyObject *intern = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &encoding, &namespace_separator, &intern)) { goto exit; } diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index b08e92d..af48540 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -85,7 +85,7 @@ _sha1_sha1(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname static _PyArg_Parser _parser = {"|O:sha1", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h index 115db50..1959713 100644 --- a/Modules/clinic/sha256module.c.h +++ b/Modules/clinic/sha256module.c.h @@ -85,7 +85,7 @@ _sha256_sha256(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"|O:sha256", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } @@ -115,7 +115,7 @@ _sha256_sha224(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"|O:sha224", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h index a2b57f7..d1c4f04 100644 --- a/Modules/clinic/sha512module.c.h +++ b/Modules/clinic/sha512module.c.h @@ -85,7 +85,7 @@ _sha512_sha512(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"|O:sha512", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } @@ -115,7 +115,7 @@ _sha512_sha384(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw static _PyArg_Parser _parser = {"|O:sha384", _keywords, 0}; PyObject *string = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &string)) { goto exit; } diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index fda392a..65df6a2 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -28,7 +28,7 @@ zlib_compress(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn Py_buffer data = {NULL, NULL}; int level = Z_DEFAULT_COMPRESSION; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &level)) { goto exit; } @@ -73,7 +73,7 @@ zlib_decompress(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k int wbits = MAX_WBITS; Py_ssize_t bufsize = DEF_BUF_SIZE; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, &wbits, ssize_t_converter, &bufsize)) { goto exit; } @@ -138,7 +138,7 @@ zlib_compressobj(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject * int strategy = Z_DEFAULT_STRATEGY; Py_buffer zdict = {NULL, NULL}; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &level, &method, &wbits, &memLevel, &strategy, &zdict)) { goto exit; } @@ -180,7 +180,7 @@ zlib_decompressobj(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject int wbits = MAX_WBITS; PyObject *zdict = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &wbits, &zdict)) { goto exit; } @@ -262,7 +262,7 @@ zlib_Decompress_decompress(compobject *self, PyObject **args, Py_ssize_t nargs, Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &data, ssize_t_converter, &max_length)) { goto exit; } diff --git a/Objects/abstract.c b/Objects/abstract.c index bba946e..48fdf65 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2485,7 +2485,7 @@ _PyObject_FastCallKeywords(PyObject *callable, PyObject **stack, Py_ssize_t narg /* kwnames must only contains str strings, no subclass, and all keys must be unique: these checks are implemented in Python/ceval.c and - _PyArg_ParseStack(). */ + _PyArg_ParseStackAndKeywords(). */ if (PyFunction_Check(callable)) { return _PyFunction_FastCallKeywords(callable, stack, nargs, kwnames); diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index c75acb7..4ab4329 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -66,7 +66,7 @@ bytearray_translate(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *table; PyObject *deletechars = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &table, &deletechars)) { goto exit; } @@ -196,7 +196,7 @@ bytearray_split(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyOb PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -270,7 +270,7 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyO PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -562,7 +562,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyO const char *encoding = NULL; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &encoding, &errors)) { goto exit; } @@ -608,7 +608,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, static _PyArg_Parser _parser = {"|i:splitlines", _keywords, 0}; int keepends = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &keepends)) { goto exit; } diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index a11ebd2..dd1ec91 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -31,7 +31,7 @@ bytes_split(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kw PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -150,7 +150,7 @@ bytes_rsplit(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *k PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -296,7 +296,7 @@ bytes_translate(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject PyObject *table; PyObject *deletechars = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &table, &deletechars)) { goto exit; } @@ -427,7 +427,7 @@ bytes_decode(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *k const char *encoding = NULL; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &encoding, &errors)) { goto exit; } @@ -460,7 +460,7 @@ bytes_splitlines(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObjec static _PyArg_Parser _parser = {"|i:splitlines", _keywords, 0}; int keepends = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &keepends)) { goto exit; } diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 610178d..b2d91b7 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -123,7 +123,7 @@ unicode_encode(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwna const char *encoding = NULL; const char *errors = NULL; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &encoding, &errors)) { goto exit; } @@ -155,7 +155,7 @@ unicode_expandtabs(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject * static _PyArg_Parser _parser = {"|i:expandtabs", _keywords, 0}; int tabsize = 8; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &tabsize)) { goto exit; } @@ -650,7 +650,7 @@ unicode_split(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnam PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -723,7 +723,7 @@ unicode_rsplit(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwna PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sep, &maxsplit)) { goto exit; } @@ -756,7 +756,7 @@ unicode_splitlines(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject * static _PyArg_Parser _parser = {"|i:splitlines", _keywords, 0}; int keepends = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &keepends)) { goto exit; } diff --git a/PC/clinic/_testconsole.c.h b/PC/clinic/_testconsole.c.h index 93860cf..2774616 100644 --- a/PC/clinic/_testconsole.c.h +++ b/PC/clinic/_testconsole.c.h @@ -26,7 +26,7 @@ _testconsole_write_input(PyObject *module, PyObject **args, Py_ssize_t nargs, Py PyObject *file; PyBytesObject *s; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &file, &s)) { goto exit; } @@ -60,7 +60,7 @@ _testconsole_read_output(PyObject *module, PyObject **args, Py_ssize_t nargs, Py static _PyArg_Parser _parser = {"O:read_output", _keywords, 0}; PyObject *file; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &file)) { goto exit; } diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index c7d5b9e..e05d700 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -93,7 +93,7 @@ winreg_HKEYType___exit__(PyHKEYObject *self, PyObject **args, Py_ssize_t nargs, PyObject *exc_value; PyObject *traceback; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &exc_type, &exc_value, &traceback)) { goto exit; } @@ -253,7 +253,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject REGSAM access = KEY_WRITE; HKEY _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) { goto exit; } @@ -351,7 +351,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject REGSAM access = KEY_WOW64_64KEY; int reserved = 0; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, clinic_HKEY_converter, &key, &sub_key, &access, &reserved)) { goto exit; } @@ -638,7 +638,7 @@ winreg_OpenKey(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw REGSAM access = KEY_READ; HKEY _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) { goto exit; } @@ -690,7 +690,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject * REGSAM access = KEY_READ; HKEY _return_value; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) { goto exit; } diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index 52d25b2..c4e7005 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -28,7 +28,7 @@ winsound_PlaySound(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject PyObject *sound; int flags; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &sound, &flags)) { goto exit; } @@ -65,7 +65,7 @@ winsound_Beep(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn int frequency; int duration; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &frequency, &duration)) { goto exit; } @@ -97,7 +97,7 @@ winsound_MessageBeep(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObje static _PyArg_Parser _parser = {"|i:MessageBeep", _keywords, 0}; int type = MB_OK; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &type)) { goto exit; } diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index db2245c..c15c9be 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -26,7 +26,7 @@ warnings_warn(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn Py_ssize_t stacklevel = 1; PyObject *source = Py_None; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &message, &category, &stacklevel, &source)) { goto exit; } diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index c88deef..8d429e2 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -168,7 +168,7 @@ builtin_compile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k int dont_inherit = 0; int optimize = -1; - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, &source, PyUnicode_FSDecoder, &filename, &mode, &flags, &dont_inherit, &optimize)) { goto exit; } diff --git a/Python/getargs.c b/Python/getargs.c index f35d59a..8dd579f 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -26,7 +26,7 @@ int _PyArg_VaParseTupleAndKeywordsFast(PyObject *, PyObject *, #ifdef HAVE_DECLSPEC_DLL /* Export functions */ PyAPI_FUNC(int) _PyArg_Parse_SizeT(PyObject *, const char *, ...); -PyAPI_FUNC(int) _PyArg_ParseStack_SizeT(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, +PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords_SizeT(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, struct _PyArg_Parser *parser, ...); PyAPI_FUNC(int) _PyArg_ParseTuple_SizeT(PyObject *, const char *, ...); PyAPI_FUNC(int) _PyArg_ParseTupleAndKeywords_SizeT(PyObject *, PyObject *, @@ -1473,7 +1473,7 @@ _PyArg_ParseTupleAndKeywordsFast_SizeT(PyObject *args, PyObject *keywords, } int -_PyArg_ParseStack(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, +_PyArg_ParseStackAndKeywords(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, struct _PyArg_Parser *parser, ...) { int retval; @@ -1486,7 +1486,7 @@ _PyArg_ParseStack(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, } int -_PyArg_ParseStack_SizeT(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, +_PyArg_ParseStackAndKeywords_SizeT(PyObject **args, Py_ssize_t nargs, PyObject *kwnames, struct _PyArg_Parser *parser, ...) { int retval; diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 75ac673..4d84d49 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -856,7 +856,7 @@ class CLanguage(Language): parser_prototype = parser_prototype_fastcall body = normalize_snippet(""" - if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser, + if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser, {parse_arguments})) {{ goto exit; }} -- cgit v0.12