diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-11-08 12:23:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 12:23:50 (GMT) |
commit | 061e50f196373d920c3eaa3718b9d0553914e006 (patch) | |
tree | 8121c12d8d17ccdd0b3a33dd7f3c93fb725f04df /Modules/clinic/_struct.c.h | |
parent | ee0746af7d7cfc6cc25441726034e4fea4bcf7e5 (diff) | |
download | cpython-061e50f196373d920c3eaa3718b9d0553914e006.zip cpython-061e50f196373d920c3eaa3718b9d0553914e006.tar.gz cpython-061e50f196373d920c3eaa3718b9d0553914e006.tar.bz2 |
gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564)
Remove _PyArg_UnpackKeywordsWithVararg.
Add comments for integer arguments of _PyArg_UnpackKeywords.
Diffstat (limited to 'Modules/clinic/_struct.c.h')
-rw-r--r-- | Modules/clinic/_struct.c.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 1a07532..cfc2fe7 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -57,7 +57,8 @@ Struct___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *format; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, + /*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf); if (!fastargs) { goto exit; } @@ -159,7 +160,8 @@ Struct_unpack_from(PyStructObject *self, PyObject *const *args, Py_ssize_t nargs Py_buffer buffer = {NULL, NULL}; Py_ssize_t offset = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, + /*minpos*/ 1, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf); if (!args) { goto exit; } @@ -357,7 +359,8 @@ unpack_from(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_buffer buffer = {NULL, NULL}; Py_ssize_t offset = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, + /*minpos*/ 2, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf); if (!args) { goto exit; } @@ -436,4 +439,4 @@ exit: return return_value; } -/*[clinic end generated code: output=67bd299e5d72fee0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=faff90f99c6bd09f input=a9049054013a1b77]*/ |