From a7c627e41cc5a508c1ab187fc232f6e345763eea Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 8 Aug 2024 21:29:28 +0300 Subject: [PATCH 01/14] gh-122943: Rework support of var-positional parameter in Argument Clinic Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. --- Include/internal/pycore_modsupport.h | 16 +- Include/internal/pycore_tuple.h | 2 +- Lib/test/clinic.test.c | 205 +++++----- Lib/test/test_clinic.py | 39 +- Modules/_blake2/clinic/blake2b_impl.c.h | 4 +- Modules/_blake2/clinic/blake2s_impl.c.h | 4 +- Modules/_ctypes/clinic/_ctypes.c.h | 24 +- Modules/_io/clinic/_iomodule.c.h | 6 +- Modules/_io/clinic/bufferedio.c.h | 16 +- Modules/_io/clinic/bytesio.c.h | 4 +- Modules/_io/clinic/fileio.c.h | 12 +- Modules/_io/clinic/iobase.c.h | 6 +- Modules/_io/clinic/stringio.c.h | 4 +- Modules/_io/clinic/textio.c.h | 16 +- Modules/_io/clinic/winconsoleio.c.h | 10 +- Modules/_multiprocessing/clinic/semaphore.c.h | 8 +- Modules/_sqlite/clinic/connection.c.h | 32 +- Modules/_sqlite/clinic/cursor.c.h | 4 +- Modules/_sqlite/clinic/module.c.h | 4 +- Modules/_sre/clinic/sre.c.h | 28 +- Modules/_ssl/clinic/cert.c.h | 4 +- Modules/_testcapi/clinic/exceptions.c.h | 4 +- Modules/_testclinic.c | 28 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 14 +- Modules/clinic/_asynciomodule.c.h | 40 +- Modules/clinic/_bisectmodule.c.h | 10 +- Modules/clinic/_bz2module.c.h | 4 +- Modules/clinic/_codecsmodule.c.h | 6 +- Modules/clinic/_collectionsmodule.c.h | 4 +- Modules/clinic/_csv.c.h | 8 +- Modules/clinic/_curses_panel.c.h | 8 +- Modules/clinic/_cursesmodule.c.h | 4 +- Modules/clinic/_datetimemodule.c.h | 12 +- Modules/clinic/_elementtree.c.h | 26 +- Modules/clinic/_functoolsmodule.c.h | 4 +- Modules/clinic/_hashopenssl.c.h | 42 +- Modules/clinic/_lzmamodule.c.h | 6 +- Modules/clinic/_opcode.c.h | 22 +- Modules/clinic/_pickle.c.h | 20 +- Modules/clinic/_queuemodule.c.h | 8 +- Modules/clinic/_ssl.c.h | 24 +- Modules/clinic/_struct.c.h | 8 +- Modules/clinic/_testclinic.c.h | 358 +++++++++++------- Modules/clinic/_testclinic_depr.c.h | 51 +-- Modules/clinic/_testinternalcapi.c.h | 12 +- Modules/clinic/_testmultiphase.c.h | 4 +- Modules/clinic/_winapi.c.h | 8 +- Modules/clinic/_zoneinfo.c.h | 16 +- Modules/clinic/arraymodule.c.h | 10 +- Modules/clinic/binascii.c.h | 16 +- Modules/clinic/cmathmodule.c.h | 4 +- Modules/clinic/gcmodule.c.h | 62 +-- Modules/clinic/itertoolsmodule.c.h | 18 +- Modules/clinic/mathmodule.c.h | 8 +- Modules/clinic/md5module.c.h | 4 +- Modules/clinic/overlapped.c.h | 4 +- Modules/clinic/posixmodule.c.h | 194 +++++----- Modules/clinic/pyexpat.c.h | 12 +- Modules/clinic/selectmodule.c.h | 12 +- Modules/clinic/sha1module.c.h | 4 +- Modules/clinic/sha2module.c.h | 10 +- Modules/clinic/sha3module.c.h | 4 +- Modules/clinic/signalmodule.c.h | 4 +- Modules/clinic/socketmodule.c.h | 4 +- Modules/clinic/syslogmodule.c.h | 4 +- Modules/clinic/zlibmodule.c.h | 24 +- Modules/gcmodule.c | 8 +- Objects/clinic/bytearrayobject.c.h | 16 +- Objects/clinic/bytesobject.c.h | 16 +- Objects/clinic/codeobject.c.h | 6 +- Objects/clinic/complexobject.c.h | 4 +- Objects/clinic/descrobject.c.h | 6 +- Objects/clinic/enumobject.c.h | 4 +- Objects/clinic/funcobject.c.h | 4 +- Objects/clinic/listobject.c.h | 4 +- Objects/clinic/longobject.c.h | 8 +- Objects/clinic/memoryobject.c.h | 12 +- Objects/clinic/moduleobject.c.h | 4 +- Objects/clinic/odictobject.c.h | 12 +- Objects/clinic/setobject.c.h | 171 +-------- Objects/clinic/structseq.c.h | 4 +- Objects/clinic/typevarobject.c.h | 43 ++- Objects/clinic/unicodeobject.c.h | 16 +- Objects/setobject.c | 26 +- Objects/stringlib/clinic/transmogrify.h.h | 4 +- PC/clinic/_wmimodule.cpp.h | 4 +- PC/clinic/winreg.c.h | 10 +- Python/clinic/Python-tokenize.c.h | 4 +- Python/clinic/_warnings.c.h | 6 +- Python/clinic/bltinmodule.c.h | 45 ++- Python/clinic/import.c.h | 6 +- Python/clinic/instruction_sequence.c.h | 8 +- Python/clinic/marshal.c.h | 10 +- Python/clinic/sysmodule.c.h | 12 +- Python/clinic/traceback.c.h | 4 +- Python/getargs.c | 164 +------- Tools/clinic/libclinic/clanguage.py | 3 - Tools/clinic/libclinic/converter.py | 5 +- Tools/clinic/libclinic/dsl_parser.py | 8 +- Tools/clinic/libclinic/parse_args.py | 195 ++++++---- 100 files changed, 1141 insertions(+), 1308 deletions(-) diff --git a/Include/internal/pycore_modsupport.h b/Include/internal/pycore_modsupport.h index 11fde814875938..fbafbcf8e7b777 100644 --- a/Include/internal/pycore_modsupport.h +++ b/Include/internal/pycore_modsupport.h @@ -85,20 +85,14 @@ PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywords( int minpos, int maxpos, int minkw, + int varpos, PyObject **buf); -#define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, buf) \ +#define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, varpos, buf) \ (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \ - (minpos) <= (nargs) && (nargs) <= (maxpos) && (args) != NULL) ? (args) : \ + (minpos) <= (nargs) && (varpos || (nargs) <= (maxpos)) && (args) != NULL) ? \ + (args) : \ _PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \ - (minpos), (maxpos), (minkw), (buf))) - -// Export for '_testclinic' shared extension -PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywordsWithVararg( - PyObject *const *args, Py_ssize_t nargs, - PyObject *kwargs, PyObject *kwnames, - struct _PyArg_Parser *parser, - int minpos, int maxpos, int minkw, - int vararg, PyObject **buf); + (minpos), (maxpos), (minkw), (varpos), (buf))) #ifdef __cplusplus } diff --git a/Include/internal/pycore_tuple.h b/Include/internal/pycore_tuple.h index dfbbd6fd0c7de5..82b875241f4116 100644 --- a/Include/internal/pycore_tuple.h +++ b/Include/internal/pycore_tuple.h @@ -20,7 +20,7 @@ extern PyStatus _PyTuple_InitGlobalObjects(PyInterpreterState *); #define _PyTuple_ITEMS(op) _Py_RVALUE(_PyTuple_CAST(op)->ob_item) -extern PyObject *_PyTuple_FromArray(PyObject *const *, Py_ssize_t); +PyAPI_FUNC(PyObject *)_PyTuple_FromArray(PyObject *const *, Py_ssize_t); PyAPI_FUNC(PyObject *)_PyTuple_FromStackRefSteal(const union _PyStackRef *, Py_ssize_t); PyAPI_FUNC(PyObject *)_PyTuple_FromArraySteal(PyObject *const *, Py_ssize_t); diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c index 2a071f8485a2b8..3e6475e825e214 100644 --- a/Lib/test/clinic.test.c +++ b/Lib/test/clinic.test.c @@ -2199,7 +2199,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2213,7 +2213,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=13ba007e1c842a37 input=0d3484844749c05b]*/ +/*[clinic end generated code: output=8c0345bdc2d4279f input=0d3484844749c05b]*/ /*[clinic input] @@ -2269,7 +2269,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2283,7 +2283,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=789799a6d2d6eb4d input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=66625282d27df5b4 input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2342,7 +2342,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2367,7 +2367,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=42430dd8ea5afde6 input=eda7964f784f4607]*/ +/*[clinic end generated code: output=b64f34a10ee58dfe input=eda7964f784f4607]*/ /*[clinic input] @@ -2429,7 +2429,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2464,7 +2464,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=f312c35c380d2bf9 input=209387a4815e5082]*/ +/*[clinic end generated code: output=c9d506684af98d1f input=209387a4815e5082]*/ /*[clinic input] @@ -2524,7 +2524,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2549,7 +2549,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=3937da2a8233ebe0 input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=68edbf1d2262f7aa input=18393cc64fa000f4]*/ /*[clinic input] @@ -2605,7 +2605,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2619,7 +2619,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=6b4f6dd5f4db3877 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=4292a4b34fc66678 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2676,7 +2676,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2690,7 +2690,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=8bef2a8198e70b26 input=9042f2818f664839]*/ +/*[clinic end generated code: output=879bb3b449bc11b4 input=9042f2818f664839]*/ /*[clinic input] @@ -2750,7 +2750,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2766,7 +2766,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=a44b8ae8300955e1 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=06380eb7891a8853 input=29546ebdca492fea]*/ /*[clinic input] @@ -2828,7 +2828,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2854,7 +2854,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=cae6647c9e8e0238 input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=3131e879b31e9ddf input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2914,7 +2914,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2939,7 +2939,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=6526fd08aafa2149 input=1581299d21d16f14]*/ +/*[clinic end generated code: output=1f6ab441c0a23c0b input=1581299d21d16f14]*/ /*[clinic input] @@ -3001,7 +3001,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3032,7 +3032,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=b8d01e98443738c2 input=408798ec3d42949f]*/ +/*[clinic end generated code: output=1e9adfbf0156f8e2 input=408798ec3d42949f]*/ /*[clinic input] @@ -3095,7 +3095,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3121,7 +3121,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=81d71c288f13d4dc input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=bf69c0352b83d03e input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -3182,7 +3182,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3207,7 +3207,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=a717d2a1a3310289 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=e1818c157f03f3d1 input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -3270,7 +3270,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3301,7 +3301,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=0f50b4b8d45cf2de input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=a83c8f2a857434f5 input=1e557dc979d120fd]*/ /*[clinic input] @@ -3367,7 +3367,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3395,7 +3395,7 @@ static PyObject * test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=8dac8d2a4e6105fa input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=affd90c19f802f78 input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3458,7 +3458,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3484,7 +3484,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=5a96d521e6414f5d input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=437e74e675923bb9 input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3551,7 +3551,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3588,7 +3588,7 @@ static PyObject * test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=d5a474dcd5dc3e9f input=d0883d45876f186c]*/ +/*[clinic end generated code: output=ad0869d8a7f2c677 input=d0883d45876f186c]*/ /*[clinic input] @@ -3655,7 +3655,7 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3697,7 +3697,7 @@ static PyObject * test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=ac239c5ee8a74408 input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=0c9b524795e3c177 input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3767,7 +3767,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args PyObject *e = Py_None; PyObject *f = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3816,7 +3816,7 @@ test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f) -/*[clinic end generated code: output=638bbd0005639342 input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=10507e1f8db1f7b0 input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3871,7 +3871,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3892,7 +3892,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=b12fe2e515a62603 input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=3a56ca73418929be input=303df5046c7e37a3]*/ /*[clinic input] @@ -4161,23 +4161,22 @@ test_vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t narg goto exit; } a = args[0]; - __clinic_args = PyTuple_New(nargs - 1); - if (!__clinic_args) { + __clinic_args = _PyTuple_FromArray(args + 1, nargs - 1); + if (__clinic_args == NULL) { goto exit; } - for (Py_ssize_t i = 0; i < nargs - 1; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[1 + i])); - } return_value = test_vararg_and_posonly_impl(module, a, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static PyObject * test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=79b75dc07decc8d6 input=9cfa748bbff09877]*/ +/*[clinic end generated code: output=0c11c475e240869e input=9cfa748bbff09877]*/ /*[clinic input] test_vararg @@ -4228,26 +4227,34 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[2]; + PyObject *argsbuf[1]; + PyObject * const *fastargs; PyObject *a; PyObject *__clinic_args = NULL; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { goto exit; } - a = args[0]; - __clinic_args = args[1]; return_value = test_vararg_impl(module, a, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=1411e464f358a7ba input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=83da0088d61ef092 input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -4300,37 +4307,45 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *a; PyObject *__clinic_args = NULL; int b = 0; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - a = args[0]; - __clinic_args = args[1]; + a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - b = PyObject_IsTrue(args[2]); + b = PyObject_IsTrue(fastargs[1]); if (b < 0) { goto exit; } skip_optional_kwonly: + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { + goto exit; + } return_value = test_vararg_with_default_impl(module, a, __clinic_args, b); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=f09d4b917063ca41 input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=6d5d4c7b8725a523 input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -4383,22 +4398,22 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *__clinic_args = NULL; int b = 0; PyObject *c = " "; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - __clinic_args = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { - b = PyObject_IsTrue(args[1]); + if (fastargs[0]) { + b = PyObject_IsTrue(fastargs[0]); if (b < 0) { goto exit; } @@ -4406,19 +4421,25 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize goto skip_optional_kwonly; } } - c = args[2]; + c = fastargs[1]; skip_optional_kwonly: + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } return_value = test_vararg_with_only_defaults_impl(module, __clinic_args, b, c); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=cc6590b8805d5433 input=fa56a709a035666e]*/ +/*[clinic end generated code: output=71967475eadae191 input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4469,7 +4490,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *mod; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4482,7 +4503,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=4a2a849ecbcc8b53 input=afefe259667f13ba]*/ +/*[clinic end generated code: output=20495fdbd57c9532 input=afefe259667f13ba]*/ /*[clinic input] mangle1 @@ -4554,7 +4575,7 @@ mangle1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_nargs; PyObject *__clinic_noptargs; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4578,7 +4599,7 @@ mangle1_impl(PyObject *module, PyObject *args, PyObject *kwnames, PyObject *return_value, PyObject *_keywords, PyObject *_parser, PyObject *argsbuf, PyObject *fastargs, PyObject *nargs, PyObject *noptargs) -/*[clinic end generated code: output=083e5076be9987c3 input=a3ed51bdedf8a3c7]*/ +/*[clinic end generated code: output=11a67d5f9b51d1e5 input=a3ed51bdedf8a3c7]*/ /*[clinic input] mangle2 @@ -4635,7 +4656,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_kwargs; PyObject *__clinic_return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4651,7 +4672,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn static PyObject * mangle2_impl(PyObject *module, PyObject *args, PyObject *kwargs, PyObject *return_value) -/*[clinic end generated code: output=2ebb62aaefe7590a input=391766fee51bad7a]*/ +/*[clinic end generated code: output=228db961b4469d07 input=391766fee51bad7a]*/ /*[clinic input] @@ -4704,7 +4725,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ PyObject *argsbuf[1]; int a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4720,7 +4741,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ static PyObject * Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a) -/*[clinic end generated code: output=a3a968137b0f320a input=af158077bd237ef9]*/ +/*[clinic end generated code: output=c2e71608109772f2 input=af158077bd237ef9]*/ /*[clinic input] @@ -4945,20 +4966,19 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) !_PyArg_NoKeywords("Test", kwargs)) { goto exit; } - if (!_PyArg_CheckPositional("Test", PyTuple_GET_SIZE(args), 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_GetSlice(0, -1); + __clinic_args = Py_NewRef(args); return_value = Test___init___impl((TestObj *)self, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static int Test___init___impl(TestObj *self, PyObject *args) -/*[clinic end generated code: output=0ed1009fe0dcf98d input=2a8bd0033c9ac772]*/ +/*[clinic end generated code: output=f172425cec373cd6 input=2a8bd0033c9ac772]*/ /*[clinic input] @@ -4989,20 +5009,19 @@ Test(PyTypeObject *type, PyObject *args, PyObject *kwargs) !_PyArg_NoKeywords("Test", kwargs)) { goto exit; } - if (!_PyArg_CheckPositional("Test", PyTuple_GET_SIZE(args), 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_GetSlice(0, -1); + __clinic_args = Py_NewRef(args); return_value = Test_impl(type, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } static PyObject * Test_impl(PyTypeObject *type, PyObject *args) -/*[clinic end generated code: output=8b219f6633e2a2e9 input=70ad829df3dd9b84]*/ +/*[clinic end generated code: output=ee1e8892a67abd4a input=70ad829df3dd9b84]*/ /*[clinic input] @@ -5054,7 +5073,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *a; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -5067,7 +5086,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) static int Test___init___impl(TestObj *self, PyObject *a) -/*[clinic end generated code: output=0e1239b9bc247bc1 input=a8f9222a6ab35c59]*/ +/*[clinic end generated code: output=ca1607b9a98fb44a input=a8f9222a6ab35c59]*/ /*[clinic input] @@ -5320,7 +5339,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; int int_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -5336,7 +5355,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * mangled_c_keyword_identifier_impl(PyObject *module, int int_value) -/*[clinic end generated code: output=01a8088b57632916 input=060876448ab567a2]*/ +/*[clinic end generated code: output=6e8a7c9097050537 input=060876448ab567a2]*/ /*[clinic input] @@ -5579,7 +5598,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *arg = CONST_A + CONST_B; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -5596,7 +5615,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * fn_with_default_binop_expr_impl(PyObject *module, PyObject *arg) -/*[clinic end generated code: output=018672772e4092ff input=1b55c8ae68d89453]*/ +/*[clinic end generated code: output=fa4fe50d45ddcbb6 input=1b55c8ae68d89453]*/ /*[python input] @@ -5667,7 +5686,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py PyObject *argsbuf[1]; str a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -5682,7 +5701,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py static PyObject * docstr_fallback_to_converter_default_impl(PyObject *module, str a) -/*[clinic end generated code: output=3fff7b702f0065cb input=0cbe6a4d24bc2274]*/ +/*[clinic end generated code: output=a3efbe6cf731ca9e input=0cbe6a4d24bc2274]*/ /*[clinic input] diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 402106194f169f..94e79222934c7a 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -2694,7 +2694,7 @@ def test_cli_force(self): # Verify by checking the checksum. checksum = ( "/*[clinic end generated code: " - "output=0acbef4794cb933e input=9543a8d2da235301]*/\n" + "output=843576e3ffe85e2d input=9543a8d2da235301]*/\n" ) with open(fn, encoding='utf-8') as f: generated = f.read() @@ -3393,6 +3393,15 @@ def test_posonly_varpos(self): self.assertEqual(fn(1, 2), (1, 2, ())) self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_req_opt_varpos(self): + # fn(a, b=False, /, *args) + fn = ac_tester.posonly_req_opt_varpos + self.assertRaises(TypeError, fn) + self.assertRaises(TypeError, fn, a=1) + self.assertEqual(fn(1), (1, False, ())) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_poskw_varpos(self): # fn(a, /, b, *args) fn = ac_tester.posonly_poskw_varpos @@ -3401,7 +3410,8 @@ def test_posonly_poskw_varpos(self): self.assertEqual(fn(1, b=2), (1, 2, ())) self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) self.assertRaises(TypeError, fn, b=4) - self.assertRaises(TypeError, fn, 1, 2, 3, b=4) + errmsg = re.escape("given by name ('b') and position (2)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) def test_poskw_varpos(self): # fn(a, *args) @@ -3409,7 +3419,8 @@ def test_poskw_varpos(self): self.assertRaises(TypeError, fn) self.assertRaises(TypeError, fn, 1, b=2) self.assertEqual(fn(a=1), (1, ())) - self.assertRaises(TypeError, fn, 1, a=2) + errmsg = re.escape("given by name ('a') and position (1)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, a=2) self.assertEqual(fn(1), (1, ())) self.assertEqual(fn(1, 2, 3, 4), (1, (2, 3, 4))) @@ -3417,7 +3428,8 @@ def test_poskw_varpos_kwonly_opt(self): # fn(a, *args, b=False) fn = ac_tester.poskw_varpos_kwonly_opt self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, 1, a=2) + errmsg = re.escape("given by name ('a') and position (1)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, a=2) self.assertEqual(fn(1, b=2), (1, (), True)) self.assertEqual(fn(1, 2, 3, 4), (1, (2, 3, 4), False)) self.assertEqual(fn(1, 2, 3, 4, b=5), (1, (2, 3, 4), True)) @@ -3428,7 +3440,8 @@ def test_poskw_varpos_kwonly_opt2(self): # fn(a, *args, b=False, c=False) fn = ac_tester.poskw_varpos_kwonly_opt2 self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, 1, a=2) + errmsg = re.escape("given by name ('a') and position (1)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, a=2) self.assertEqual(fn(1, b=2), (1, (), 2, False)) self.assertEqual(fn(1, b=2, c=3), (1, (), 2, 3)) self.assertEqual(fn(1, 2, 3), (1, (2, 3), False, False)) @@ -3490,9 +3503,10 @@ def test_null_or_tuple_for_varargs(self): self.assertEqual(fn(covariant=True, name='a'), ('a', (), True)) self.assertRaises(TypeError, fn, covariant=True) - self.assertRaises(TypeError, fn, 1, name='a') - self.assertRaises(TypeError, fn, 1, 2, 3, name='a', covariant=True) - self.assertRaises(TypeError, fn, 1, 2, 3, covariant=True, name='a') + errmsg = re.escape("given by name ('name') and position (1)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, name='a') + self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, name='a', covariant=True) + self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, covariant=True, name='a') def test_cloned_func_exception_message(self): incorrect_arg = -1 # f1() and f2() accept a single str @@ -3568,14 +3582,15 @@ def test_defclass_posonly_varpos(self): cls = ac_tester.TestClass obj = cls() fn = obj.defclass_posonly_varpos - self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, 1) + errmsg = 'takes at least 2 positional arguments' + self.assertRaisesRegex(TypeError, errmsg, fn) + self.assertRaisesRegex(TypeError, errmsg, fn, 1) self.assertEqual(fn(1, 2), (cls, 1, 2, ())) self.assertEqual(fn(1, 2, 3, 4), (cls, 1, 2, (3, 4))) fn = cls.defclass_posonly_varpos self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, obj) - self.assertRaises(TypeError, fn, obj, 1) + self.assertRaisesRegex(TypeError, errmsg, fn, obj) + self.assertRaisesRegex(TypeError, errmsg, fn, obj, 1) self.assertEqual(fn(obj, 1, 2), (cls, 1, 2, ())) self.assertEqual(fn(obj, 1, 2, 3, 4), (cls, 1, 2, (3, 4))) diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 47d62717eb76e7..6c28f404069008 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -72,7 +72,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int last_node = 0; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -265,4 +265,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=e18eeaee40623bfc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d65f094670bd0ba7 input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index 7a0f6eeff5b5b5..9e9c1f4e2e7554 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -72,7 +72,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int last_node = 0; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -265,4 +265,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=24690e4e2586cafd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0f0893fd7822513b input=a9049054013a1b77]*/ diff --git a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h index e1d5a17cbe7d68..47426a29f453ae 100644 --- a/Modules/_ctypes/clinic/_ctypes.c.h +++ b/Modules/_ctypes/clinic/_ctypes.c.h @@ -65,7 +65,7 @@ CDataType_from_address(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -112,7 +112,7 @@ CDataType_from_buffer(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *obj; 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, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -175,7 +175,7 @@ CDataType_from_buffer_copy(PyObject *type, PyTypeObject *cls, PyObject *const *a 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, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -245,7 +245,7 @@ CDataType_in_dll(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ss PyObject *dll; const char *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -301,7 +301,7 @@ CDataType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -344,7 +344,7 @@ PyCPointerType_set_type(PyTypeObject *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *type; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -388,7 +388,7 @@ PyCPointerType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -430,7 +430,7 @@ c_wchar_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -472,7 +472,7 @@ c_char_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -514,7 +514,7 @@ c_void_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -558,7 +558,7 @@ PyCSimpleType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -610,4 +610,4 @@ Simple_from_outparm(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py } return Simple_from_outparm_impl(self, cls); } -/*[clinic end generated code: output=a90886be2a294ee6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2ae83e7090e0bbba input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 112408a95df036..54b6ac8e4ddb4d 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -175,7 +175,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int closefd = 1; PyObject *opener = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *argsbuf[1]; PyObject *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -404,4 +404,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=5d60f4e778a600a4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ca839985e0d5219c input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index 708bef638887e2..887aaa75c1f31e 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -151,7 +151,7 @@ _io__BufferedIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -205,7 +205,7 @@ _io__BufferedIOBase_read1(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -262,7 +262,7 @@ _io__BufferedIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -910,7 +910,7 @@ _io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *pos = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -973,7 +973,7 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1050,7 +1050,7 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1219,7 +1219,7 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1245,4 +1245,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=8eead000083dc5fa input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4a40772275c05bbd input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index 620e9e3b84ea19..d42d3c83d2c6af 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -520,7 +520,7 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *initvalue = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -534,4 +534,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=ef116925b8b9e535 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c8d7b26174a8c180 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index 5b5487d63eba90..067adf82f4799b 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -94,7 +94,7 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int closefd = 1; PyObject *opener = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -241,7 +241,7 @@ _io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *argsbuf[1]; Py_buffer buffer = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -317,7 +317,7 @@ _io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize PyObject *argsbuf[1]; Py_ssize_t size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -370,7 +370,7 @@ _io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssiz PyObject *argsbuf[1]; Py_buffer b = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -490,7 +490,7 @@ _io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *argsbuf[1]; PyObject *posobj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -528,4 +528,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO_FILEIO_TRUNCATE_METHODDEF #define _IO_FILEIO_TRUNCATE_METHODDEF #endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */ -/*[clinic end generated code: output=e3d9446b4087020e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7eb93019525a5a8d input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index a35cac7dc0b8d7..57810d09884ff8 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -56,7 +56,7 @@ _io__IOBase_seek(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ss int offset; int whence = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -132,7 +132,7 @@ _io__IOBase_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *size = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -441,4 +441,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _io__RawIOBase_readall_impl(self); } -/*[clinic end generated code: output=dab5e9323d191e32 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d3d99fa9e875e696 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index 6bdb2181985f7d..ac1fc093815204 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -336,7 +336,7 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *value = NULL; PyObject *newline_obj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -555,4 +555,4 @@ _io_StringIO_newlines_get(stringio *self, void *Py_UNUSED(context)) return return_value; } -/*[clinic end generated code: output=9ffea20cd32d4cd8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4f03839c05618ef5 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index 669e2aa637ebbf..6141ee24eabb5c 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -70,7 +70,7 @@ _io__TextIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -124,7 +124,7 @@ _io__TextIOBase_readline(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -178,7 +178,7 @@ _io__TextIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; const char *s; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -339,7 +339,7 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject int translate; PyObject *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -405,7 +405,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar PyObject *input; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -546,7 +546,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) int line_buffering = 0; int write_through = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -681,7 +681,7 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na PyObject *line_buffering_obj = Py_None; PyObject *write_through_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1292,4 +1292,4 @@ _io_TextIOWrapper__CHUNK_SIZE_set(textio *self, PyObject *value, void *Py_UNUSED return return_value; } -/*[clinic end generated code: output=04cb7c67791a9ec1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=50e75a2cb6d7566f input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 4696ecc5c843e6..0bb8e6785b3483 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -93,7 +93,7 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int closefd = 1; PyObject *opener = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -239,7 +239,7 @@ _io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject * PyObject *argsbuf[1]; Py_buffer buffer = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -323,7 +323,7 @@ _io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; Py_ssize_t size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -380,7 +380,7 @@ _io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *con PyObject *argsbuf[1]; Py_buffer b = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -457,4 +457,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */ -/*[clinic end generated code: output=2c2bc86713b21dd6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=24f4d87b9b3ff97f input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index 512e5a016192fb..cb253da5f4d01b 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -58,7 +58,7 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ int blocking = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -163,7 +163,7 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ int blocking = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -263,7 +263,7 @@ _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *name; int unlink; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -573,4 +573,4 @@ _multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */ -/*[clinic end generated code: output=dea36482d23a355f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=785ab7ac492ce400 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 6cb610a12b59c6..31c9ad5ee89399 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -81,7 +81,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -213,7 +213,7 @@ pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *factory = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -289,7 +289,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO int readonly = 0; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -481,7 +481,7 @@ pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls PyObject *func; int deterministic = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -574,7 +574,7 @@ create_window_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *c int num_params; PyObject *aggregate_class; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -670,7 +670,7 @@ pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cl int n_arg; PyObject *aggregate_class; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -770,7 +770,7 @@ pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, PyObject *argsbuf[1]; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -864,7 +864,7 @@ pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject PyObject *callable; int n; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -951,7 +951,7 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject * PyObject *argsbuf[1]; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1055,7 +1055,7 @@ pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *const *a const char *extension_name; const char *entrypoint = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1252,7 +1252,7 @@ pysqlite_connection_iterdump(pysqlite_Connection *self, PyObject *const *args, P Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *filter = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1320,7 +1320,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ const char *name = "main"; double sleep = 0.25; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1418,7 +1418,7 @@ pysqlite_connection_create_collation(pysqlite_Connection *self, PyTypeObject *cl const char *name; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1497,7 +1497,7 @@ serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1587,7 +1587,7 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py_buffer data = {NULL, NULL}; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1866,4 +1866,4 @@ getconfig(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=5d4d7e4abe17b164 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9e00c4721c5f653b input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index a13e0d0745b58d..e076789d7fc255 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -216,7 +216,7 @@ pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int maxrows = self->arraysize; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -313,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=a8ce095c3c80cf65 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7277c0b2524c5c5a input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index 529dc4e281e0eb..cb37f2b1f8e0ce 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -52,7 +52,7 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; const char *statement; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -208,4 +208,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=457ab0fdbb9e1880 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=05f04beb7ae081cc input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index 48336c7a2fca26..c6a213f0209d19 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -213,7 +213,7 @@ _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const * Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -306,7 +306,7 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *con Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -401,7 +401,7 @@ _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -493,7 +493,7 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -588,7 +588,7 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -680,7 +680,7 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -771,7 +771,7 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t na PyObject *string; Py_ssize_t maxsplit = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -846,7 +846,7 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *string; Py_ssize_t count = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -923,7 +923,7 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *a PyObject *string; Py_ssize_t count = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1027,7 +1027,7 @@ _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *groupindex; PyObject *indexgroup; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1152,7 +1152,7 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; PyObject *template; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1211,7 +1211,7 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1274,7 +1274,7 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t na Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1461,4 +1461,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=c3e711f0b2f43d66 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e3592512bd214efd input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index 0748d32291e3c5..b2efbdb6122271 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -52,7 +52,7 @@ _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int format = PY_SSL_ENCODING_PEM; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -86,4 +86,4 @@ _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored)) { return _ssl_Certificate_get_info_impl(self); } -/*[clinic end generated code: output=5b668226f933a677 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cbdcf54a8d29c126 input=a9049054013a1b77]*/ diff --git a/Modules/_testcapi/clinic/exceptions.c.h b/Modules/_testcapi/clinic/exceptions.c.h index a797444c1a72b9..3e46b9db5c8313 100644 --- a/Modules/_testcapi/clinic/exceptions.c.h +++ b/Modules/_testcapi/clinic/exceptions.c.h @@ -104,7 +104,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss PyObject *base = NULL; PyObject *dict = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -456,4 +456,4 @@ _testcapi_unstable_exc_prep_reraise_star(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=0b11ef105030a48e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7a5adf45325bdd9f input=a9049054013a1b77]*/ diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index ca884af1aa29b8..025e2fe8dabd80 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -970,8 +970,8 @@ varpos [clinic start generated code]*/ static PyObject * -varpos_impl(PyObject *module, PyObject *args) -/*[clinic end generated code: output=7b0b9545872bdca4 input=f87cd674145d394c]*/ +varpos(PyObject *module, PyObject *args) +/*[clinic end generated code: output=174bb88a5a80ed51 input=f87cd674145d394c]*/ { return Py_NewRef(args); } @@ -996,6 +996,25 @@ posonly_varpos_impl(PyObject *module, PyObject *a, PyObject *b, } +/*[clinic input] +posonly_req_opt_varpos + + a: object + b: object = False + / + *args: object + +[clinic start generated code]*/ + +static PyObject * +posonly_req_opt_varpos_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject *args) +/*[clinic end generated code: output=67f82f90838e166a input=a49bd64740171e1c]*/ +{ + return pack_arguments_newref(3, a, b, args); +} + + /*[clinic input] posonly_poskw_varpos @@ -1157,8 +1176,8 @@ Proof-of-concept of GH-99233 refcount error bug. [clinic start generated code]*/ static PyObject * -gh_99233_refcount_impl(PyObject *module, PyObject *args) -/*[clinic end generated code: output=585855abfbca9a7f input=eecfdc2092d90dc3]*/ +gh_99233_refcount(PyObject *module, PyObject *args) +/*[clinic end generated code: output=4a8facb62b9a98bb input=eecfdc2092d90dc3]*/ { Py_RETURN_NONE; } @@ -1996,6 +2015,7 @@ static PyMethodDef tester_methods[] = { VARPOS_METHODDEF POSONLY_VARPOS_METHODDEF + POSONLY_REQ_OPT_VARPOS_METHODDEF POSONLY_POSKW_VARPOS_METHODDEF POSKW_VARPOS_METHODDEF POSKW_VARPOS_KWONLY_OPT_METHODDEF diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index 73edd5c3b25553..db5ee69fd855b9 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -61,7 +61,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons PyObject *input; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -147,7 +147,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons Py_buffer input = {NULL, NULL}; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -234,7 +234,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb PyObject *input; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -363,7 +363,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb Py_buffer input = {NULL, NULL}; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -598,7 +598,7 @@ _multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, P PyObject *argsbuf[1]; PyObject *strobj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -642,7 +642,7 @@ _multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *se PyObject *argsbuf[1]; PyObject *lines; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -682,4 +682,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__, #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \ {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__}, -/*[clinic end generated code: output=f09052c5a28cc6e6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d4b12769230c42bb input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index d619a124ccead5..216e2d510948e1 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -63,7 +63,7 @@ _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *loop = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -163,7 +163,7 @@ _asyncio_Future_set_result(FutureObj *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *result; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -210,7 +210,7 @@ _asyncio_Future_set_exception(FutureObj *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *exception; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -272,7 +272,7 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyTypeObject *cls, PyObject * PyObject *fn; PyObject *context = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -323,7 +323,7 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyTypeObject *cls, PyObjec PyObject *argsbuf[1]; PyObject *fn; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -384,7 +384,7 @@ _asyncio_Future_cancel(FutureObj *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *msg = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -531,7 +531,7 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *context = Py_None; int eager_start = 0; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -653,7 +653,7 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *msg = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -776,7 +776,7 @@ _asyncio_Task_get_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *limit = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -844,7 +844,7 @@ _asyncio_Task_print_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *arg PyObject *limit = Py_None; PyObject *file = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1064,7 +1064,7 @@ _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1121,7 +1121,7 @@ _asyncio__register_eager_task(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1178,7 +1178,7 @@ _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1235,7 +1235,7 @@ _asyncio__unregister_eager_task(PyObject *module, PyObject *const *args, Py_ssiz PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1295,7 +1295,7 @@ _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1356,7 +1356,7 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1416,7 +1416,7 @@ _asyncio__swap_current_task(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1473,7 +1473,7 @@ _asyncio_current_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *loop = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1533,7 +1533,7 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *loop = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1547,4 +1547,4 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py exit: return return_value; } -/*[clinic end generated code: output=ffe9b71bc65888b3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2ec3af5a73914995 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index 528602c84a9b23..3d9597d4a3edf0 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -69,7 +69,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *key = Py_None; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -176,7 +176,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t hi = -1; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -282,7 +282,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *key = Py_None; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -389,7 +389,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t hi = -1; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -434,4 +434,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=0a8d5a32dd0a3f04 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f30e300ff9c13401 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index de7b3993596446..02413e27ebc07b 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -170,7 +170,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -234,4 +234,4 @@ _bz2_BZ2Decompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=8daa62f47cc4853d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=43bd1646494d5118 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index 1c0f37442ab350..ea9e17ecf942a3 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -123,7 +123,7 @@ _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -223,7 +223,7 @@ _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2746,4 +2746,4 @@ _codecs_lookup_error(PyObject *module, PyObject *arg) #ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF #define _CODECS_CODE_PAGE_ENCODE_METHODDEF #endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */ -/*[clinic end generated code: output=e50d5fdf65bd45fa input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1642a3b61c8d3de7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index fa0ff2133a05d2..6ce22f4f372507 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -497,7 +497,7 @@ deque_init(PyObject *deque, PyObject *args, PyObject *kwargs) PyObject *iterable = NULL; PyObject *maxlenobj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -629,4 +629,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=64c32b16df7be07a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cfb6b9597af0afce input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index 2442bdcde5679f..269031484a8252 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -74,7 +74,7 @@ _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; PyObject *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -131,7 +131,7 @@ _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; PyObject *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -192,7 +192,7 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *new_limit = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -206,4 +206,4 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=9ec59717f5414d8b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=520893573ec130ab input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index c8788c461f745c..93f13b0a4ef28a 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -185,7 +185,7 @@ _curses_panel_panel_move(PyCursesPanelObject *self, PyTypeObject *cls, PyObject int y; int x; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -255,7 +255,7 @@ _curses_panel_panel_replace(PyCursesPanelObject *self, PyTypeObject *cls, PyObje PyObject *argsbuf[1]; PyCursesWindowObject *win; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -303,7 +303,7 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyTypeObject *cls, Py PyObject *argsbuf[1]; PyObject *obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -421,4 +421,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _curses_panel_update_panels_impl(module); } -/*[clinic end generated code: output=18dc5571174c7189 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=175a4c3caeedd3de input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index f7e0aaf7b23649..bd22b512103736 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2714,7 +2714,7 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO const char *term = NULL; int fd = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4318,4 +4318,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=96887782374f070a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=68fe1e92542d3ede input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 48499e0aaf7783..60fecca4c37775 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -60,7 +60,7 @@ iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int week; int weekday; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -130,7 +130,7 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n int month = GET_MONTH(self); int day = GET_DAY(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -219,7 +219,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n PyObject *tzinfo = HASTZINFO(self) ? self->tzinfo : Py_None; int fold = TIME_GET_FOLD(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, 0, argsbuf); if (!args) { goto exit; } @@ -333,7 +333,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *tz = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -406,7 +406,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s PyObject *tzinfo = HASTZINFO(self) ? self->tzinfo : Py_None; int fold = DATE_GET_FOLD(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, 0, argsbuf); if (!args) { goto exit; } @@ -496,4 +496,4 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s exit: return return_value; } -/*[clinic end generated code: output=c7a04b865b1e0890 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a62af1bb85589bc4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 1a5a820d1f00b5..6d989a0825296f 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -41,7 +41,7 @@ _elementtree_Element_append(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *argsbuf[1]; PyObject *subelement; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -198,7 +198,7 @@ _elementtree_Element___setstate__(ElementObject *self, PyTypeObject *cls, PyObje PyObject *argsbuf[1]; PyObject *state; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -241,7 +241,7 @@ _elementtree_Element_extend(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *argsbuf[1]; PyObject *elements; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -298,7 +298,7 @@ _elementtree_Element_find(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -362,7 +362,7 @@ _elementtree_Element_findtext(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *default_value = Py_None; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -430,7 +430,7 @@ _elementtree_Element_findall(ElementObject *self, PyTypeObject *cls, PyObject *c PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -492,7 +492,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -554,7 +554,7 @@ _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *key; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -615,7 +615,7 @@ _elementtree_Element_iter(ElementObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *tag = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -763,7 +763,7 @@ _elementtree_Element_makeelement(ElementObject *self, PyTypeObject *cls, PyObjec PyObject *tag; PyObject *attrib; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -883,7 +883,7 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar int insert_comments = 0; int insert_pis = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1114,7 +1114,7 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs PyObject *target = Py_None; const char *encoding = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1236,4 +1236,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=bd28eba33d9c1f25 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=386bfc0b02ea9531 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_functoolsmodule.c.h b/Modules/clinic/_functoolsmodule.c.h index e98984dc4d3a09..5bdad0bc061574 100644 --- a/Modules/clinic/_functoolsmodule.c.h +++ b/Modules/clinic/_functoolsmodule.c.h @@ -56,7 +56,7 @@ _functools_cmp_to_key(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *mycmp; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -114,4 +114,4 @@ _functools__lru_cache_wrapper_cache_clear(PyObject *self, PyObject *Py_UNUSED(ig return return_value; } -/*[clinic end generated code: output=755265bb6d5ea751 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=913ff19f52a6c0c6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 1d85ab1c524082..af24c6d3e5929a 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -118,7 +118,7 @@ EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *argsbuf[1]; Py_ssize_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -188,7 +188,7 @@ EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; Py_ssize_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -265,7 +265,7 @@ EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -341,7 +341,7 @@ _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -416,7 +416,7 @@ _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -491,7 +491,7 @@ _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -566,7 +566,7 @@ _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -641,7 +641,7 @@ _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -716,7 +716,7 @@ _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -793,7 +793,7 @@ _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -872,7 +872,7 @@ _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -951,7 +951,7 @@ _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1030,7 +1030,7 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1109,7 +1109,7 @@ _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1188,7 +1188,7 @@ _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1270,7 +1270,7 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject long iterations; PyObject *dklen_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1373,7 +1373,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj long maxmem = 0; long dklen = 64; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1499,7 +1499,7 @@ _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nar Py_buffer msg = {NULL, NULL}; PyObject *digest; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1573,7 +1573,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *msg_obj = NULL; PyObject *digestmod = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1664,7 +1664,7 @@ _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *msg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1824,4 +1824,4 @@ _hashlib_compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t narg #ifndef _HASHLIB_SCRYPT_METHODDEF #define _HASHLIB_SCRYPT_METHODDEF #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */ -/*[clinic end generated code: output=fef43fd9f4dbea49 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3fd09a3a1c01d6b3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 51fab5eab3f7dc..deb6d61cecabd3 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -128,7 +128,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -226,7 +226,7 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *memlimit = Py_None; PyObject *filters = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -327,4 +327,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=5e79c05ace76dc96 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c46aa2a65004e866 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 32ac9521a2b5cf..9e1b6ed75fb1de 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -57,7 +57,7 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *jump = Py_None; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -131,7 +131,7 @@ _opcode_is_valid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -194,7 +194,7 @@ _opcode_has_arg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -257,7 +257,7 @@ _opcode_has_const(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -320,7 +320,7 @@ _opcode_has_name(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -383,7 +383,7 @@ _opcode_has_jump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -451,7 +451,7 @@ _opcode_has_free(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -514,7 +514,7 @@ _opcode_has_local(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -577,7 +577,7 @@ _opcode_has_exc(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -732,7 +732,7 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *code; int offset; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -746,4 +746,4 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=3b4d4f32eedd636e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f71f2499af48a0ec input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 40f1309b6aa03c..164a0ba1ca2616 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -64,7 +64,7 @@ _pickle_Pickler_dump(PicklerObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -181,7 +181,7 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) int fix_imports = 1; PyObject *buffer_callback = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -298,7 +298,7 @@ _pickle_Unpickler_persistent_load(UnpicklerObject *self, PyTypeObject *cls, PyOb PyObject *argsbuf[1]; PyObject *pid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -377,7 +377,7 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyTypeObject *cls, PyObject PyObject *module_name; PyObject *global_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -487,7 +487,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *errors = "strict"; PyObject *buffers = NULL; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -679,7 +679,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int fix_imports = 1; PyObject *buffer_callback = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -782,7 +782,7 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int fix_imports = 1; PyObject *buffer_callback = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -891,7 +891,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject const char *errors = "strict"; PyObject *buffers = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1017,7 +1017,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec const char *errors = "strict"; PyObject *buffers = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1077,4 +1077,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=a9452cf1219f2e7a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8a506d99b5471c17 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index 6f4c715c722965..bcdcbbce906fdf 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -89,7 +89,7 @@ _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_ int block = 1; PyObject *timeout = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -163,7 +163,7 @@ _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *item; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -231,7 +231,7 @@ _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *con int block = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -349,4 +349,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=44a718f40072018a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b5a7e8b51839eda4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index e8d1342ed35e66..bf2e1d9806a704 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -379,7 +379,7 @@ _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *cb_type = "tls-unique"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -583,7 +583,7 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s PyObject *keyfile = Py_None; PyObject *password = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -654,7 +654,7 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args PyObject *capath = Py_None; PyObject *cadata = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -740,7 +740,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz PyObject *owner = Py_None; PyObject *session = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -833,7 +833,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t PyObject *owner = Py_None; PyObject *session = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -995,7 +995,7 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssiz Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int binary_form = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1057,7 +1057,7 @@ _ssl__SSLContext_set_psk_client_callback(PySSLContext *self, PyObject *const *ar PyObject *argsbuf[1]; PyObject *callback; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1115,7 +1115,7 @@ _ssl__SSLContext_set_psk_server_callback(PySSLContext *self, PyObject *const *ar PyObject *callback; const char *identity_hint = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1444,7 +1444,7 @@ _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject const char *txt; int name = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1555,7 +1555,7 @@ _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; const char *store_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1631,7 +1631,7 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *argsbuf[1]; const char *store_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1663,4 +1663,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=28a22f2b09d631cb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b5411cac645a849f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 1a07532bdd75ad..85659a39a48e3f 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -57,7 +57,7 @@ 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -159,7 +159,7 @@ 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, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -357,7 +357,7 @@ 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, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -436,4 +436,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=67bd299e5d72fee0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5c11cb40bebddc0a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index 1988c06971087d..ea080ea7980c58 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -9,6 +9,7 @@ preserve #include "pycore_long.h" // _PyLong_UnsignedShort_Converter() #include "pycore_modsupport.h" // _PyArg_CheckPositional() #include "pycore_runtime.h" // _Py_ID() +#include "pycore_tuple.h" // _PyTuple_FromArray() PyDoc_STRVAR(test_empty_function__doc__, "test_empty_function($module, /)\n" @@ -1478,7 +1479,7 @@ keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1534,7 +1535,7 @@ keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1592,7 +1593,7 @@ keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1662,7 +1663,7 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1741,7 +1742,7 @@ keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1807,7 +1808,7 @@ posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1863,7 +1864,7 @@ posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1921,7 +1922,7 @@ posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1982,7 +1983,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2053,7 +2054,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2129,7 +2130,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2200,7 +2201,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2277,7 +2278,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2352,7 +2353,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2435,7 +2436,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2510,7 +2511,7 @@ keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; PyObject *a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2527,70 +2528,87 @@ PyDoc_STRVAR(varpos__doc__, "\n"); #define VARPOS_METHODDEF \ - {"varpos", _PyCFunction_CAST(varpos), METH_FASTCALL, varpos__doc__}, + {"varpos", (PyCFunction)varpos, METH_VARARGS, varpos__doc__}, + +PyDoc_STRVAR(posonly_varpos__doc__, +"posonly_varpos($module, a, b, /, *args)\n" +"--\n" +"\n"); + +#define POSONLY_VARPOS_METHODDEF \ + {"posonly_varpos", _PyCFunction_CAST(posonly_varpos), METH_FASTCALL, posonly_varpos__doc__}, static PyObject * -varpos_impl(PyObject *module, PyObject *args); +posonly_varpos_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject *args); static PyObject * -varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +posonly_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; + PyObject *a; + PyObject *b; PyObject *__clinic_args = NULL; - if (!_PyArg_CheckPositional("varpos", nargs, 0, PY_SSIZE_T_MAX)) { + if (!_PyArg_CheckPositional("posonly_varpos", nargs, 2, PY_SSIZE_T_MAX)) { goto exit; } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { + a = args[0]; + b = args[1]; + __clinic_args = _PyTuple_FromArray(args + 2, nargs - 2); + if (__clinic_args == NULL) { goto exit; } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = varpos_impl(module, __clinic_args); + return_value = posonly_varpos_impl(module, a, b, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } -PyDoc_STRVAR(posonly_varpos__doc__, -"posonly_varpos($module, a, b, /, *args)\n" +PyDoc_STRVAR(posonly_req_opt_varpos__doc__, +"posonly_req_opt_varpos($module, a, b=False, /, *args)\n" "--\n" "\n"); -#define POSONLY_VARPOS_METHODDEF \ - {"posonly_varpos", _PyCFunction_CAST(posonly_varpos), METH_FASTCALL, posonly_varpos__doc__}, +#define POSONLY_REQ_OPT_VARPOS_METHODDEF \ + {"posonly_req_opt_varpos", _PyCFunction_CAST(posonly_req_opt_varpos), METH_FASTCALL, posonly_req_opt_varpos__doc__}, static PyObject * -posonly_varpos_impl(PyObject *module, PyObject *a, PyObject *b, - PyObject *args); +posonly_req_opt_varpos_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject *args); static PyObject * -posonly_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +posonly_req_opt_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; PyObject *a; - PyObject *b; + PyObject *b = Py_False; PyObject *__clinic_args = NULL; - if (!_PyArg_CheckPositional("posonly_varpos", nargs, 2, PY_SSIZE_T_MAX)) { + if (!_PyArg_CheckPositional("posonly_req_opt_varpos", nargs, 1, PY_SSIZE_T_MAX)) { goto exit; } a = args[0]; + if (nargs < 2) { + goto skip_optional; + } b = args[1]; - __clinic_args = PyTuple_New(nargs - 2); - if (!__clinic_args) { +skip_optional: + __clinic_args = nargs > 2 + ? _PyTuple_FromArray(args + 2, nargs - 2) + : PyTuple_New(0); + if (__clinic_args == NULL) { goto exit; } - for (Py_ssize_t i = 0; i < nargs - 2; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[2 + i])); - } - return_value = posonly_varpos_impl(module, a, b, __clinic_args); + return_value = posonly_req_opt_varpos_impl(module, a, b, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2635,22 +2653,30 @@ posonly_poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; PyObject *a; PyObject *b; PyObject *__clinic_args = NULL; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 2, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + b = fastargs[1]; + __clinic_args = nargs > 2 + ? _PyTuple_FromArray(args + 2, nargs - 2) + : PyTuple_New(0); + if (__clinic_args == NULL) { goto exit; } - a = args[0]; - b = args[1]; - __clinic_args = args[2]; return_value = posonly_poskw_varpos_impl(module, a, b, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2694,20 +2720,28 @@ poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[2]; + PyObject *argsbuf[1]; + PyObject * const *fastargs; PyObject *a; PyObject *__clinic_args = NULL; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { goto exit; } - a = args[0]; - __clinic_args = args[1]; return_value = poskw_varpos_impl(module, a, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2752,30 +2786,38 @@ poskw_varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *a; PyObject *__clinic_args = NULL; int b = 0; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - a = args[0]; - __clinic_args = args[1]; + a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - b = PyObject_IsTrue(args[2]); + b = PyObject_IsTrue(fastargs[1]); if (b < 0) { goto exit; } skip_optional_kwonly: + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { + goto exit; + } return_value = poskw_varpos_kwonly_opt_impl(module, a, __clinic_args, b); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2820,34 +2862,42 @@ poskw_varpos_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[4]; + PyObject *argsbuf[3]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *a; PyObject *__clinic_args = NULL; PyObject *b = Py_False; PyObject *c = Py_False; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - a = args[0]; - __clinic_args = args[1]; + a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { - b = args[2]; + if (fastargs[1]) { + b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - c = args[3]; + c = fastargs[2]; skip_optional_kwonly: + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { + goto exit; + } return_value = poskw_varpos_kwonly_opt2_impl(module, a, __clinic_args, b, c); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2891,25 +2941,31 @@ varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[2]; + PyObject *argsbuf[1]; + PyObject * const *fastargs; Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *__clinic_args = NULL; PyObject *b = Py_False; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - __clinic_args = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - b = args[1]; + b = fastargs[0]; skip_optional_kwonly: + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } return_value = varpos_kwonly_opt_impl(module, __clinic_args, b); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -2954,34 +3010,40 @@ varpos_kwonly_req_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[4]; + PyObject *argsbuf[3]; + PyObject * const *fastargs; Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *__clinic_args = NULL; PyObject *a; PyObject *b = Py_False; PyObject *c = Py_False; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 0, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 1, argsbuf); + if (!fastargs) { goto exit; } - __clinic_args = args[0]; - a = args[1]; + a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { - b = args[2]; + if (fastargs[1]) { + b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - c = args[3]; + c = fastargs[2]; skip_optional_kwonly: + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } return_value = varpos_kwonly_req_opt_impl(module, __clinic_args, a, b, c); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -3027,7 +3089,8 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[5]; + PyObject *argsbuf[4]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 2) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2; PyObject *pos1; PyObject *pos2; @@ -3035,28 +3098,35 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *kw1 = Py_None; PyObject *kw2 = Py_None; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 2, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - pos1 = args[0]; - pos2 = args[1]; - varargs = args[2]; + pos1 = fastargs[0]; + pos2 = fastargs[1]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { - kw1 = args[3]; + if (fastargs[2]) { + kw1 = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - kw2 = args[4]; + kw2 = fastargs[3]; skip_optional_kwonly: + varargs = nargs > 2 + ? _PyTuple_FromArray(args + 2, nargs - 2) + : PyTuple_New(0); + if (varargs == NULL) { + goto exit; + } return_value = gh_32092_oob_impl(module, pos1, pos2, varargs, kw1, kw2); exit: + /* Cleanup for varargs */ Py_XDECREF(varargs); + return return_value; } @@ -3102,27 +3172,35 @@ gh_32092_kw_pass(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *pos; PyObject *__clinic_args = NULL; PyObject *kw = Py_None; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - pos = args[0]; - __clinic_args = args[1]; + pos = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - kw = args[2]; + kw = fastargs[1]; skip_optional_kwonly: + __clinic_args = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (__clinic_args == NULL) { + goto exit; + } return_value = gh_32092_kw_pass_impl(module, pos, __clinic_args, kw); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -3133,33 +3211,7 @@ PyDoc_STRVAR(gh_99233_refcount__doc__, "Proof-of-concept of GH-99233 refcount error bug."); #define GH_99233_REFCOUNT_METHODDEF \ - {"gh_99233_refcount", _PyCFunction_CAST(gh_99233_refcount), METH_FASTCALL, gh_99233_refcount__doc__}, - -static PyObject * -gh_99233_refcount_impl(PyObject *module, PyObject *args); - -static PyObject * -gh_99233_refcount(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("gh_99233_refcount", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = gh_99233_refcount_impl(module, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"gh_99233_refcount", (PyCFunction)gh_99233_refcount, METH_VARARGS, gh_99233_refcount__doc__}, PyDoc_STRVAR(gh_99240_double_free__doc__, "gh_99240_double_free($module, a, b, /)\n" @@ -3237,30 +3289,38 @@ null_or_tuple_for_varargs(PyObject *module, PyObject *const *args, Py_ssize_t na .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1; PyObject *name; PyObject *constraints = NULL; int covariant = 0; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - name = args[0]; - constraints = args[1]; + name = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - covariant = PyObject_IsTrue(args[2]); + covariant = PyObject_IsTrue(fastargs[1]); if (covariant < 0) { goto exit; } skip_optional_kwonly: + constraints = nargs > 1 + ? _PyTuple_FromArray(args + 1, nargs - 1) + : PyTuple_New(0); + if (constraints == NULL) { + goto exit; + } return_value = null_or_tuple_for_varargs_impl(module, name, constraints, covariant); exit: + /* Cleanup for constraints */ Py_XDECREF(constraints); + return return_value; } @@ -3307,7 +3367,7 @@ clone_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; const char *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3373,7 +3433,7 @@ clone_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; const char *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3442,7 +3502,7 @@ clone_with_conv_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py .name = "clone_with_conv_f1", }; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3505,7 +3565,7 @@ clone_with_conv_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py .name = "clone_with_conv_f2", }; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3589,7 +3649,7 @@ _testclinic_TestClass_get_defining_class_arg(PyObject *self, PyTypeObject *cls, PyObject *argsbuf[1]; PyObject *arg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3629,18 +3689,24 @@ _testclinic_TestClass_defclass_varpos(PyObject *self, PyTypeObject *cls, PyObjec .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[1]; + PyObject *argsbuf[0]; + PyObject * const *fastargs; PyObject *__clinic_args = NULL; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + if (!fastargs) { + goto exit; + } + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { goto exit; } - __clinic_args = args[0]; return_value = _testclinic_TestClass_defclass_varpos_impl(self, cls, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -3675,22 +3741,28 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[3]; + PyObject *argsbuf[2]; + PyObject * const *fastargs; PyObject *a; PyObject *b; PyObject *__clinic_args = NULL; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 2, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + b = fastargs[1]; + __clinic_args = _PyTuple_FromArray(args + 2, nargs - 2); + if (__clinic_args == NULL) { goto exit; } - a = args[0]; - b = args[1]; - __clinic_args = args[2]; return_value = _testclinic_TestClass_defclass_posonly_varpos_impl(self, cls, a, b, __clinic_args); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } -/*[clinic end generated code: output=76ecbb38c632bde8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e4dbf2d15659b41a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index 95a2cc4cb5ed6d..f22bc2403dc79b 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -9,6 +9,7 @@ preserve #include "pycore_long.h" // _PyLong_UnsignedShort_Converter() #include "pycore_modsupport.h" // _PyArg_CheckPositional() #include "pycore_runtime.h" // _Py_ID() +#include "pycore_tuple.h" // _PyTuple_FromArray() PyDoc_STRVAR(depr_star_new__doc__, "DeprStarNew(a=None)\n" @@ -79,7 +80,7 @@ depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -162,7 +163,7 @@ depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyO goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -246,7 +247,7 @@ depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -329,7 +330,7 @@ depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -473,7 +474,7 @@ depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *a = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -556,7 +557,7 @@ depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *a = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -720,7 +721,7 @@ depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -799,7 +800,7 @@ depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -882,7 +883,7 @@ depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); if (!args) { goto exit; } @@ -965,7 +966,7 @@ depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1049,7 +1050,7 @@ depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1132,7 +1133,7 @@ depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1216,7 +1217,7 @@ depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1300,7 +1301,7 @@ depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1386,7 +1387,7 @@ depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1562,7 +1563,7 @@ depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1638,7 +1639,7 @@ depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1720,7 +1721,7 @@ depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1801,7 +1802,7 @@ depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *b = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1888,7 +1889,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1981,7 +1982,7 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2079,7 +2080,7 @@ depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *b; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2258,7 +2259,7 @@ depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *g; PyObject *h; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2368,7 +2369,7 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2393,4 +2394,4 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=ca6da2c7137554be input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5007ff912ac9e436 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testinternalcapi.c.h b/Modules/clinic/_testinternalcapi.c.h index dcca9ecf735723..2622c8060ec8f9 100644 --- a/Modules/clinic/_testinternalcapi.c.h +++ b/Modules/clinic/_testinternalcapi.c.h @@ -52,7 +52,7 @@ _testinternalcapi_compiler_cleandoc(PyObject *module, PyObject *const *args, Py_ PyObject *argsbuf[1]; PyObject *doc; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -135,7 +135,7 @@ _testinternalcapi_compiler_codegen(PyObject *module, PyObject *const *args, Py_s int optimize; int compile_mode = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -206,7 +206,7 @@ _testinternalcapi_optimize_cfg(PyObject *module, PyObject *const *args, Py_ssize PyObject *consts; int nlocals; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -271,7 +271,7 @@ _testinternalcapi_assemble_code_object(PyObject *module, PyObject *const *args, PyObject *instructions; PyObject *metadata; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -346,7 +346,7 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *spam = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -360,4 +360,4 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO exit: return return_value; } -/*[clinic end generated code: output=4d0770a1c20fbf40 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f120642a05d04b48 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index 452897b3fae99e..7f1f6fc405225e 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -109,7 +109,7 @@ _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *se int n = 1; int twice = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -162,4 +162,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=59cb50dae2d11dc1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2de726e06b68a08e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index b0c54fc809f4c1..d54264d75db1d2 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -793,7 +793,7 @@ _winapi_GetLongPathName(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; LPCWSTR path = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -897,7 +897,7 @@ _winapi_GetShortPathName(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *argsbuf[1]; LPCWSTR path = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2004,7 +2004,7 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args PyObject *argsbuf[1]; PyObject *on_type_read; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2124,4 +2124,4 @@ _winapi_CopyFile2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO return return_value; } -/*[clinic end generated code: output=2304c62187a90140 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=99af750bb10b5e32 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_zoneinfo.c.h b/Modules/clinic/_zoneinfo.c.h index 9905b6425e2f79..f2961b12715c80 100644 --- a/Modules/clinic/_zoneinfo.c.h +++ b/Modules/clinic/_zoneinfo.c.h @@ -55,7 +55,7 @@ zoneinfo_ZoneInfo_from_file(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *file_obj; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -116,7 +116,7 @@ zoneinfo_ZoneInfo_no_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *key; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -173,7 +173,7 @@ zoneinfo_ZoneInfo_clear_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *c Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *only_keys = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -221,7 +221,7 @@ zoneinfo_ZoneInfo_utcoffset(PyObject *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -264,7 +264,7 @@ zoneinfo_ZoneInfo_dst(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -308,7 +308,7 @@ zoneinfo_ZoneInfo_tzname(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -353,7 +353,7 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *key; unsigned char from_cache; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -372,4 +372,4 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con exit: return return_value; } -/*[clinic end generated code: output=2a15f32fdd2ab6cd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c92c60d6c3241d6f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index 2ed7eaa6abf7af..8e09bebdfae2dc 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -194,7 +194,7 @@ array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *bb; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -349,7 +349,7 @@ array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args PyObject *f; Py_ssize_t n; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -404,7 +404,7 @@ array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *f; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -650,7 +650,7 @@ array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -691,4 +691,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=ecd63acd7924c223 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bb7b89c568a8d9ea input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 1adca415dfee12..f77adebd6023d3 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -85,7 +85,7 @@ binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_buffer data = {NULL, NULL}; int backtick = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -161,7 +161,7 @@ binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_buffer data = {NULL, NULL}; int strict_mode = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -232,7 +232,7 @@ binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_buffer data = {NULL, NULL}; int newline = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -412,7 +412,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -501,7 +501,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -646,7 +646,7 @@ binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_buffer data = {NULL, NULL}; int header = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -724,7 +724,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int istext = 1; int header = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -767,4 +767,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=968767b663ed889d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a8bc5138d77c4611 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index 50745fd4f407a3..e3e05d4974bf6d 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -932,7 +932,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec double abs_tol = 0.0; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -982,4 +982,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=454309b21cfa9bf6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6e8e7fe487b07692 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index 9fff4da616ba00..8bba2cce667027 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -125,7 +125,7 @@ gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int generation = NUM_GENERATIONS - 1; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -309,33 +309,7 @@ PyDoc_STRVAR(gc_get_referrers__doc__, "Return the list of objects that directly refer to any of \'objs\'."); #define GC_GET_REFERRERS_METHODDEF \ - {"get_referrers", _PyCFunction_CAST(gc_get_referrers), METH_FASTCALL, gc_get_referrers__doc__}, - -static PyObject * -gc_get_referrers_impl(PyObject *module, PyObject *args); - -static PyObject * -gc_get_referrers(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("get_referrers", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = gc_get_referrers_impl(module, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"get_referrers", (PyCFunction)gc_get_referrers, METH_VARARGS, gc_get_referrers__doc__}, PyDoc_STRVAR(gc_get_referents__doc__, "get_referents($module, /, *objs)\n" @@ -344,33 +318,7 @@ PyDoc_STRVAR(gc_get_referents__doc__, "Return the list of objects that are directly referred to by \'objs\'."); #define GC_GET_REFERENTS_METHODDEF \ - {"get_referents", _PyCFunction_CAST(gc_get_referents), METH_FASTCALL, gc_get_referents__doc__}, - -static PyObject * -gc_get_referents_impl(PyObject *module, PyObject *args); - -static PyObject * -gc_get_referents(PyObject *module, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("get_referents", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = gc_get_referents_impl(module, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"get_referents", (PyCFunction)gc_get_referents, METH_VARARGS, gc_get_referents__doc__}, PyDoc_STRVAR(gc_get_objects__doc__, "get_objects($module, /, generation=None)\n" @@ -423,7 +371,7 @@ gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; Py_ssize_t generation = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -585,4 +533,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=0a7e91917adcb937 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=13d662cc458a71f4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index 050c21460d79d7..d9b4c036880408 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -71,7 +71,7 @@ batched_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t n; int strict = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -186,7 +186,7 @@ itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *it; PyObject *keyfunc = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -531,7 +531,7 @@ itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; Py_ssize_t r; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -602,7 +602,7 @@ itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyOb PyObject *iterable; Py_ssize_t r; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -673,7 +673,7 @@ itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; PyObject *robj = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -736,7 +736,7 @@ itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *binop = Py_None; PyObject *initial = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -809,7 +809,7 @@ itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *seq1; PyObject *seq2; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -908,7 +908,7 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *long_cnt = NULL; PyObject *long_step = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -928,4 +928,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=7b13be3075f2d6d3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ca02baa405489154 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 81eec310ddb21d..1b827f4533be44 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -672,7 +672,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject double abs_tol = 0.0; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -787,7 +787,7 @@ math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *iterable; PyObject *start = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -938,7 +938,7 @@ math_nextafter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje double y; PyObject *steps = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1011,4 +1011,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=755da3b1dbd9e45f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=549053f6aaaf3d4a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index ee7fb3d7c613f2..f5e369177cbfd9 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -121,7 +121,7 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -148,4 +148,4 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw exit: return return_value; } -/*[clinic end generated code: output=4dbca39332d3f52f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=930c187ecc3e68d2 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 8b285e4a8f0a72..a02bc0f9175b3a 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -484,7 +484,7 @@ _overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; HANDLE event = INVALID_HANDLE_VALUE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1239,4 +1239,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=958cbddbcc355f47 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3f6cd189f280532c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 4b9dbac9af031f..3c2385036414bd 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -76,7 +76,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -157,7 +157,7 @@ os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("lstat", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -257,7 +257,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -411,7 +411,7 @@ os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("chdir", "path", 0, 0, 0, PATH_HAVE_FCHDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -476,7 +476,7 @@ os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -565,7 +565,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = CHMOD_DEFAULT_FOLLOW_SYMLINKS; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -658,7 +658,7 @@ os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int fd; int mode; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -728,7 +728,7 @@ os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("lchmod", "path", 0, 0, 0, 0); int mode; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -806,7 +806,7 @@ os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * unsigned long flags; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -887,7 +887,7 @@ os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("lchflags", "path", 0, 0, 0, 0); unsigned long flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -956,7 +956,7 @@ os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("chroot", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1020,7 +1020,7 @@ os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1104,7 +1104,7 @@ os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1196,7 +1196,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1286,7 +1286,7 @@ os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k uid_t uid; gid_t gid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1359,7 +1359,7 @@ os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k uid_t uid; gid_t gid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1482,7 +1482,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dst_dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1585,7 +1585,7 @@ os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; path_t path = PATH_T_INITIALIZE_P("listdir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1701,7 +1701,7 @@ os_listmounts(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *argsbuf[1]; path_t volume = PATH_T_INITIALIZE_P("listmounts", "volume", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1765,7 +1765,7 @@ os__path_isdevdrive(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_path_isdevdrive", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1930,7 +1930,7 @@ os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_getvolumepathname", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1994,7 +1994,7 @@ os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_path_splitroot", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2137,7 +2137,7 @@ os__path_isdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje path_t path = PATH_T_INITIALIZE_P("_path_isdir", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2206,7 +2206,7 @@ os__path_isfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj path_t path = PATH_T_INITIALIZE_P("_path_isfile", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2275,7 +2275,7 @@ os__path_islink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj path_t path = PATH_T_INITIALIZE_P("_path_islink", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2344,7 +2344,7 @@ os__path_isjunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P path_t path = PATH_T_INITIALIZE_P("_path_isjunction", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2412,7 +2412,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE("_path_splitroot_ex", "path", 0, 1, 1, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2472,7 +2472,7 @@ os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE("_path_normpath", "path", 0, 1, 1, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2543,7 +2543,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int mode = 511; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2658,7 +2658,7 @@ os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int which; int who; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2726,7 +2726,7 @@ os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int who; int priority; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2805,7 +2805,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2896,7 +2896,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -2983,7 +2983,7 @@ os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("rmdir", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3053,7 +3053,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k const wchar_t *command = NULL; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3127,7 +3127,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *command = NULL; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3232,7 +3232,7 @@ os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("unlink", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3306,7 +3306,7 @@ os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("remove", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3427,7 +3427,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3519,7 +3519,7 @@ os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int status; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3632,7 +3632,7 @@ os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argv; PyObject *env; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3735,7 +3735,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *setsigdef = NULL; PyObject *scheduler = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3885,7 +3885,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *setsigdef = NULL; PyObject *scheduler = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4121,7 +4121,7 @@ os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *after_in_child = NULL; PyObject *after_in_parent = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4244,7 +4244,7 @@ os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; int policy; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4306,7 +4306,7 @@ os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; int policy; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4403,7 +4403,7 @@ os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *sched_priority; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -5731,7 +5731,7 @@ os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int options; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6068,7 +6068,7 @@ os_setns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; int nstype = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6141,7 +6141,7 @@ os_unshare(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *argsbuf[1]; int flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6211,7 +6211,7 @@ os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("readlink", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6297,7 +6297,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int target_is_directory = 0; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6426,7 +6426,7 @@ os_timerfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int clockid; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6510,7 +6510,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py double initial_double = 0.0; double interval_double = 0.0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6624,7 +6624,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, long long initial = 0; long long interval = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -6941,7 +6941,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dir_fd = DEFAULT_DIR_FD; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7029,7 +7029,7 @@ os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7162,7 +7162,7 @@ os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int inheritable = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7622,7 +7622,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *trailers = NULL; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7724,7 +7724,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *trailers = NULL; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7829,7 +7829,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *offobj; Py_ssize_t count; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -7954,7 +7954,7 @@ os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -8307,7 +8307,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *offset_src = Py_None; PyObject *offset_dst = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, 0, argsbuf); if (!args) { goto exit; } @@ -8422,7 +8422,7 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *offset_dst = Py_None; unsigned int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); if (!args) { goto exit; } @@ -8527,7 +8527,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode = 438; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -8628,7 +8628,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw dev_t device = 0; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -8868,7 +8868,7 @@ os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("truncate", "path", 0, 0, 0, PATH_HAVE_FTRUNCATE); Py_off_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9260,7 +9260,7 @@ os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9327,7 +9327,7 @@ os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9394,7 +9394,7 @@ os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9461,7 +9461,7 @@ os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9528,7 +9528,7 @@ os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9595,7 +9595,7 @@ os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9662,7 +9662,7 @@ os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9766,7 +9766,7 @@ os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("statvfs", "path", 0, 0, 0, PATH_HAVE_FSTATVFS); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9830,7 +9830,7 @@ os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_getdiskusage", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -9946,7 +9946,7 @@ os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int name; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10138,7 +10138,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t cwd = PATH_T_INITIALIZE_P("startfile", "cwd", 1, 0, 0, 0); int show_cmd = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10277,7 +10277,7 @@ os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10474,7 +10474,7 @@ os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t attribute = PATH_T_INITIALIZE_P("getxattr", "attribute", 0, 0, 0, 0); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10563,7 +10563,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10669,7 +10669,7 @@ os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje path_t attribute = PATH_T_INITIALIZE_P("removexattr", "attribute", 0, 0, 0, 0); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10754,7 +10754,7 @@ os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("listxattr", "path", 1, 0, 0, 1); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10872,7 +10872,7 @@ os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *name = NULL; unsigned int flags = MFD_CLOEXEC; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -10946,7 +10946,7 @@ os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * unsigned int initval; int flags = EFD_CLOEXEC; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11015,7 +11015,7 @@ os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11078,7 +11078,7 @@ os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int fd; unsigned long long value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11487,7 +11487,7 @@ os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11552,7 +11552,7 @@ os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11621,7 +11621,7 @@ os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *cons int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11730,7 +11730,7 @@ os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; path_t path = PATH_T_INITIALIZE_P("scandir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11798,7 +11798,7 @@ os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; PyObject *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11857,7 +11857,7 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t size; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11942,7 +11942,7 @@ os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_add_dll_directory", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -12010,7 +12010,7 @@ os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *argsbuf[1]; PyObject *cookie; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -12081,7 +12081,7 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; PyObject *status_obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -12837,4 +12837,4 @@ os__create_environ(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ -/*[clinic end generated code: output=2fafa0d2814948f8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8dd4d597e70e7108 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 682d8481a2a2f4..0c18b870cbb39c 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -91,7 +91,7 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const PyObject *data; int isfinal = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -143,7 +143,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *c PyObject *argsbuf[1]; PyObject *file; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -267,7 +267,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject const char *context; const char *encoding = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -384,7 +384,7 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObjec PyObject *argsbuf[1]; int flag = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -453,7 +453,7 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, const char *namespace_separator = NULL; PyObject *intern = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -545,4 +545,4 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg) #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */ -/*[clinic end generated code: output=9f1e9a7192d29976 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f5960f0528d2af18 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index 49c0e48d2e0eac..04a987cdd4bac4 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -596,7 +596,7 @@ select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) int sizehint = -1; int flags = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -766,7 +766,7 @@ select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na int fd; unsigned int eventmask = EPOLLIN | EPOLLPRI | EPOLLOUT; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -843,7 +843,7 @@ select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t narg int fd; unsigned int eventmask; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -912,7 +912,7 @@ select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -986,7 +986,7 @@ select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *timeout_obj = Py_None; int maxevents = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1360,4 +1360,4 @@ select_kqueue_control(kqueue_queue_Object *self, PyObject *const *args, Py_ssize #ifndef SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ -/*[clinic end generated code: output=f99427b75cbe6d44 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=edfdade5afb19de4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index b89c7e505c788e..110df15ad448f9 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -121,7 +121,7 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -148,4 +148,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=af5a640df662066f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9a5a3473dc1e813e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h index cf4b88d52856b8..ec7ded20067096 100644 --- a/Modules/clinic/sha2module.c.h +++ b/Modules/clinic/sha2module.c.h @@ -188,7 +188,7 @@ _sha2_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -262,7 +262,7 @@ _sha2_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -336,7 +336,7 @@ _sha2_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -410,7 +410,7 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -437,4 +437,4 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=b46da764024b1764 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7f1a0432c4f191d1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha3module.c.h b/Modules/clinic/sha3module.c.h index 738e9589503900..d85ab06ab448b6 100644 --- a/Modules/clinic/sha3module.c.h +++ b/Modules/clinic/sha3module.c.h @@ -54,7 +54,7 @@ py_sha3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *data = NULL; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -194,4 +194,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=a8e76a880d1421ec input=a9049054013a1b77]*/ +/*[clinic end generated code: output=01eca8c0fc4ef1b5 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 1d3a143dfd8d39..2969df1dea5245 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -332,7 +332,7 @@ signal_set_wakeup_fd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *fdobj; int warn_on_full_buffer = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -776,4 +776,4 @@ signal_pidfd_send_signal(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */ -/*[clinic end generated code: output=6d8e17a32cef668f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=46084b29ab9c637c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 7b0a3f8d4b1cc6..b1d2b6d337727a 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -77,7 +77,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) int proto = -1; PyObject *fdobj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -286,4 +286,4 @@ _socket_socket_if_nametoindex(PySocketSockObject *self, PyObject *arg) #ifndef _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #define _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #endif /* !defined(_SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF) */ -/*[clinic end generated code: output=6037e47b012911c5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a888057b404f8d2d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index 77cf24ea5ba9ca..63f4d49cee0b31 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -58,7 +58,7 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje long logopt = 0; long facility = LOG_USER; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -262,4 +262,4 @@ syslog_LOG_UPTO(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=8d25899bd31969d3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e26dcd1fe726a2f6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 7ff3edf5a557f8..e40936783d6d46 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -63,7 +63,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int level = Z_DEFAULT_COMPRESSION; int wbits = MAX_WBITS; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -153,7 +153,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int wbits = MAX_WBITS; Py_ssize_t bufsize = DEF_BUF_SIZE; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -271,7 +271,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int strategy = Z_DEFAULT_STRATEGY; Py_buffer zdict = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int wbits = MAX_WBITS; PyObject *zdict = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -454,7 +454,7 @@ zlib_Compress_compress(compobject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; Py_buffer data = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -530,7 +530,7 @@ zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -602,7 +602,7 @@ zlib_Compress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; int mode = Z_FINISH; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -705,7 +705,7 @@ zlib_Compress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const PyObject *argsbuf[1]; PyObject *memo; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -803,7 +803,7 @@ zlib_Decompress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *memo; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -852,7 +852,7 @@ zlib_Decompress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args PyObject *argsbuf[1]; Py_ssize_t length = DEF_BUF_SIZE; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -938,7 +938,7 @@ zlib_ZlibDecompressor_decompress(ZlibDecompressor *self, PyObject *const *args, Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1098,4 +1098,4 @@ zlib_crc32(PyObject *module, PyObject *const *args, Py_ssize_t nargs) #ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */ -/*[clinic end generated code: output=8bb840fb6af43dd4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7a532d89f6515797 input=a9049054013a1b77]*/ diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 57e4aae9ed557e..4fbdf9052816f3 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -221,8 +221,8 @@ Return the list of objects that directly refer to any of 'objs'. [clinic start generated code]*/ static PyObject * -gc_get_referrers_impl(PyObject *module, PyObject *args) -/*[clinic end generated code: output=296a09587f6a86b5 input=bae96961b14a0922]*/ +gc_get_referrers(PyObject *module, PyObject *args) +/*[clinic end generated code: output=e11e352b7e0cdce0 input=bae96961b14a0922]*/ { if (PySys_Audit("gc.get_referrers", "(O)", args) < 0) { return NULL; @@ -269,8 +269,8 @@ Return the list of objects that are directly referred to by 'objs'. [clinic start generated code]*/ static PyObject * -gc_get_referents_impl(PyObject *module, PyObject *args) -/*[clinic end generated code: output=d47dc02cefd06fe8 input=b3ceab0c34038cbf]*/ +gc_get_referents(PyObject *module, PyObject *args) +/*[clinic end generated code: output=9efb544e74953e38 input=b3ceab0c34038cbf]*/ { if (PySys_Audit("gc.get_referents", "(O)", args) < 0) { return NULL; diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index c748c53e1c0a75..58c68ab8c0e7fe 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -50,7 +50,7 @@ bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -617,7 +617,7 @@ bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t n PyObject *table; PyObject *deletechars = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -804,7 +804,7 @@ bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -926,7 +926,7 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1303,7 +1303,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1409,7 +1409,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1522,7 +1522,7 @@ bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1616,4 +1616,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=5f861b02e3fa278b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d6770a8f30d5045f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 0b4b37501735c1..493b7e92213be4 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -81,7 +81,7 @@ bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -247,7 +247,7 @@ bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -702,7 +702,7 @@ bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *table; PyObject *deletechars = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1063,7 +1063,7 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1156,7 +1156,7 @@ bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1269,7 +1269,7 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1334,7 +1334,7 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1384,4 +1384,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=d6801c6001e57f91 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2262747a40245e76 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index 68e2d7f528c061..eb1cef211a8d47 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -223,7 +223,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *co_linetable = self->co_linetable; PyObject *co_exceptiontable = self->co_exceptiontable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -451,7 +451,7 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n PyObject *argsbuf[1]; int oparg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -464,4 +464,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=d604263a3ca72a0f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1890970a003cbd1b input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 58fd4e26871b4d..5f004360988665 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -140,7 +140,7 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *r = NULL; PyObject *i = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -169,4 +169,4 @@ PyDoc_STRVAR(complex_from_number__doc__, #define COMPLEX_FROM_NUMBER_METHODDEF \ {"from_number", (PyCFunction)complex_from_number, METH_O|METH_CLASS, complex_from_number__doc__}, -/*[clinic end generated code: output=188438cc9ae167f7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=963680825c224a12 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index d79be80d3ec165..3a06427ab3c776 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -51,7 +51,7 @@ mappingproxy_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *mapping; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -141,7 +141,7 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *fdel = NULL; PyObject *doc = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -173,4 +173,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=050e331316a04207 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=74a4ad2f7bef2b0c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 09774a73c8145c..55075f5104508c 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -62,7 +62,7 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; PyObject *start = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -107,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=5c48a9a482a52e91 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c8c45aca15d6d540 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 8f20bda26438cf..593f4b1db6bbac 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -73,7 +73,7 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *closure = Py_None; PyObject *kwdefaults = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -115,4 +115,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=10947342188f38a9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=90bf8ef1757569ca input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 588e021fb71fd3..c438feab433e9d 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -235,7 +235,7 @@ list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *keyfunc = Py_None; int reverse = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -439,4 +439,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=854957a1d4a89bbd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1a94d259d06b8847 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 90375b9a082cca..1ce256a0860aa6 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -48,7 +48,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *x = NULL; PyObject *obase = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -315,7 +315,7 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *byteorder = NULL; int is_signed = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -426,7 +426,7 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *byteorder = NULL; int is_signed = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -476,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored)) { return int_is_integer_impl(self); } -/*[clinic end generated code: output=a53f5ba9a6c16737 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7c25ba2c37f5ae49 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index f199434dacb9e8..26dc82ce17da37 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -51,7 +51,7 @@ memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *object; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -107,7 +107,7 @@ memoryview__from_flags(PyTypeObject *type, PyObject *const *args, Py_ssize_t nar PyObject *object; int flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -187,7 +187,7 @@ memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t narg PyObject *format; PyObject *shape = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -294,7 +294,7 @@ memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t n Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *order = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -413,4 +413,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=7e76a09106921ba2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e8841d6ba2137ad input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index 3c0bbe22d5ebab..baade99470e367 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -55,7 +55,7 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *name; PyObject *doc = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -74,4 +74,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=e8a71bfbed774c15 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b481af93ff176cb7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index 5ef5380656905a..f7592823951e87 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -54,7 +54,7 @@ OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs PyObject *seq; PyObject *value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -119,7 +119,7 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na PyObject *key; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -185,7 +185,7 @@ OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *key; PyObject *default_value = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -248,7 +248,7 @@ OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int last = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -314,7 +314,7 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n PyObject *key; int last = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -332,4 +332,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=eff78d2a3f9379bd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8a132fa582835ff3 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/setobject.c.h b/Objects/clinic/setobject.c.h index 3853ce3bce685b..7b55a67f7b81b0 100644 --- a/Objects/clinic/setobject.c.h +++ b/Objects/clinic/setobject.c.h @@ -3,7 +3,6 @@ preserve [clinic start generated code]*/ #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() -#include "pycore_modsupport.h" // _PyArg_CheckPositional() PyDoc_STRVAR(set_pop__doc__, "pop($self, /)\n" @@ -38,33 +37,7 @@ PyDoc_STRVAR(set_update__doc__, "Update the set, adding elements from all others."); #define SET_UPDATE_METHODDEF \ - {"update", _PyCFunction_CAST(set_update), METH_FASTCALL, set_update__doc__}, - -static PyObject * -set_update_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_update(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("update", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_update_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"update", (PyCFunction)set_update, METH_VARARGS, set_update__doc__}, PyDoc_STRVAR(set_copy__doc__, "copy($self, /)\n" @@ -145,33 +118,7 @@ PyDoc_STRVAR(set_union__doc__, "Return a new set with elements from the set and all others."); #define SET_UNION_METHODDEF \ - {"union", _PyCFunction_CAST(set_union), METH_FASTCALL, set_union__doc__}, - -static PyObject * -set_union_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_union(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("union", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_union_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"union", (PyCFunction)set_union, METH_VARARGS, set_union__doc__}, PyDoc_STRVAR(set_intersection_multi__doc__, "intersection($self, /, *others)\n" @@ -180,33 +127,7 @@ PyDoc_STRVAR(set_intersection_multi__doc__, "Return a new set with elements common to the set and all others."); #define SET_INTERSECTION_MULTI_METHODDEF \ - {"intersection", _PyCFunction_CAST(set_intersection_multi), METH_FASTCALL, set_intersection_multi__doc__}, - -static PyObject * -set_intersection_multi_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_intersection_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("intersection", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_intersection_multi_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"intersection", (PyCFunction)set_intersection_multi, METH_VARARGS, set_intersection_multi__doc__}, PyDoc_STRVAR(set_intersection_update_multi__doc__, "intersection_update($self, /, *others)\n" @@ -215,33 +136,7 @@ PyDoc_STRVAR(set_intersection_update_multi__doc__, "Update the set, keeping only elements found in it and all others."); #define SET_INTERSECTION_UPDATE_MULTI_METHODDEF \ - {"intersection_update", _PyCFunction_CAST(set_intersection_update_multi), METH_FASTCALL, set_intersection_update_multi__doc__}, - -static PyObject * -set_intersection_update_multi_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_intersection_update_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("intersection_update", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_intersection_update_multi_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"intersection_update", (PyCFunction)set_intersection_update_multi, METH_VARARGS, set_intersection_update_multi__doc__}, PyDoc_STRVAR(set_isdisjoint__doc__, "isdisjoint($self, other, /)\n" @@ -274,33 +169,7 @@ PyDoc_STRVAR(set_difference_update__doc__, "Update the set, removing elements found in others."); #define SET_DIFFERENCE_UPDATE_METHODDEF \ - {"difference_update", _PyCFunction_CAST(set_difference_update), METH_FASTCALL, set_difference_update__doc__}, - -static PyObject * -set_difference_update_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_difference_update(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("difference_update", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_difference_update_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"difference_update", (PyCFunction)set_difference_update, METH_VARARGS, set_difference_update__doc__}, PyDoc_STRVAR(set_difference_multi__doc__, "difference($self, /, *others)\n" @@ -309,33 +178,7 @@ PyDoc_STRVAR(set_difference_multi__doc__, "Return a new set with elements in the set that are not in the others."); #define SET_DIFFERENCE_MULTI_METHODDEF \ - {"difference", _PyCFunction_CAST(set_difference_multi), METH_FASTCALL, set_difference_multi__doc__}, - -static PyObject * -set_difference_multi_impl(PySetObject *so, PyObject *args); - -static PyObject * -set_difference_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) -{ - PyObject *return_value = NULL; - PyObject *__clinic_args = NULL; - - if (!_PyArg_CheckPositional("difference", nargs, 0, PY_SSIZE_T_MAX)) { - goto exit; - } - __clinic_args = PyTuple_New(nargs - 0); - if (!__clinic_args) { - goto exit; - } - for (Py_ssize_t i = 0; i < nargs - 0; ++i) { - PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i])); - } - return_value = set_difference_multi_impl(so, __clinic_args); - -exit: - Py_XDECREF(__clinic_args); - return return_value; -} + {"difference", (PyCFunction)set_difference_multi, METH_VARARGS, set_difference_multi__doc__}, PyDoc_STRVAR(set_symmetric_difference_update__doc__, "symmetric_difference_update($self, other, /)\n" @@ -568,4 +411,4 @@ set___sizeof__(PySetObject *so, PyObject *Py_UNUSED(ignored)) return return_value; } -/*[clinic end generated code: output=de4ee725bd29f758 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=730d916d496cb8b7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index cec49ebccccb24..34fcbb04ff7c79 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -47,7 +47,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *arg; PyObject *dict = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -62,4 +62,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=5bf39b3f06a34ce4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0a357a8f8a803dc6 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h index 0ba4ff48bc8804..71dcf0eaa9ca05 100644 --- a/Objects/clinic/typevarobject.c.h +++ b/Objects/clinic/typevarobject.c.h @@ -6,7 +6,7 @@ preserve # include "pycore_gc.h" // PyGC_Head # include "pycore_runtime.h" // _Py_ID() #endif -#include "pycore_modsupport.h" // _PyArg_UnpackKeywordsWithVararg() +#include "pycore_modsupport.h" // _PyArg_UnpackKeywords() PyDoc_STRVAR(typevar_new__doc__, "typevar(name, *constraints, bound=None, default=typing.NoDefault,\n" @@ -49,7 +49,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[7]; + PyObject *argsbuf[6]; PyObject * const *fastargs; Py_ssize_t nargs = PyTuple_GET_SIZE(args); Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1; @@ -61,7 +61,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int contravariant = 0; int infer_variance = 0; - fastargs = _PyArg_UnpackKeywordsWithVararg(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 1, argsbuf); if (!fastargs) { goto exit; } @@ -70,24 +70,23 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto exit; } name = fastargs[0]; - constraints = fastargs[1]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[2]) { - bound = fastargs[2]; + if (fastargs[1]) { + bound = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3]) { - default_value = fastargs[3]; + if (fastargs[2]) { + default_value = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[4]) { - covariant = PyObject_IsTrue(fastargs[4]); + if (fastargs[3]) { + covariant = PyObject_IsTrue(fastargs[3]); if (covariant < 0) { goto exit; } @@ -95,8 +94,8 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[5]) { - contravariant = PyObject_IsTrue(fastargs[5]); + if (fastargs[4]) { + contravariant = PyObject_IsTrue(fastargs[4]); if (contravariant < 0) { goto exit; } @@ -104,15 +103,21 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - infer_variance = PyObject_IsTrue(fastargs[6]); + infer_variance = PyObject_IsTrue(fastargs[5]); if (infer_variance < 0) { goto exit; } skip_optional_kwonly: + constraints = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX); + if (!constraints) { + goto exit; + } return_value = typevar_new_impl(type, name, constraints, bound, default_value, covariant, contravariant, infer_variance); exit: + /* Cleanup for constraints */ Py_XDECREF(constraints); + return return_value; } @@ -231,7 +236,7 @@ paramspecargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *origin; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -285,7 +290,7 @@ paramspeckwargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *origin; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -348,7 +353,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int contravariant = 0; int infer_variance = 0; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -519,7 +524,7 @@ typevartuple(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *name; PyObject *default_value = &_Py_NoDefaultStruct; - 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, 1, 1, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -675,7 +680,7 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *value; PyObject *type_params = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -695,4 +700,4 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=73b39e550e4e336c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=682ae821936a44c1 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 78e14b0021d006..d5d955c97deaff 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -246,7 +246,7 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -338,7 +338,7 @@ unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int tabsize = 8; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -958,7 +958,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *new; Py_ssize_t count = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1282,7 +1282,7 @@ unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1404,7 +1404,7 @@ unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1484,7 +1484,7 @@ unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1838,7 +1838,7 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1888,4 +1888,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=9fee62bd337f809b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8abe66fb123b96da input=a9049054013a1b77]*/ diff --git a/Objects/setobject.c b/Objects/setobject.c index c5f96d25585fa4..cf3a41430393e6 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1054,8 +1054,8 @@ Update the set, adding elements from all others. [clinic start generated code]*/ static PyObject * -set_update_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=34f6371704974c8a input=df4fe486e38cd337]*/ +set_update(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=b3516a6b8873ab3d input=df4fe486e38cd337]*/ { Py_ssize_t i; @@ -1283,8 +1283,8 @@ Return a new set with elements from the set and all others. [clinic start generated code]*/ static PyObject * -set_union_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=2c83d05a446a1477 input=ddf088706e9577b2]*/ +set_union(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=18a3fb9e0825f1e5 input=ddf088706e9577b2]*/ { PySetObject *result; PyObject *other; @@ -1432,8 +1432,8 @@ Return a new set with elements common to the set and all others. [clinic start generated code]*/ static PyObject * -set_intersection_multi_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=2406ef3387adbe2f input=0d9f3805ccbba6a4]*/ +set_intersection_multi(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=afd6705c675015e6 input=0d9f3805ccbba6a4]*/ { Py_ssize_t i; @@ -1479,12 +1479,12 @@ Update the set, keeping only elements found in it and all others. [clinic start generated code]*/ static PyObject * -set_intersection_update_multi_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=251c1f729063609d input=223c1e086aa669a9]*/ +set_intersection_update_multi(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=9a7a88d756f4a487 input=223c1e086aa669a9]*/ { PyObject *tmp; - tmp = set_intersection_multi_impl(so, args); + tmp = set_intersection_multi(so, args); if (tmp == NULL) return NULL; Py_BEGIN_CRITICAL_SECTION(so); @@ -1666,8 +1666,8 @@ Update the set, removing elements found in others. [clinic start generated code]*/ static PyObject * -set_difference_update_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=28685b2fc63e41c4 input=024e6baa6fbcbb3d]*/ +set_difference_update(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=3772a59f66245bfe input=024e6baa6fbcbb3d]*/ { Py_ssize_t i; @@ -1783,8 +1783,8 @@ Return a new set with elements in the set that are not in the others. [clinic start generated code]*/ static PyObject * -set_difference_multi_impl(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=3130c3bb3cac873d input=ba78ea5f099e58df]*/ +set_difference_multi(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=fd1ef7ff9566b605 input=ba78ea5f099e58df]*/ { Py_ssize_t i; PyObject *result, *other; diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index cef7a9496fa874..223773fe1c32c5 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -56,7 +56,7 @@ stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int tabsize = 8; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -321,4 +321,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=06dd79019356b6bb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2f983f50ff6b1e99 input=a9049054013a1b77]*/ diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h index fccf3d795d5340..1bb6726b396c44 100644 --- a/PC/clinic/_wmimodule.cpp.h +++ b/PC/clinic/_wmimodule.cpp.h @@ -55,7 +55,7 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; PyObject *query; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -69,4 +69,4 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj exit: return return_value; } -/*[clinic end generated code: output=ba04920d127f3ceb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=25bdc78997031840 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 7e5545e113e718..07aa60f9151199 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -351,7 +351,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py REGSAM access = KEY_WRITE; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -534,7 +534,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py REGSAM access = KEY_WOW64_64KEY; int reserved = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -966,7 +966,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje REGSAM access = KEY_READ; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1083,7 +1083,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb REGSAM access = KEY_READ; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1762,4 +1762,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) #ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF #define WINREG_QUERYREFLECTIONKEY_METHODDEF #endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=1ee4098b2f143b6a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=896dbd1bccdedebb input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index 730fa8ef2a2154..aa6441c4592fdf 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -49,7 +49,7 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int extra_tokens; const char *encoding = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -80,4 +80,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=dcd6ec48f06a092e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6c4d4137d988ae0d input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index 98dc49db3059b1..d67562fb421086 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -74,7 +74,7 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *source = Py_None; PyTupleObject *skip_file_prefixes = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); if (!args) { goto exit; } @@ -184,7 +184,7 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *module_globals = Py_None; PyObject *sourceobj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, 0, argsbuf); if (!args) { goto exit; } @@ -244,4 +244,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored)) { return warnings_filters_mutated_impl(module); } -/*[clinic end generated code: output=f2d4214c382717a6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4f2020f0ede0871e input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index f75a8d4ac0ccd4..6e3e05fa4c99be 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -7,6 +7,7 @@ preserve # include "pycore_runtime.h" // _Py_ID() #endif #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() +#include "pycore_tuple.h" // _PyTuple_FromArray() PyDoc_STRVAR(builtin___import____doc__, "__import__($module, /, name, globals=None, locals=None, fromlist=(),\n" @@ -73,7 +74,7 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *fromlist = NULL; int level = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); if (!args) { goto exit; } @@ -298,7 +299,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int optimize = -1; int feature_version = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); if (!args) { goto exit; } @@ -448,7 +449,7 @@ builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *globals = Py_None; PyObject *locals = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -527,7 +528,7 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *locals = Py_None; PyObject *closure = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -865,7 +866,7 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *exp; PyObject *mod = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -933,7 +934,8 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[5]; + PyObject *argsbuf[4]; + PyObject * const *fastargs; Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *__clinic_args = NULL; PyObject *sep = Py_None; @@ -941,41 +943,46 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *file = Py_None; int flush = 0; - args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + if (!fastargs) { goto exit; } - __clinic_args = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { - sep = args[1]; + if (fastargs[0]) { + sep = fastargs[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[2]) { - end = args[2]; + if (fastargs[1]) { + end = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3]) { - file = args[3]; + if (fastargs[2]) { + file = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - flush = PyObject_IsTrue(args[4]); + flush = PyObject_IsTrue(fastargs[3]); if (flush < 0) { goto exit; } skip_optional_kwonly: + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } return_value = builtin_print_impl(module, __clinic_args, sep, end, file, flush); exit: + /* Cleanup for args */ Py_XDECREF(__clinic_args); + return return_value; } @@ -1077,7 +1084,7 @@ builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *number; PyObject *ndigits = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1143,7 +1150,7 @@ builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *iterable; PyObject *start = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1228,4 +1235,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=435d3f286a863c49 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a25d6dfbf3079304 input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 5edeaef656ef62..31cd7e0a7d0f17 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -223,7 +223,7 @@ _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *name; int withdata = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -594,7 +594,7 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb long key; Py_buffer source = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -623,4 +623,4 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb #ifndef _IMP_EXEC_DYNAMIC_METHODDEF #define _IMP_EXEC_DYNAMIC_METHODDEF #endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */ -/*[clinic end generated code: output=dbd63707bd40b07c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e801e47448df8e84 input=a9049054013a1b77]*/ diff --git a/Python/clinic/instruction_sequence.c.h b/Python/clinic/instruction_sequence.c.h index 66c2ccadfa03c9..616a061e3bbaab 100644 --- a/Python/clinic/instruction_sequence.c.h +++ b/Python/clinic/instruction_sequence.c.h @@ -82,7 +82,7 @@ InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const PyObject *argsbuf[1]; int label; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -148,7 +148,7 @@ InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *arg int end_lineno; int end_col_offset; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); if (!args) { goto exit; } @@ -255,7 +255,7 @@ InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const PyObject *argsbuf[1]; PyObject *nested; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -301,4 +301,4 @@ InstructionSequenceType_get_instructions(_PyInstructionSequence *self, PyObject { return InstructionSequenceType_get_instructions_impl(self); } -/*[clinic end generated code: output=8809d7aa11d9b2bb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d27cfe58b6f3f332 input=a9049054013a1b77]*/ diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index c19a3ed5050ed3..75be65f816bf9b 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -70,7 +70,7 @@ marshal_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int version = Py_MARSHAL_VERSION; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); if (!args) { goto exit; } @@ -157,7 +157,7 @@ marshal_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *file; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -234,7 +234,7 @@ marshal_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int version = Py_MARSHAL_VERSION; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); if (!args) { goto exit; } @@ -314,7 +314,7 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec Py_buffer bytes = {NULL, NULL}; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -339,4 +339,4 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec return return_value; } -/*[clinic end generated code: output=1575b9a3ae48ad3d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8f25dc60e1f525c8 input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index 8277d286cf51ef..9316f8a2d30587 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -52,7 +52,7 @@ sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; PyObject *hook; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -561,7 +561,7 @@ sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, PyObject *argsbuf[1]; int depth; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -862,7 +862,7 @@ sys_set_int_max_str_digits(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *argsbuf[1]; int maxdigits; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1013,7 +1013,7 @@ sys_getunicodeinternedsize(PyObject *module, PyObject *const *args, Py_ssize_t n int _only_immortal = 0; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1479,7 +1479,7 @@ sys__getframemodulename(PyObject *module, PyObject *const *args, Py_ssize_t narg Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int depth = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1614,4 +1614,4 @@ sys__is_gil_enabled(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=9cc9069aef1482bc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fdec7ddc2508d65f input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index fe53a2786d1ad6..6a6d40b3e0f5b3 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -55,7 +55,7 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int tb_lasti; int tb_lineno; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -78,4 +78,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=916a759875507c5a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a82471b667511d1d input=a9049054013a1b77]*/ diff --git a/Python/getargs.c b/Python/getargs.c index 1b9b39939ae94e..115257996f7234 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2314,7 +2314,7 @@ PyObject * const * _PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs, PyObject *kwnames, struct _PyArg_Parser *parser, - int minpos, int maxpos, int minkw, + int minpos, int maxpos, int minkw, int varpos, PyObject **buf) { PyObject *kwtuple; @@ -2360,11 +2360,11 @@ _PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, else { nkwargs = 0; } - if (nkwargs == 0 && minkw == 0 && minpos <= nargs && nargs <= maxpos) { + if (nkwargs == 0 && minkw == 0 && minpos <= nargs && (varpos || nargs <= maxpos)) { /* Fast path. */ return args; } - if (nargs + nkwargs > maxargs) { + if (!varpos && nargs + nkwargs > maxargs) { /* Adding "keyword" (when nargs == 0) prevents producing wrong error messages in some special cases (see bpo-31229). */ PyErr_Format(PyExc_TypeError, @@ -2377,7 +2377,7 @@ _PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, nargs + nkwargs); return NULL; } - if (nargs > maxpos) { + if (!varpos && nargs > maxpos) { if (maxpos == 0) { PyErr_Format(PyExc_TypeError, "%.200s%s takes no positional arguments", @@ -2402,13 +2402,16 @@ _PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, " (%zd given)", (parser->fname == NULL) ? "function" : parser->fname, (parser->fname == NULL) ? "" : "()", - minposonly < maxpos ? "at least" : "exactly", + (varpos || minposonly < maxpos) ? "at least" : "exactly", minposonly, minposonly == 1 ? "" : "s", nargs); return NULL; } + if (varpos) { + nargs = Py_MIN(maxpos, nargs); + } /* copy tuple args */ for (i = 0; i < nargs; i++) { buf[i] = args[i]; @@ -2486,157 +2489,6 @@ _PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, return buf; } -PyObject * const * -_PyArg_UnpackKeywordsWithVararg(PyObject *const *args, Py_ssize_t nargs, - PyObject *kwargs, PyObject *kwnames, - struct _PyArg_Parser *parser, - int minpos, int maxpos, int minkw, - int vararg, PyObject **buf) -{ - PyObject *kwtuple; - PyObject *keyword; - Py_ssize_t varargssize = 0; - int i, posonly, minposonly, maxargs; - int reqlimit = minkw ? maxpos + minkw : minpos; - Py_ssize_t nkwargs; - PyObject * const *kwstack = NULL; - - assert(kwargs == NULL || PyDict_Check(kwargs)); - assert(kwargs == NULL || kwnames == NULL); - - if (parser == NULL) { - PyErr_BadInternalCall(); - return NULL; - } - - if (kwnames != NULL && !PyTuple_Check(kwnames)) { - PyErr_BadInternalCall(); - return NULL; - } - - if (args == NULL && nargs == 0) { - args = buf; - } - - if (parser_init(parser) < 0) { - return NULL; - } - - kwtuple = parser->kwtuple; - posonly = parser->pos; - minposonly = Py_MIN(posonly, minpos); - maxargs = posonly + (int)PyTuple_GET_SIZE(kwtuple); - if (kwargs != NULL) { - nkwargs = PyDict_GET_SIZE(kwargs); - } - else if (kwnames != NULL) { - nkwargs = PyTuple_GET_SIZE(kwnames); - kwstack = args + nargs; - } - else { - nkwargs = 0; - } - if (nargs < minposonly) { - PyErr_Format(PyExc_TypeError, - "%.200s%s takes %s %d positional argument%s" - " (%zd given)", - (parser->fname == NULL) ? "function" : parser->fname, - (parser->fname == NULL) ? "" : "()", - minposonly < maxpos ? "at least" : "exactly", - minposonly, - minposonly == 1 ? "" : "s", - nargs); - return NULL; - } - - /* create varargs tuple */ - varargssize = nargs - maxpos; - if (varargssize < 0) { - varargssize = 0; - } - buf[vararg] = PyTuple_New(varargssize); - if (!buf[vararg]) { - return NULL; - } - - /* copy tuple args */ - for (i = 0; i < nargs; i++) { - if (i >= vararg) { - PyTuple_SET_ITEM(buf[vararg], i - vararg, Py_NewRef(args[i])); - continue; - } - else { - buf[i] = args[i]; - } - } - - /* copy keyword args using kwtuple to drive process */ - for (i = Py_MAX((int)nargs, posonly) - Py_SAFE_DOWNCAST(varargssize, Py_ssize_t, int); i < maxargs; i++) { - PyObject *current_arg; - if (nkwargs) { - keyword = PyTuple_GET_ITEM(kwtuple, i - posonly); - if (kwargs != NULL) { - if (PyDict_GetItemRef(kwargs, keyword, ¤t_arg) < 0) { - goto exit; - } - } - else { - current_arg = find_keyword(kwnames, kwstack, keyword); - } - } - else { - current_arg = NULL; - } - - /* If an arguments is passed in as a keyword argument, - * it should be placed before `buf[vararg]`. - * - * For example: - * def f(a, /, b, *args): - * pass - * f(1, b=2) - * - * This `buf` array should be: [1, 2, NULL]. - * In this case, nargs < vararg. - * - * Otherwise, we leave a place at `buf[vararg]` for vararg tuple - * so the index is `i + 1`. */ - if (i < vararg) { - buf[i] = current_arg; - } - else { - buf[i + 1] = current_arg; - } - - if (current_arg) { - Py_DECREF(current_arg); - --nkwargs; - } - else if (i < minpos || (maxpos <= i && i < reqlimit)) { - /* Less arguments than required */ - keyword = PyTuple_GET_ITEM(kwtuple, i - posonly); - PyErr_Format(PyExc_TypeError, "%.200s%s missing required " - "argument '%U' (pos %d)", - (parser->fname == NULL) ? "function" : parser->fname, - (parser->fname == NULL) ? "" : "()", - keyword, i+1); - goto exit; - } - } - - if (nkwargs > 0) { - error_unexpected_keyword_arg(kwargs, kwnames, kwtuple, parser->fname); - goto exit; - } - - return buf; - -exit: - Py_XDECREF(buf[vararg]); - return NULL; -} - - static const char * skipitem(const char **p_format, va_list *p_va, int flags) { diff --git a/Tools/clinic/libclinic/clanguage.py b/Tools/clinic/libclinic/clanguage.py index 73d47833d97294..32d2c045b06bca 100644 --- a/Tools/clinic/libclinic/clanguage.py +++ b/Tools/clinic/libclinic/clanguage.py @@ -404,9 +404,6 @@ def render_function( if (i != -1) and (p.default is not unspecified): first_optional = min(first_optional, i) - if p.is_vararg(): - data.cleanup.append(f"Py_XDECREF({c.parser_name});") - # insert group variable group = p.group if last_group != group: diff --git a/Tools/clinic/libclinic/converter.py b/Tools/clinic/libclinic/converter.py index 2abf06dc4e89a2..2fb32cb23cf446 100644 --- a/Tools/clinic/libclinic/converter.py +++ b/Tools/clinic/libclinic/converter.py @@ -296,7 +296,10 @@ def _render_non_self( data.post_parsing.append('/* Post parse cleanup for ' + name + ' */\n' + post_parsing.rstrip() + '\n') # cleanup - cleanup = self.cleanup() + if parameter.is_vararg(): + cleanup = f"Py_XDECREF({self.parser_name});" + else: + cleanup = self.cleanup() if cleanup: data.cleanup.append('/* Cleanup for ' + name + ' */\n' + cleanup.rstrip() + "\n") diff --git a/Tools/clinic/libclinic/dsl_parser.py b/Tools/clinic/libclinic/dsl_parser.py index 5ca3bd5cb6c3f1..a25d88615545c0 100644 --- a/Tools/clinic/libclinic/dsl_parser.py +++ b/Tools/clinic/libclinic/dsl_parser.py @@ -925,16 +925,18 @@ def parse_parameter(self, line: str) -> None: parameter_name = parameter.arg name, legacy, kwargs = self.parse_converter(parameter.annotation) + if is_vararg and (name != 'object' or kwargs): + fail("Unsupported converter for var-positional parameter") value: object if not default: - if self.parameter_state is ParamState.OPTIONAL: - fail(f"Can't have a parameter without a default ({parameter_name!r}) " - "after a parameter with a default!") if is_vararg: value = NULL kwargs.setdefault('c_default', "NULL") else: + if self.parameter_state is ParamState.OPTIONAL: + fail(f"Can't have a parameter without a default ({parameter_name!r}) " + "after a parameter with a default!") value = unspecified if 'py_default' in kwargs: fail("You can't specify py_default without specifying a default value!") diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 96c9b919bff811..e460b6c730b7fb 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -217,8 +217,7 @@ class ParseArgsCodeGen: min_pos: int = 0 max_pos: int = 0 min_kw_only: int = 0 - pseudo_args: int = 0 - vararg: int | str = NO_VARARG + varpos: Parameter | None = None docstring_prototype: str docstring_definition: str @@ -246,6 +245,13 @@ def __init__(self, func: Function, codegen: CodeGen) -> None: if self.parameters and isinstance(self.parameters[0].converter, defining_class_converter): self.requires_defining_class = True del self.parameters[0] + + for i, p in enumerate(self.parameters): + if p.is_vararg(): + self.varpos = p + del self.parameters[i] + break + self.converters = [p.converter for p in self.parameters] if self.func.critical_section: @@ -257,18 +263,13 @@ def __init__(self, func: Function, codegen: CodeGen) -> None: self.min_pos = 0 self.max_pos = 0 self.min_kw_only = 0 - self.pseudo_args = 0 for i, p in enumerate(self.parameters, 1): if p.is_keyword_only(): assert not p.is_positional_only() if not p.is_optional(): - self.min_kw_only = i - self.max_pos - int(self.vararg != NO_VARARG) - elif p.is_vararg(): - self.pseudo_args += 1 - self.vararg = i - 1 + self.min_kw_only = i - self.max_pos else: - if self.vararg == NO_VARARG: - self.max_pos = i + self.max_pos = i if p.is_positional_only(): self.pos_only = i if not p.is_optional(): @@ -285,6 +286,13 @@ def use_meth_o(self) -> bool: return (len(self.parameters) == 1 and self.parameters[0].is_positional_only() and not self.converters[0].is_optional() + and not self.varpos + and not self.requires_defining_class + and not self.is_new_or_init()) + + def use_meth_varargs(self) -> bool: + return (not self.parameters + and self.varpos and not self.requires_defining_class and not self.is_new_or_init()) @@ -315,7 +323,8 @@ def select_prototypes(self) -> None: def init_limited_capi(self) -> None: self.limited_capi = self.codegen.limited_capi - if self.limited_capi and (self.pseudo_args or + if self.limited_capi and ( + (self.varpos and self.pos_only < len(self.parameters)) or (any(p.is_optional() for p in self.parameters) and any(p.is_keyword_only() and not p.is_optional() for p in self.parameters)) or any(c.broken_limited_capi for c in self.converters)): @@ -437,6 +446,20 @@ def parse_one_arg(self) -> None: parser_code = libclinic.normalize_snippet(parsearg, indent=4) self.parser_body(parser_code) + def parse_varpos_only(self) -> None: + self.flags = "METH_VARARGS" + if self.use_simple_return(): + # maps perfectly to METH_VARARGS, doesn't need a return converter. + # so we skip making a parse function + # and call directly into the impl function. + self.impl_prototype = '' + self.impl_definition = METH_O_PROTOTYPE + else: + # SLIGHT HACK + # use impl_parameters for the parser here! + self.parser_prototype = METH_O_PROTOTYPE + self.parser_body() + def parse_option_groups(self) -> None: # positional parameters with option groups # (we have to generate lots of PyArg_ParseTuple calls @@ -447,6 +470,55 @@ def parse_option_groups(self) -> None: parser_code = ' {option_group_parsing}' self.parser_body(parser_code) + def _parse_vararg(self) -> str: + paramname = self.varpos.converter.parser_name + if self.fastcall: + if self.limited_capi: + if min(self.pos_only, self.min_pos) < self.max_pos: + size = f'Py_MAX(nargs - {self.max_pos}, 0)' + else: + size = f'nargs - {self.max_pos}' if self.max_pos else 'nargs' + return f""" + {paramname} = PyTuple_New({size}); + if (!{paramname}) {{{{ + goto exit; + }}}} + for (Py_ssize_t i = {self.max_pos}; i < nargs; ++i) {{{{ + PyTuple_SET_ITEM({paramname}, i - {self.max_pos}, Py_NewRef(args[i])); + }}}} + """ + else: + self.codegen.add_include('pycore_tuple.h', + '_PyTuple_FromArray()') + if min(self.pos_only, self.min_pos) < self.max_pos: + return f""" + {paramname} = nargs > {self.max_pos} + ? _PyTuple_FromArray(args + {self.max_pos}, nargs - {self.max_pos}) + : PyTuple_New(0); + if ({paramname} == NULL) {{{{ + goto exit; + }}}} + """ + else: + start = f'args + {self.max_pos}' if self.max_pos else 'args' + size = f'nargs - {self.max_pos}' if self.max_pos else 'nargs' + return f""" + {paramname} = _PyTuple_FromArray({start}, {size}); + if ({paramname} == NULL) {{{{ + goto exit; + }}}} + """ + else: + if self.max_pos: + return f""" + {paramname} = PyTuple_GetSlice(args, {self.max_pos}, PY_SSIZE_T_MAX); + if (!{paramname}) {{{{ + goto exit; + }}}} + """ + else: + return f"{paramname} = Py_NewRef(args);\n" + def parse_pos_only(self) -> None: if self.fastcall: # positional-only, but no option groups @@ -469,10 +541,9 @@ def parse_pos_only(self) -> None: nargs = 'PyTuple_GET_SIZE(args)' argname_fmt = 'PyTuple_GET_ITEM(args, %d)' - left_args = f"{nargs} - {self.max_pos}" - max_args = NO_VARARG if (self.vararg != NO_VARARG) else self.max_pos + parser_code = [] + max_args = NO_VARARG if self.varpos else self.max_pos if self.limited_capi: - parser_code = [] if nargs != 'nargs': nargs_def = f'Py_ssize_t nargs = {nargs};' parser_code.append(libclinic.normalize_snippet(nargs_def, indent=4)) @@ -505,50 +576,27 @@ def parse_pos_only(self) -> None: }}}} """, indent=4)) - else: + elif self.min_pos or max_args != NO_VARARG: self.codegen.add_include('pycore_modsupport.h', '_PyArg_CheckPositional()') - parser_code = [libclinic.normalize_snippet(f""" + parser_code.append(libclinic.normalize_snippet(f""" if (!_PyArg_CheckPositional("{{name}}", {nargs}, {self.min_pos}, {max_args})) {{{{ goto exit; }}}} - """, indent=4)] + """, indent=4)) has_optional = False use_parser_code = True for i, p in enumerate(self.parameters): - if p.is_vararg(): - if self.fastcall: - parser_code.append(libclinic.normalize_snippet(""" - %s = PyTuple_New(%s); - if (!%s) {{ - goto exit; - }} - for (Py_ssize_t i = 0; i < %s; ++i) {{ - PyTuple_SET_ITEM(%s, i, Py_NewRef(args[%d + i])); - }} - """ % ( - p.converter.parser_name, - left_args, - p.converter.parser_name, - left_args, - p.converter.parser_name, - self.max_pos - ), indent=4)) - else: - parser_code.append(libclinic.normalize_snippet(""" - %s = PyTuple_GetSlice(%d, -1); - """ % ( - p.converter.parser_name, - self.max_pos - ), indent=4)) - continue - displayname = p.get_displayname(i+1) argname = argname_fmt % i parsearg: str | None parsearg = p.converter.parse_arg(argname, displayname, limited_capi=self.limited_capi) if parsearg is None: + if self.varpos: + raise ValueError( + f"Using converter {p.converter} is not supported " + f"in function with var-positional parameter") use_parser_code = False parser_code = [] break @@ -564,6 +612,8 @@ def parse_pos_only(self) -> None: if use_parser_code: if has_optional: parser_code.append("skip_optional:") + if self.varpos: + parser_code.append(libclinic.normalize_snippet(self._parse_vararg(), indent=4)) else: for parameter in self.parameters: parameter.converter.use_converter() @@ -602,7 +652,7 @@ def parse_general(self, clang: CLanguage) -> None: has_optional_kw = ( max(self.pos_only, self.min_pos) + self.min_kw_only - < len(self.converters) - int(self.vararg != NO_VARARG) + < len(self.converters) ) use_parser_code = True @@ -611,40 +661,39 @@ def parse_general(self, clang: CLanguage) -> None: use_parser_code = False self.fastcall = False else: - if self.vararg == NO_VARARG: - self.codegen.add_include('pycore_modsupport.h', - '_PyArg_UnpackKeywords()') - args_declaration = "_PyArg_UnpackKeywords", "%s, %s, %s" % ( - self.min_pos, - self.max_pos, - self.min_kw_only - ) + self.codegen.add_include('pycore_modsupport.h', + '_PyArg_UnpackKeywords()') + if not self.varpos: nargs = "nargs" else: - self.codegen.add_include('pycore_modsupport.h', - '_PyArg_UnpackKeywordsWithVararg()') - args_declaration = "_PyArg_UnpackKeywordsWithVararg", "%s, %s, %s, %s" % ( - self.min_pos, - self.max_pos, - self.min_kw_only, - self.vararg - ) nargs = f"Py_MIN(nargs, {self.max_pos})" if self.max_pos else "0" if self.fastcall: self.flags = "METH_FASTCALL|METH_KEYWORDS" self.parser_prototype = PARSER_PROTOTYPE_FASTCALL_KEYWORDS - argname_fmt = 'args[%d]' self.declarations = declare_parser(self.func, codegen=self.codegen) self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters) + if self.varpos: + self.declarations += "\nPyObject * const *fastargs;" + argsname = 'fastargs' + argname_fmt = 'fastargs[%d]' + else: + argsname = 'args' + argname_fmt = 'args[%d]' if has_optional_kw: self.declarations += "\nPy_ssize_t noptargs = %s + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" - args = %s(args, nargs, NULL, kwnames, &_parser, %s, argsbuf); - if (!args) {{ + %s = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, %d, %d, %d, %d, argsbuf); + if (!%s) {{ goto exit; }} - """ % args_declaration, indent=4)] + """ % (argsname, + self.min_pos, + self.max_pos, + self.min_kw_only, + int(self.varpos is not None), + argsname), + indent=4)] else: # positional-or-keyword arguments self.flags = "METH_VARARGS|METH_KEYWORDS" @@ -657,11 +706,15 @@ def parse_general(self, clang: CLanguage) -> None: if has_optional_kw: self.declarations += "\nPy_ssize_t noptargs = %s + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" - fastargs = %s(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, %s, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, %d, %d, %d, %d, argsbuf); if (!fastargs) {{ goto exit; }} - """ % args_declaration, indent=4)] + """ % (self.min_pos, + self.max_pos, + self.min_kw_only, + int(self.varpos is not None)), + indent=4)] if self.requires_defining_class: self.flags = 'METH_METHOD|' + self.flags @@ -710,8 +763,6 @@ def parse_general(self, clang: CLanguage) -> None: else: label = 'skip_optional_kwonly' first_opt = self.max_pos + self.min_kw_only - if self.vararg != NO_VARARG: - first_opt += 1 if i == first_opt: add_label = label parser_code.append(libclinic.normalize_snippet(""" @@ -737,6 +788,8 @@ def parse_general(self, clang: CLanguage) -> None: if use_parser_code: if add_label: parser_code.append("%s:" % add_label) + if self.varpos: + parser_code.append(libclinic.normalize_snippet(self._parse_vararg(), indent=4)) else: for parameter in self.parameters: parameter.converter.use_converter() @@ -927,14 +980,16 @@ def parse_args(self, clang: CLanguage) -> dict[str, str]: # previous call to parser_body. this is used for an awful hack. self.parser_body_fields: tuple[str, ...] = () - if not self.parameters: + if not self.parameters and not self.varpos: self.parse_no_args() elif self.use_meth_o(): self.parse_one_arg() + elif self.use_meth_varargs(): + self.parse_varpos_only() elif self.has_option_groups(): self.parse_option_groups() elif (not self.requires_defining_class - and self.pos_only == len(self.parameters) - self.pseudo_args): + and self.pos_only == len(self.parameters)): self.parse_pos_only() else: self.parse_general(clang) From 99f2c168da9333df7135ab8dcdad2354856361b0 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 12 Aug 2024 20:47:20 +0300 Subject: [PATCH 02/14] Change style for comparison with NULL. --- Lib/test/clinic.test.c | 166 +++++----- Lib/test/test_clinic.py | 2 +- Modules/_blake2/clinic/blake2b_impl.c.h | 26 +- Modules/_blake2/clinic/blake2s_impl.c.h | 26 +- Modules/_ctypes/clinic/_ctypes.c.h | 24 +- Modules/_io/clinic/_iomodule.c.h | 18 +- Modules/_io/clinic/bufferedio.c.h | 16 +- Modules/_io/clinic/bytesio.c.h | 4 +- Modules/_io/clinic/fileio.c.h | 16 +- Modules/_io/clinic/iobase.c.h | 6 +- Modules/_io/clinic/stringio.c.h | 6 +- Modules/_io/clinic/textio.c.h | 32 +- Modules/_io/clinic/winconsoleio.c.h | 14 +- Modules/_multiprocessing/clinic/semaphore.c.h | 12 +- Modules/_sqlite/clinic/connection.c.h | 54 ++-- Modules/_sqlite/clinic/cursor.c.h | 4 +- Modules/_sqlite/clinic/module.c.h | 4 +- Modules/_sre/clinic/sre.c.h | 40 +-- Modules/_ssl/clinic/cert.c.h | 4 +- Modules/_testcapi/clinic/exceptions.c.h | 8 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 14 +- Modules/clinic/_asynciomodule.c.h | 48 +-- Modules/clinic/_bisectmodule.c.h | 26 +- Modules/clinic/_bz2module.c.h | 4 +- Modules/clinic/_codecsmodule.c.h | 10 +- Modules/clinic/_collectionsmodule.c.h | 6 +- Modules/clinic/_csv.c.h | 8 +- Modules/clinic/_curses_panel.c.h | 8 +- Modules/clinic/_cursesmodule.c.h | 6 +- Modules/clinic/_datetimemodule.c.h | 42 +-- Modules/clinic/_elementtree.c.h | 38 +-- Modules/clinic/_functoolsmodule.c.h | 4 +- Modules/clinic/_hashopenssl.c.h | 80 ++--- Modules/clinic/_lzmamodule.c.h | 10 +- Modules/clinic/_opcode.c.h | 22 +- Modules/clinic/_pickle.c.h | 50 +-- Modules/clinic/_queuemodule.c.h | 12 +- Modules/clinic/_ssl.c.h | 38 +-- Modules/clinic/_struct.c.h | 8 +- Modules/clinic/_testclinic.c.h | 96 +++--- Modules/clinic/_testclinic_depr.c.h | 56 ++-- Modules/clinic/_testinternalcapi.c.h | 12 +- Modules/clinic/_testmultiphase.c.h | 6 +- Modules/clinic/_winapi.c.h | 8 +- Modules/clinic/_zoneinfo.c.h | 16 +- Modules/clinic/arraymodule.c.h | 10 +- Modules/clinic/binascii.c.h | 24 +- Modules/clinic/cmathmodule.c.h | 6 +- Modules/clinic/gcmodule.c.h | 6 +- Modules/clinic/itertoolsmodule.c.h | 22 +- Modules/clinic/mathmodule.c.h | 10 +- Modules/clinic/md5module.c.h | 6 +- Modules/clinic/overlapped.c.h | 4 +- Modules/clinic/posixmodule.c.h | 290 +++++++++--------- Modules/clinic/pyexpat.c.h | 16 +- Modules/clinic/selectmodule.c.h | 16 +- Modules/clinic/sha1module.c.h | 6 +- Modules/clinic/sha2module.c.h | 18 +- Modules/clinic/sha3module.c.h | 4 +- Modules/clinic/signalmodule.c.h | 4 +- Modules/clinic/socketmodule.c.h | 10 +- Modules/clinic/syslogmodule.c.h | 8 +- Modules/clinic/zlibmodule.c.h | 40 +-- Objects/clinic/bytearrayobject.c.h | 28 +- Objects/clinic/bytesobject.c.h | 28 +- Objects/clinic/codeobject.c.h | 40 +-- Objects/clinic/complexobject.c.h | 6 +- Objects/clinic/descrobject.c.h | 12 +- Objects/clinic/enumobject.c.h | 4 +- Objects/clinic/funcobject.c.h | 10 +- Objects/clinic/listobject.c.h | 6 +- Objects/clinic/longobject.c.h | 14 +- Objects/clinic/memoryobject.c.h | 14 +- Objects/clinic/moduleobject.c.h | 4 +- Objects/clinic/odictobject.c.h | 12 +- Objects/clinic/structseq.c.h | 4 +- Objects/clinic/typevarobject.c.h | 32 +- Objects/clinic/unicodeobject.c.h | 26 +- Objects/stringlib/clinic/transmogrify.h.h | 4 +- PC/clinic/_wmimodule.cpp.h | 4 +- PC/clinic/winreg.c.h | 18 +- Python/clinic/Python-tokenize.c.h | 4 +- Python/clinic/_warnings.c.h | 18 +- Python/clinic/bltinmodule.c.h | 42 +-- Python/clinic/import.c.h | 6 +- Python/clinic/instruction_sequence.c.h | 8 +- Python/clinic/marshal.c.h | 10 +- Python/clinic/sysmodule.c.h | 12 +- Python/clinic/traceback.c.h | 4 +- Tools/clinic/libclinic/parse_args.py | 10 +- 90 files changed, 995 insertions(+), 995 deletions(-) diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c index 3e6475e825e214..ed53ff9e466247 100644 --- a/Lib/test/clinic.test.c +++ b/Lib/test/clinic.test.c @@ -2200,7 +2200,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2213,7 +2213,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=8c0345bdc2d4279f input=0d3484844749c05b]*/ +/*[clinic end generated code: output=4e09d9574a3f8ae0 input=0d3484844749c05b]*/ /*[clinic input] @@ -2270,7 +2270,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2283,7 +2283,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=66625282d27df5b4 input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=405b5fee6815aca1 input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2343,14 +2343,14 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2367,7 +2367,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=b64f34a10ee58dfe input=eda7964f784f4607]*/ +/*[clinic end generated code: output=c092bcffeaaa72e6 input=eda7964f784f4607]*/ /*[clinic input] @@ -2430,14 +2430,14 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2447,7 +2447,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2464,7 +2464,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=c9d506684af98d1f input=209387a4815e5082]*/ +/*[clinic end generated code: output=636f21b4e1246360 input=209387a4815e5082]*/ /*[clinic input] @@ -2525,14 +2525,14 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2549,7 +2549,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=68edbf1d2262f7aa input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=7cdfa03e3f384237 input=18393cc64fa000f4]*/ /*[clinic input] @@ -2606,7 +2606,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2619,7 +2619,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=4292a4b34fc66678 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=2432f57378c9ec50 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2677,7 +2677,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2690,7 +2690,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=879bb3b449bc11b4 input=9042f2818f664839]*/ +/*[clinic end generated code: output=721cdd929053f8c1 input=9042f2818f664839]*/ /*[clinic input] @@ -2751,7 +2751,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2766,7 +2766,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=06380eb7891a8853 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=298efe935ebddfe2 input=29546ebdca492fea]*/ /*[clinic input] @@ -2829,7 +2829,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2837,7 +2837,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2854,7 +2854,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=3131e879b31e9ddf input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=fafa8f7cc2ea0e33 input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2915,14 +2915,14 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2939,7 +2939,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=1f6ab441c0a23c0b input=1581299d21d16f14]*/ +/*[clinic end generated code: output=a82c579013c4b193 input=1581299d21d16f14]*/ /*[clinic input] @@ -3002,7 +3002,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3015,7 +3015,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3032,7 +3032,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=1e9adfbf0156f8e2 input=408798ec3d42949f]*/ +/*[clinic end generated code: output=05ee0e7485b9d2b8 input=408798ec3d42949f]*/ /*[clinic input] @@ -3096,7 +3096,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3104,7 +3104,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3121,7 +3121,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=bf69c0352b83d03e input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=54bd406e8da453f0 input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -3183,14 +3183,14 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3207,7 +3207,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=e1818c157f03f3d1 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=d22114decc846282 input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -3271,7 +3271,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3284,7 +3284,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3301,7 +3301,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=a83c8f2a857434f5 input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=89d14d17f80a92b0 input=1e557dc979d120fd]*/ /*[clinic input] @@ -3368,7 +3368,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3377,7 +3377,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3395,7 +3395,7 @@ static PyObject * test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=affd90c19f802f78 input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=7d492cf1acd2d86e input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3459,7 +3459,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3467,7 +3467,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3484,7 +3484,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=437e74e675923bb9 input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=ec33a92df16b0508 input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3552,7 +3552,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3560,7 +3560,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3570,7 +3570,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3588,7 +3588,7 @@ static PyObject * test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=ad0869d8a7f2c677 input=d0883d45876f186c]*/ +/*[clinic end generated code: output=860b2bb202b203ed input=d0883d45876f186c]*/ /*[clinic input] @@ -3656,20 +3656,20 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3679,7 +3679,7 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3697,7 +3697,7 @@ static PyObject * test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=0c9b524795e3c177 input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=706f968ba915193f input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3768,7 +3768,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args PyObject *f = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -3781,13 +3781,13 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -3797,7 +3797,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args if (!noptargs) { goto skip_optional_kwonly; } - if (args[4]) { + if (args[4] != NULL) { e = args[4]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3816,7 +3816,7 @@ test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f) -/*[clinic end generated code: output=10507e1f8db1f7b0 input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=6f5f2923372292e7 input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3872,7 +3872,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -3892,7 +3892,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=3a56ca73418929be input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=cb2e11ad7adab5b2 input=303df5046c7e37a3]*/ /*[clinic input] @@ -4233,7 +4233,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -4254,7 +4254,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=83da0088d61ef092 input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=e0f7eafcb9fa5b90 input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -4315,7 +4315,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar int b = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -4345,7 +4345,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=6d5d4c7b8725a523 input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=6262643aa7837e3b input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -4406,13 +4406,13 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize PyObject *c = " "; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { b = PyObject_IsTrue(fastargs[0]); if (b < 0) { goto exit; @@ -4439,7 +4439,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=71967475eadae191 input=fa56a709a035666e]*/ +/*[clinic end generated code: output=43a01f79976a31ff input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4491,7 +4491,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *mod; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } mod = args[0]; @@ -4503,7 +4503,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=20495fdbd57c9532 input=afefe259667f13ba]*/ +/*[clinic end generated code: output=d9801075d3007030 input=afefe259667f13ba]*/ /*[clinic input] mangle1 @@ -4576,7 +4576,7 @@ mangle1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_noptargs; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } __clinic_args = args[0]; @@ -4599,7 +4599,7 @@ mangle1_impl(PyObject *module, PyObject *args, PyObject *kwnames, PyObject *return_value, PyObject *_keywords, PyObject *_parser, PyObject *argsbuf, PyObject *fastargs, PyObject *nargs, PyObject *noptargs) -/*[clinic end generated code: output=11a67d5f9b51d1e5 input=a3ed51bdedf8a3c7]*/ +/*[clinic end generated code: output=602d6c5d98514d01 input=a3ed51bdedf8a3c7]*/ /*[clinic input] mangle2 @@ -4657,7 +4657,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } __clinic_args = args[0]; @@ -4672,7 +4672,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn static PyObject * mangle2_impl(PyObject *module, PyObject *args, PyObject *kwargs, PyObject *return_value) -/*[clinic end generated code: output=228db961b4469d07 input=391766fee51bad7a]*/ +/*[clinic end generated code: output=377d11ceab98ce76 input=391766fee51bad7a]*/ /*[clinic input] @@ -4726,7 +4726,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ int a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = PyLong_AsInt(args[0]); @@ -4741,7 +4741,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ static PyObject * Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a) -/*[clinic end generated code: output=c2e71608109772f2 input=af158077bd237ef9]*/ +/*[clinic end generated code: output=df4202508aa6cfa3 input=af158077bd237ef9]*/ /*[clinic input] @@ -5074,7 +5074,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *a; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -5086,7 +5086,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) static int Test___init___impl(TestObj *self, PyObject *a) -/*[clinic end generated code: output=ca1607b9a98fb44a input=a8f9222a6ab35c59]*/ +/*[clinic end generated code: output=3eec6387c01b5c81 input=a8f9222a6ab35c59]*/ /*[clinic input] @@ -5340,7 +5340,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t int int_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } int_value = PyLong_AsInt(args[0]); @@ -5355,7 +5355,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * mangled_c_keyword_identifier_impl(PyObject *module, int int_value) -/*[clinic end generated code: output=6e8a7c9097050537 input=060876448ab567a2]*/ +/*[clinic end generated code: output=7b4182b13bdd0132 input=060876448ab567a2]*/ /*[clinic input] @@ -5599,7 +5599,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *arg = CONST_A + CONST_B; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -5615,7 +5615,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * fn_with_default_binop_expr_impl(PyObject *module, PyObject *arg) -/*[clinic end generated code: output=fa4fe50d45ddcbb6 input=1b55c8ae68d89453]*/ +/*[clinic end generated code: output=c4e262bb744618b0 input=1b55c8ae68d89453]*/ /*[python input] @@ -5687,7 +5687,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py str a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!c_converter_func(args[0], &a)) { @@ -5701,7 +5701,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py static PyObject * docstr_fallback_to_converter_default_impl(PyObject *module, str a) -/*[clinic end generated code: output=a3efbe6cf731ca9e input=0cbe6a4d24bc2274]*/ +/*[clinic end generated code: output=ed7f24967fd701ee input=0cbe6a4d24bc2274]*/ /*[clinic input] diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 94e79222934c7a..82948731fa08aa 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -2694,7 +2694,7 @@ def test_cli_force(self): # Verify by checking the checksum. checksum = ( "/*[clinic end generated code: " - "output=843576e3ffe85e2d input=9543a8d2da235301]*/\n" + "output=72c28b3f18a73d51 input=9543a8d2da235301]*/\n" ) with open(fn, encoding='utf-8') as f: generated = f.read() diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 6c28f404069008..9f0d8a2ca912e5 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -73,7 +73,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (nargs < 1) { @@ -85,7 +85,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { digest_size = PyLong_AsInt(fastargs[1]); if (digest_size == -1 && PyErr_Occurred()) { goto exit; @@ -94,7 +94,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { if (PyObject_GetBuffer(fastargs[2], &key, PyBUF_SIMPLE) != 0) { goto exit; } @@ -102,7 +102,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { if (PyObject_GetBuffer(fastargs[3], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -110,7 +110,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { if (PyObject_GetBuffer(fastargs[4], &person, PyBUF_SIMPLE) != 0) { goto exit; } @@ -118,7 +118,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[5]) { + if (fastargs[5] != NULL) { fanout = PyLong_AsInt(fastargs[5]); if (fanout == -1 && PyErr_Occurred()) { goto exit; @@ -127,7 +127,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[6]) { + if (fastargs[6] != NULL) { depth = PyLong_AsInt(fastargs[6]); if (depth == -1 && PyErr_Occurred()) { goto exit; @@ -136,7 +136,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[7]) { + if (fastargs[7] != NULL) { if (!_PyLong_UnsignedLong_Converter(fastargs[7], &leaf_size)) { goto exit; } @@ -144,7 +144,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[8]) { + if (fastargs[8] != NULL) { if (!_PyLong_UnsignedLongLong_Converter(fastargs[8], &node_offset)) { goto exit; } @@ -152,7 +152,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[9]) { + if (fastargs[9] != NULL) { node_depth = PyLong_AsInt(fastargs[9]); if (node_depth == -1 && PyErr_Occurred()) { goto exit; @@ -161,7 +161,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[10]) { + if (fastargs[10] != NULL) { inner_size = PyLong_AsInt(fastargs[10]); if (inner_size == -1 && PyErr_Occurred()) { goto exit; @@ -170,7 +170,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[11]) { + if (fastargs[11] != NULL) { last_node = PyObject_IsTrue(fastargs[11]); if (last_node < 0) { goto exit; @@ -265,4 +265,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=d65f094670bd0ba7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cbaa541a6a67d1e4 input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index 9e9c1f4e2e7554..2d7bbf6a057deb 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -73,7 +73,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (nargs < 1) { @@ -85,7 +85,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { digest_size = PyLong_AsInt(fastargs[1]); if (digest_size == -1 && PyErr_Occurred()) { goto exit; @@ -94,7 +94,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { if (PyObject_GetBuffer(fastargs[2], &key, PyBUF_SIMPLE) != 0) { goto exit; } @@ -102,7 +102,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { if (PyObject_GetBuffer(fastargs[3], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -110,7 +110,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { if (PyObject_GetBuffer(fastargs[4], &person, PyBUF_SIMPLE) != 0) { goto exit; } @@ -118,7 +118,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[5]) { + if (fastargs[5] != NULL) { fanout = PyLong_AsInt(fastargs[5]); if (fanout == -1 && PyErr_Occurred()) { goto exit; @@ -127,7 +127,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[6]) { + if (fastargs[6] != NULL) { depth = PyLong_AsInt(fastargs[6]); if (depth == -1 && PyErr_Occurred()) { goto exit; @@ -136,7 +136,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[7]) { + if (fastargs[7] != NULL) { if (!_PyLong_UnsignedLong_Converter(fastargs[7], &leaf_size)) { goto exit; } @@ -144,7 +144,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[8]) { + if (fastargs[8] != NULL) { if (!_PyLong_UnsignedLongLong_Converter(fastargs[8], &node_offset)) { goto exit; } @@ -152,7 +152,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[9]) { + if (fastargs[9] != NULL) { node_depth = PyLong_AsInt(fastargs[9]); if (node_depth == -1 && PyErr_Occurred()) { goto exit; @@ -161,7 +161,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[10]) { + if (fastargs[10] != NULL) { inner_size = PyLong_AsInt(fastargs[10]); if (inner_size == -1 && PyErr_Occurred()) { goto exit; @@ -170,7 +170,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[11]) { + if (fastargs[11] != NULL) { last_node = PyObject_IsTrue(fastargs[11]); if (last_node < 0) { goto exit; @@ -265,4 +265,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=0f0893fd7822513b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d2a4c67b805ffce2 input=a9049054013a1b77]*/ diff --git a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h index 47426a29f453ae..356fdb2d5b8ec2 100644 --- a/Modules/_ctypes/clinic/_ctypes.c.h +++ b/Modules/_ctypes/clinic/_ctypes.c.h @@ -66,7 +66,7 @@ CDataType_from_address(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -113,7 +113,7 @@ CDataType_from_buffer(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; @@ -176,7 +176,7 @@ CDataType_from_buffer_copy(PyObject *type, PyTypeObject *cls, PyObject *const *a Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_SIMPLE) != 0) { @@ -246,7 +246,7 @@ CDataType_in_dll(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ss const char *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } dll = args[0]; @@ -302,7 +302,7 @@ CDataType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -345,7 +345,7 @@ PyCPointerType_set_type(PyTypeObject *self, PyTypeObject *cls, PyObject *const * PyObject *type; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } type = args[0]; @@ -389,7 +389,7 @@ PyCPointerType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *ar PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -431,7 +431,7 @@ c_wchar_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -473,7 +473,7 @@ c_char_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -515,7 +515,7 @@ c_void_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -559,7 +559,7 @@ PyCSimpleType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *arg PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -610,4 +610,4 @@ Simple_from_outparm(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py } return Simple_from_outparm_impl(self, cls); } -/*[clinic end generated code: output=2ae83e7090e0bbba input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9adcf797fc056e1b input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 54b6ac8e4ddb4d..e27d99d8867ee1 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -176,14 +176,14 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *opener = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } file = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("open", "argument 'mode'", "str", args[1]); goto exit; @@ -201,7 +201,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { buffering = PyLong_AsInt(args[2]); if (buffering == -1 && PyErr_Occurred()) { goto exit; @@ -210,7 +210,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (args[3] == Py_None) { encoding = NULL; } @@ -233,7 +233,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { if (args[4] == Py_None) { errors = NULL; } @@ -256,7 +256,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { if (args[5] == Py_None) { newline = NULL; } @@ -279,7 +279,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[6]) { + if (args[6] != NULL) { closefd = PyObject_IsTrue(args[6]); if (closefd < 0) { goto exit; @@ -391,7 +391,7 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -404,4 +404,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=ca839985e0d5219c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=154cb6ba91c6eb81 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index 887aaa75c1f31e..d6de1b6d294d22 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -152,7 +152,7 @@ _io__BufferedIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *arg int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -206,7 +206,7 @@ _io__BufferedIOBase_read1(PyObject *self, PyTypeObject *cls, PyObject *const *ar int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -263,7 +263,7 @@ _io__BufferedIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } b = args[0]; @@ -911,7 +911,7 @@ _io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args, PyObject *pos = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -974,7 +974,7 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } raw = fastargs[0]; @@ -1051,7 +1051,7 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } raw = fastargs[0]; @@ -1220,7 +1220,7 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } raw = fastargs[0]; @@ -1245,4 +1245,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=4a40772275c05bbd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14945db89d878161 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index d42d3c83d2c6af..104813796f38fa 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -521,7 +521,7 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *initvalue = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -534,4 +534,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=c8d7b26174a8c180 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d8b8ef5ff340cad6 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index 067adf82f4799b..e54b4c6624c9b4 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -95,14 +95,14 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *opener = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } nameobj = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("FileIO", "argument 'mode'", "str", fastargs[1]); goto exit; @@ -120,7 +120,7 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { closefd = PyObject_IsTrue(fastargs[2]); if (closefd < 0) { goto exit; @@ -242,7 +242,7 @@ _io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s Py_buffer buffer = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_WRITABLE) < 0) { @@ -318,7 +318,7 @@ _io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize Py_ssize_t size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -371,7 +371,7 @@ _io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssiz Py_buffer b = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) { @@ -491,7 +491,7 @@ _io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *posobj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -528,4 +528,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO_FILEIO_TRUNCATE_METHODDEF #define _IO_FILEIO_TRUNCATE_METHODDEF #endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */ -/*[clinic end generated code: output=7eb93019525a5a8d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=092fe21364f68f31 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index 57810d09884ff8..247cfcb5617b8b 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -57,7 +57,7 @@ _io__IOBase_seek(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ss int whence = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } offset = PyLong_AsInt(args[0]); @@ -133,7 +133,7 @@ _io__IOBase_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *size = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -441,4 +441,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _io__RawIOBase_readall_impl(self); } -/*[clinic end generated code: output=d3d99fa9e875e696 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bbf8ec2b7701e7d2 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index ac1fc093815204..f2ce060b3f389d 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -337,13 +337,13 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *newline_obj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { value = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -555,4 +555,4 @@ _io_StringIO_newlines_get(stringio *self, void *Py_UNUSED(context)) return return_value; } -/*[clinic end generated code: output=4f03839c05618ef5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e83b2aab6d92f146 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index 6141ee24eabb5c..f4d74b511399b1 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -71,7 +71,7 @@ _io__TextIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, P int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -125,7 +125,7 @@ _io__TextIOBase_readline(PyObject *self, PyTypeObject *cls, PyObject *const *arg int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -179,7 +179,7 @@ _io__TextIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, const char *s; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -340,7 +340,7 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject PyObject *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } decoder = fastargs[0]; @@ -406,7 +406,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } input = args[0]; @@ -547,14 +547,14 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) int write_through = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } buffer = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (fastargs[1] == Py_None) { encoding = NULL; } @@ -577,13 +577,13 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { errors = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { if (fastargs[3] == Py_None) { newline = NULL; } @@ -606,7 +606,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { line_buffering = PyObject_IsTrue(fastargs[4]); if (line_buffering < 0) { goto exit; @@ -682,31 +682,31 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na PyObject *write_through_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0]) { + if (args[0] != NULL) { encoding = args[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[1]) { + if (args[1] != NULL) { errors = args[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { newline_obj = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { line_buffering_obj = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1292,4 +1292,4 @@ _io_TextIOWrapper__CHUNK_SIZE_set(textio *self, PyObject *value, void *Py_UNUSED return return_value; } -/*[clinic end generated code: output=50e75a2cb6d7566f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=63c5bbef1c6af379 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 0bb8e6785b3483..7005057183a3cc 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -94,14 +94,14 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *opener = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } nameobj = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("_WindowsConsoleIO", "argument 'mode'", "str", fastargs[1]); goto exit; @@ -119,7 +119,7 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { closefd = PyObject_IsTrue(fastargs[2]); if (closefd < 0) { goto exit; @@ -240,7 +240,7 @@ _io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject * Py_buffer buffer = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_WRITABLE) < 0) { @@ -324,7 +324,7 @@ _io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *cons Py_ssize_t size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -381,7 +381,7 @@ _io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *con Py_buffer b = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) { @@ -457,4 +457,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */ -/*[clinic end generated code: output=24f4d87b9b3ff97f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7805bbadbfcbe566 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index cb253da5f4d01b..2455bfa7492b66 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -59,13 +59,13 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { blocking = PyObject_IsTrue(args[0]); if (blocking < 0) { goto exit; @@ -164,13 +164,13 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { blocking = PyObject_IsTrue(args[0]); if (blocking < 0) { goto exit; @@ -264,7 +264,7 @@ _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) int unlink; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } kind = PyLong_AsInt(fastargs[0]); @@ -573,4 +573,4 @@ _multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */ -/*[clinic end generated code: output=785ab7ac492ce400 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3040f3da2ba99e39 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 31c9ad5ee89399..cf8080878d4095 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -82,14 +82,14 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } database = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (PyFloat_CheckExact(fastargs[1])) { timeout = PyFloat_AS_DOUBLE(fastargs[1]); } @@ -104,7 +104,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { detect_types = PyLong_AsInt(fastargs[2]); if (detect_types == -1 && PyErr_Occurred()) { goto exit; @@ -113,7 +113,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { if (!isolation_level_converter(fastargs[3], &isolation_level)) { goto exit; } @@ -121,7 +121,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { check_same_thread = PyObject_IsTrue(fastargs[4]); if (check_same_thread < 0) { goto exit; @@ -130,13 +130,13 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[5]) { + if (fastargs[5] != NULL) { factory = fastargs[5]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[6]) { + if (fastargs[6] != NULL) { cache_size = PyLong_AsInt(fastargs[6]); if (cache_size == -1 && PyErr_Occurred()) { goto exit; @@ -145,7 +145,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[7]) { + if (fastargs[7] != NULL) { uri = PyObject_IsTrue(fastargs[7]); if (uri < 0) { goto exit; @@ -214,7 +214,7 @@ pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ PyObject *factory = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -290,7 +290,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -325,7 +325,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { readonly = PyObject_IsTrue(args[3]); if (readonly < 0) { goto exit; @@ -482,7 +482,7 @@ pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls int deterministic = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 3) { @@ -575,7 +575,7 @@ create_window_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *c PyObject *aggregate_class; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -671,7 +671,7 @@ pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cl PyObject *aggregate_class; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 3) { @@ -771,7 +771,7 @@ pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -865,7 +865,7 @@ pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject int n; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -952,7 +952,7 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject * PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -1056,7 +1056,7 @@ pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *const *a const char *entrypoint = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1253,7 +1253,7 @@ pysqlite_connection_iterdump(pysqlite_Connection *self, PyObject *const *args, P PyObject *filter = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1321,7 +1321,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ double sleep = 0.25; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyObject_TypeCheck(args[0], clinic_state()->ConnectionType)) { @@ -1332,7 +1332,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { pages = PyLong_AsInt(args[1]); if (pages == -1 && PyErr_Occurred()) { goto exit; @@ -1341,13 +1341,13 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { progress = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("backup", "argument 'name'", "str", args[3]); goto exit; @@ -1419,7 +1419,7 @@ pysqlite_connection_create_collation(pysqlite_Connection *self, PyTypeObject *cl PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1498,7 +1498,7 @@ serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1588,7 +1588,7 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyUnicode_Check(args[0])) { @@ -1866,4 +1866,4 @@ getconfig(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=9e00c4721c5f653b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14390eaa877f1ba0 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index e076789d7fc255..7d1cefa8017695 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -217,7 +217,7 @@ pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize int maxrows = self->arraysize; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -313,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=7277c0b2524c5c5a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a8cccaf5563a44ce input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index cb37f2b1f8e0ce..8740bfe17b7230 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -53,7 +53,7 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t const char *statement; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -208,4 +208,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=05f04beb7ae081cc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6c9173c86c2bfebb input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index c6a213f0209d19..0254b18bfe2435 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -214,14 +214,14 @@ _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const * Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -307,14 +307,14 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *con Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -402,14 +402,14 @@ _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -494,14 +494,14 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -589,14 +589,14 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -681,14 +681,14 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -772,7 +772,7 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t na Py_ssize_t maxsplit = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } string = args[0]; @@ -847,7 +847,7 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *ar Py_ssize_t count = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } repl = args[0]; @@ -924,7 +924,7 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *a Py_ssize_t count = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } repl = args[0]; @@ -1028,7 +1028,7 @@ _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *indexgroup; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } pattern = args[0]; @@ -1153,7 +1153,7 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *template; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } template = args[0]; @@ -1212,7 +1212,7 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1275,7 +1275,7 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t na PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1461,4 +1461,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=e3592512bd214efd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1870cead82705de0 input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index b2efbdb6122271..9f339230946c60 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -53,7 +53,7 @@ _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ int format = PY_SSL_ENCODING_PEM; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -86,4 +86,4 @@ _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored)) { return _ssl_Certificate_get_info_impl(self); } -/*[clinic end generated code: output=cbdcf54a8d29c126 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=306961a93ccd423a input=a9049054013a1b77]*/ diff --git a/Modules/_testcapi/clinic/exceptions.c.h b/Modules/_testcapi/clinic/exceptions.c.h index 3e46b9db5c8313..e60bbd4bed2d8e 100644 --- a/Modules/_testcapi/clinic/exceptions.c.h +++ b/Modules/_testcapi/clinic/exceptions.c.h @@ -105,7 +105,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss PyObject *dict = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -124,7 +124,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("make_exception_with_doc", "argument 'doc'", "str", args[1]); goto exit; @@ -142,7 +142,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { base = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -456,4 +456,4 @@ _testcapi_unstable_exc_prep_reraise_star(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=7a5adf45325bdd9f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=010e7122a0215175 input=a9049054013a1b77]*/ diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index db5ee69fd855b9..121aa02276332b 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -62,7 +62,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } input = args[0]; @@ -148,7 +148,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) { @@ -235,7 +235,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } input = args[0]; @@ -364,7 +364,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) { @@ -599,7 +599,7 @@ _multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, P PyObject *strobj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } strobj = args[0]; @@ -643,7 +643,7 @@ _multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *se PyObject *lines; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } lines = args[0]; @@ -682,4 +682,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__, #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \ {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__}, -/*[clinic end generated code: output=d4b12769230c42bb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=af367323cf185718 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 216e2d510948e1..d410cd2a7306e0 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -64,7 +64,7 @@ _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *loop = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -164,7 +164,7 @@ _asyncio_Future_set_result(FutureObj *self, PyTypeObject *cls, PyObject *const * PyObject *result; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } result = args[0]; @@ -211,7 +211,7 @@ _asyncio_Future_set_exception(FutureObj *self, PyTypeObject *cls, PyObject *cons PyObject *exception; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } exception = args[0]; @@ -273,7 +273,7 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyTypeObject *cls, PyObject * PyObject *context = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fn = args[0]; @@ -324,7 +324,7 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyTypeObject *cls, PyObjec PyObject *fn; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fn = args[0]; @@ -385,7 +385,7 @@ _asyncio_Future_cancel(FutureObj *self, PyTypeObject *cls, PyObject *const *args PyObject *msg = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -532,26 +532,26 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) int eager_start = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } coro = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { loop = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { name = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { context = fastargs[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -654,7 +654,7 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *msg = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -777,7 +777,7 @@ _asyncio_Task_get_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *args, PyObject *limit = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -845,13 +845,13 @@ _asyncio_Task_print_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *arg PyObject *file = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0]) { + if (args[0] != NULL) { limit = args[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1065,7 +1065,7 @@ _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } task = args[0]; @@ -1122,7 +1122,7 @@ _asyncio__register_eager_task(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } task = args[0]; @@ -1179,7 +1179,7 @@ _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } task = args[0]; @@ -1236,7 +1236,7 @@ _asyncio__unregister_eager_task(PyObject *module, PyObject *const *args, Py_ssiz PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } task = args[0]; @@ -1296,7 +1296,7 @@ _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } loop = args[0]; @@ -1357,7 +1357,7 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } loop = args[0]; @@ -1417,7 +1417,7 @@ _asyncio__swap_current_task(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } loop = args[0]; @@ -1474,7 +1474,7 @@ _asyncio_current_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1534,7 +1534,7 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *loop = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1547,4 +1547,4 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py exit: return return_value; } -/*[clinic end generated code: output=2ec3af5a73914995 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c80426f91740f5a7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index 3d9597d4a3edf0..ec07ea2b1998fd 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -70,7 +70,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -78,7 +78,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -95,7 +95,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -177,7 +177,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -185,7 +185,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -202,7 +202,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -283,7 +283,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -291,7 +291,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -308,7 +308,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -390,7 +390,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -398,7 +398,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -415,7 +415,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -434,4 +434,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=f30e300ff9c13401 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c8c191698442d883 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 02413e27ebc07b..1eb8a16fd33311 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -171,7 +171,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -234,4 +234,4 @@ _bz2_BZ2Decompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=43bd1646494d5118 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14199ed4f22426be input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index ea9e17ecf942a3..5402de1ca38723 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -124,14 +124,14 @@ _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[1]); goto exit; @@ -224,14 +224,14 @@ _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[1]); goto exit; @@ -2746,4 +2746,4 @@ _codecs_lookup_error(PyObject *module, PyObject *arg) #ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF #define _CODECS_CODE_PAGE_ENCODE_METHODDEF #endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */ -/*[clinic end generated code: output=1642a3b61c8d3de7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bd7067347259139a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index 6ce22f4f372507..acf1b69ca78e41 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -498,13 +498,13 @@ deque_init(PyObject *deque, PyObject *args, PyObject *kwargs) PyObject *maxlenobj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { iterable = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -629,4 +629,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=cfb6b9597af0afce input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3f6c5748d18137ef input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index 269031484a8252..137c250d9ecd48 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -75,7 +75,7 @@ _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } name = args[0]; @@ -132,7 +132,7 @@ _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } name = args[0]; @@ -193,7 +193,7 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *new_limit = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -206,4 +206,4 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=520893573ec130ab input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0a4d49e85185a770 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index 93f13b0a4ef28a..801edc0646715c 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -186,7 +186,7 @@ _curses_panel_panel_move(PyCursesPanelObject *self, PyTypeObject *cls, PyObject int x; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } y = PyLong_AsInt(args[0]); @@ -256,7 +256,7 @@ _curses_panel_panel_replace(PyCursesPanelObject *self, PyTypeObject *cls, PyObje PyCursesWindowObject *win; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyObject_TypeCheck(args[0], &PyCursesWindow_Type)) { @@ -304,7 +304,7 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyTypeObject *cls, Py PyObject *obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; @@ -421,4 +421,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _curses_panel_update_panels_impl(module); } -/*[clinic end generated code: output=175a4c3caeedd3de input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7beb8c8bfc0b12f4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index bd22b512103736..1529675e15706b 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2715,13 +2715,13 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int fd = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (args[0] == Py_None) { term = NULL; } @@ -4318,4 +4318,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=68fe1e92542d3ede input=a9049054013a1b77]*/ +/*[clinic end generated code: output=04f068f9d45c87bd input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 60fecca4c37775..4b12de58b90bed 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -61,7 +61,7 @@ iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int weekday; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } year = PyLong_AsInt(fastargs[0]); @@ -131,13 +131,13 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n int day = GET_DAY(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { year = PyLong_AsInt(args[0]); if (year == -1 && PyErr_Occurred()) { goto exit; @@ -146,7 +146,7 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { month = PyLong_AsInt(args[1]); if (month == -1 && PyErr_Occurred()) { goto exit; @@ -220,13 +220,13 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n int fold = TIME_GET_FOLD(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { hour = PyLong_AsInt(args[0]); if (hour == -1 && PyErr_Occurred()) { goto exit; @@ -235,7 +235,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { minute = PyLong_AsInt(args[1]); if (minute == -1 && PyErr_Occurred()) { goto exit; @@ -244,7 +244,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { second = PyLong_AsInt(args[2]); if (second == -1 && PyErr_Occurred()) { goto exit; @@ -253,7 +253,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { microsecond = PyLong_AsInt(args[3]); if (microsecond == -1 && PyErr_Occurred()) { goto exit; @@ -262,7 +262,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { tzinfo = args[4]; if (!--noptargs) { goto skip_optional_pos; @@ -334,7 +334,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg PyObject *tz = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -407,13 +407,13 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s int fold = DATE_GET_FOLD(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { year = PyLong_AsInt(args[0]); if (year == -1 && PyErr_Occurred()) { goto exit; @@ -422,7 +422,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { month = PyLong_AsInt(args[1]); if (month == -1 && PyErr_Occurred()) { goto exit; @@ -431,7 +431,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { day = PyLong_AsInt(args[2]); if (day == -1 && PyErr_Occurred()) { goto exit; @@ -440,7 +440,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { hour = PyLong_AsInt(args[3]); if (hour == -1 && PyErr_Occurred()) { goto exit; @@ -449,7 +449,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { minute = PyLong_AsInt(args[4]); if (minute == -1 && PyErr_Occurred()) { goto exit; @@ -458,7 +458,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { second = PyLong_AsInt(args[5]); if (second == -1 && PyErr_Occurred()) { goto exit; @@ -467,7 +467,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[6]) { + if (args[6] != NULL) { microsecond = PyLong_AsInt(args[6]); if (microsecond == -1 && PyErr_Occurred()) { goto exit; @@ -476,7 +476,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[7]) { + if (args[7] != NULL) { tzinfo = args[7]; if (!--noptargs) { goto skip_optional_pos; @@ -496,4 +496,4 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s exit: return return_value; } -/*[clinic end generated code: output=a62af1bb85589bc4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1819c1ea1b08445b input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 6d989a0825296f..9ececb192a99aa 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -42,7 +42,7 @@ _elementtree_Element_append(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *subelement; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyObject_TypeCheck(args[0], clinic_state()->Element_Type)) { @@ -199,7 +199,7 @@ _elementtree_Element___setstate__(ElementObject *self, PyTypeObject *cls, PyObje PyObject *state; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } state = args[0]; @@ -242,7 +242,7 @@ _elementtree_Element_extend(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *elements; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } elements = args[0]; @@ -299,7 +299,7 @@ _elementtree_Element_find(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } path = args[0]; @@ -363,14 +363,14 @@ _elementtree_Element_findtext(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } path = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { default_value = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -431,7 +431,7 @@ _elementtree_Element_findall(ElementObject *self, PyTypeObject *cls, PyObject *c PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } path = args[0]; @@ -493,7 +493,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } path = args[0]; @@ -555,7 +555,7 @@ _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -616,7 +616,7 @@ _elementtree_Element_iter(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *tag = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -764,7 +764,7 @@ _elementtree_Element_makeelement(ElementObject *self, PyTypeObject *cls, PyObjec PyObject *attrib; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } tag = args[0]; @@ -884,13 +884,13 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar int insert_pis = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { element_factory = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -900,19 +900,19 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { comment_factory = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { pi_factory = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { insert_comments = PyObject_IsTrue(fastargs[3]); if (insert_comments < 0) { goto exit; @@ -1115,13 +1115,13 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs const char *encoding = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { target = fastargs[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1236,4 +1236,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=386bfc0b02ea9531 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5f9c6f6954f0003c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_functoolsmodule.c.h b/Modules/clinic/_functoolsmodule.c.h index 5bdad0bc061574..4d977ad1da4feb 100644 --- a/Modules/clinic/_functoolsmodule.c.h +++ b/Modules/clinic/_functoolsmodule.c.h @@ -57,7 +57,7 @@ _functools_cmp_to_key(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *mycmp; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } mycmp = args[0]; @@ -114,4 +114,4 @@ _functools__lru_cache_wrapper_cache_clear(PyObject *self, PyObject *Py_UNUSED(ig return return_value; } -/*[clinic end generated code: output=913ff19f52a6c0c6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14e1fd25309674b8 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index af24c6d3e5929a..2e37a741d44ada 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -119,7 +119,7 @@ EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } { @@ -189,7 +189,7 @@ EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } { @@ -266,14 +266,14 @@ EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } name_obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { data_obj = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -342,13 +342,13 @@ _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -417,13 +417,13 @@ _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -492,13 +492,13 @@ _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -567,13 +567,13 @@ _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -642,13 +642,13 @@ _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -717,13 +717,13 @@ _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -794,13 +794,13 @@ _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -873,13 +873,13 @@ _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -952,13 +952,13 @@ _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1031,13 +1031,13 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1110,13 +1110,13 @@ _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t n int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1189,13 +1189,13 @@ _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t n int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1271,7 +1271,7 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *dklen_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1374,7 +1374,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj long dklen = 64; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &password, PyBUF_SIMPLE) != 0) { @@ -1383,7 +1383,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { if (PyObject_GetBuffer(args[1], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -1391,7 +1391,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { if (!PyLong_Check(args[2])) { _PyArg_BadArgument("scrypt", "argument 'n'", "int", args[2]); goto exit; @@ -1401,7 +1401,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!PyLong_Check(args[3])) { _PyArg_BadArgument("scrypt", "argument 'r'", "int", args[3]); goto exit; @@ -1411,7 +1411,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[4]) { + if (args[4] != NULL) { if (!PyLong_Check(args[4])) { _PyArg_BadArgument("scrypt", "argument 'p'", "int", args[4]); goto exit; @@ -1421,7 +1421,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[5]) { + if (args[5] != NULL) { maxmem = PyLong_AsLong(args[5]); if (maxmem == -1 && PyErr_Occurred()) { goto exit; @@ -1500,7 +1500,7 @@ _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *digest; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &key, PyBUF_SIMPLE) != 0) { @@ -1574,7 +1574,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *digestmod = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &key, PyBUF_SIMPLE) != 0) { @@ -1583,7 +1583,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { msg_obj = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1665,7 +1665,7 @@ _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *msg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } msg = args[0]; @@ -1824,4 +1824,4 @@ _hashlib_compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t narg #ifndef _HASHLIB_SCRYPT_METHODDEF #define _HASHLIB_SCRYPT_METHODDEF #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */ -/*[clinic end generated code: output=3fd09a3a1c01d6b3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ed3fe902bc0114c5 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index deb6d61cecabd3..09deb6d1e25143 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -129,7 +129,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -227,13 +227,13 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *filters = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { format = PyLong_AsInt(fastargs[0]); if (format == -1 && PyErr_Occurred()) { goto exit; @@ -242,7 +242,7 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { memlimit = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; @@ -327,4 +327,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=c46aa2a65004e866 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14a064d5e4cdbb2f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 9e1b6ed75fb1de..ae8edbeeeb628f 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -58,7 +58,7 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -132,7 +132,7 @@ _opcode_is_valid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -195,7 +195,7 @@ _opcode_has_arg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -258,7 +258,7 @@ _opcode_has_const(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -321,7 +321,7 @@ _opcode_has_name(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -384,7 +384,7 @@ _opcode_has_jump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -452,7 +452,7 @@ _opcode_has_free(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -515,7 +515,7 @@ _opcode_has_local(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -578,7 +578,7 @@ _opcode_has_exc(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -733,7 +733,7 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int offset; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } code = args[0]; @@ -746,4 +746,4 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=f71f2499af48a0ec input=a9049054013a1b77]*/ +/*[clinic end generated code: output=49d2e529e8bbdc90 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 164a0ba1ca2616..65c480c89c3de7 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -65,7 +65,7 @@ _pickle_Pickler_dump(PicklerObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; @@ -182,20 +182,20 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *buffer_callback = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } file = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { protocol = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { fix_imports = PyObject_IsTrue(fastargs[2]); if (fix_imports < 0) { goto exit; @@ -299,7 +299,7 @@ _pickle_Unpickler_persistent_load(UnpicklerObject *self, PyTypeObject *cls, PyOb PyObject *pid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } pid = args[0]; @@ -378,7 +378,7 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyTypeObject *cls, PyObject PyObject *global_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } module_name = args[0]; @@ -488,14 +488,14 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *buffers = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } file = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { fix_imports = PyObject_IsTrue(fastargs[1]); if (fix_imports < 0) { goto exit; @@ -504,7 +504,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { if (!PyUnicode_Check(fastargs[2])) { _PyArg_BadArgument("Unpickler", "argument 'encoding'", "str", fastargs[2]); goto exit; @@ -522,7 +522,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { if (!PyUnicode_Check(fastargs[3])) { _PyArg_BadArgument("Unpickler", "argument 'errors'", "str", fastargs[3]); goto exit; @@ -680,7 +680,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *buffer_callback = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; @@ -688,7 +688,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { protocol = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -698,7 +698,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { fix_imports = PyObject_IsTrue(args[3]); if (fix_imports < 0) { goto exit; @@ -783,14 +783,14 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *buffer_callback = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { protocol = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -800,7 +800,7 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { fix_imports = PyObject_IsTrue(args[2]); if (fix_imports < 0) { goto exit; @@ -892,14 +892,14 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *buffers = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } file = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { fix_imports = PyObject_IsTrue(args[1]); if (fix_imports < 0) { goto exit; @@ -908,7 +908,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("load", "argument 'encoding'", "str", args[2]); goto exit; @@ -926,7 +926,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("load", "argument 'errors'", "str", args[3]); goto exit; @@ -1018,14 +1018,14 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *buffers = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } data = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { fix_imports = PyObject_IsTrue(args[1]); if (fix_imports < 0) { goto exit; @@ -1034,7 +1034,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("loads", "argument 'encoding'", "str", args[2]); goto exit; @@ -1052,7 +1052,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("loads", "argument 'errors'", "str", args[3]); goto exit; @@ -1077,4 +1077,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=8a506d99b5471c17 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dffe1870ee080695 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index bcdcbbce906fdf..7dd6258999b747 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -90,14 +90,14 @@ _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_ PyObject *timeout = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } item = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { block = PyObject_IsTrue(args[1]); if (block < 0) { goto exit; @@ -164,7 +164,7 @@ _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py PyObject *item; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } item = args[0]; @@ -232,13 +232,13 @@ _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *con PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { block = PyObject_IsTrue(args[0]); if (block < 0) { goto exit; @@ -349,4 +349,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=b5a7e8b51839eda4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3bfac8c1394e6b5f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index bf2e1d9806a704..6d4c0b8c1bbcb7 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -380,7 +380,7 @@ _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py const char *cb_type = "tls-unique"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -584,14 +584,14 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s PyObject *password = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } certfile = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { keyfile = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -655,19 +655,19 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args PyObject *cadata = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { cafile = args[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { capath = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -741,7 +741,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz PyObject *session = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->Sock_Type)) { @@ -756,7 +756,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { hostname_obj = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -766,7 +766,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { owner = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -834,7 +834,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t PyObject *session = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->PySSLMemoryBIO_Type)) { @@ -854,7 +854,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_pos; } - if (args[3]) { + if (args[3] != NULL) { hostname_obj = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -864,7 +864,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[4]) { + if (args[4] != NULL) { owner = args[4]; if (!--noptargs) { goto skip_optional_kwonly; @@ -996,7 +996,7 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssiz int binary_form = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1058,7 +1058,7 @@ _ssl__SSLContext_set_psk_client_callback(PySSLContext *self, PyObject *const *ar PyObject *callback; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } callback = args[0]; @@ -1116,7 +1116,7 @@ _ssl__SSLContext_set_psk_server_callback(PySSLContext *self, PyObject *const *ar const char *identity_hint = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } callback = args[0]; @@ -1445,7 +1445,7 @@ _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int name = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1556,7 +1556,7 @@ _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs const char *store_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1632,7 +1632,7 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *store_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1663,4 +1663,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=b5411cac645a849f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=673f847e520d1592 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 85659a39a48e3f..a2ff8a87c5955a 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -58,7 +58,7 @@ Struct___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *format; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } format = fastargs[0]; @@ -160,7 +160,7 @@ Struct_unpack_from(PyStructObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_SIMPLE) != 0) { @@ -358,7 +358,7 @@ unpack_from(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!cache_struct_converter(module, args[0], &s_object)) { @@ -436,4 +436,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=5c11cb40bebddc0a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0fea346bc04d8e76 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index ea080ea7980c58..69ce36efe60eca 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -1480,7 +1480,7 @@ keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1536,7 +1536,7 @@ keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1594,14 +1594,14 @@ keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1664,14 +1664,14 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1681,7 +1681,7 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1743,14 +1743,14 @@ keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1809,7 +1809,7 @@ posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1865,7 +1865,7 @@ posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1923,7 +1923,7 @@ posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1984,7 +1984,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1992,7 +1992,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2055,7 +2055,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2068,7 +2068,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2131,7 +2131,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2139,7 +2139,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2202,7 +2202,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2215,7 +2215,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2279,7 +2279,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2288,7 +2288,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2354,7 +2354,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2362,7 +2362,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2372,7 +2372,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2437,7 +2437,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2450,7 +2450,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2512,7 +2512,7 @@ keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -2660,7 +2660,7 @@ posonly_poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -2726,7 +2726,7 @@ poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -2794,7 +2794,7 @@ poskw_varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg int b = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -2871,14 +2871,14 @@ poskw_varpos_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2948,7 +2948,7 @@ varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *b = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -3019,14 +3019,14 @@ varpos_kwonly_req_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *c = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3099,7 +3099,7 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *kw2 = Py_None; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } pos1 = fastargs[0]; @@ -3107,7 +3107,7 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[2]) { + if (fastargs[2] != NULL) { kw1 = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3180,7 +3180,7 @@ gh_32092_kw_pass(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *kw = Py_None; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } pos = fastargs[0]; @@ -3297,7 +3297,7 @@ null_or_tuple_for_varargs(PyObject *module, PyObject *const *args, Py_ssize_t na int covariant = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } name = fastargs[0]; @@ -3368,7 +3368,7 @@ clone_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw const char *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3434,7 +3434,7 @@ clone_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw const char *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3503,7 +3503,7 @@ clone_with_conv_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py }; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -3566,7 +3566,7 @@ clone_with_conv_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py }; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -3650,7 +3650,7 @@ _testclinic_TestClass_get_defining_class_arg(PyObject *self, PyTypeObject *cls, PyObject *arg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } arg = args[0]; @@ -3694,7 +3694,7 @@ _testclinic_TestClass_defclass_varpos(PyObject *self, PyTypeObject *cls, PyObjec PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } __clinic_args = _PyTuple_FromArray(args, nargs); @@ -3748,7 +3748,7 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } a = fastargs[0]; @@ -3765,4 +3765,4 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=e4dbf2d15659b41a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=037c1e9f0b9c7750 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index f22bc2403dc79b..738fd8f1ddb4af 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -81,7 +81,7 @@ depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -164,7 +164,7 @@ depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyO } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -248,7 +248,7 @@ depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -331,7 +331,7 @@ depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -475,7 +475,7 @@ depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *a = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) { @@ -558,7 +558,7 @@ depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *a = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) { @@ -722,7 +722,7 @@ depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -801,7 +801,7 @@ depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -884,7 +884,7 @@ depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -967,7 +967,7 @@ depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1051,7 +1051,7 @@ depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1134,7 +1134,7 @@ depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1218,7 +1218,7 @@ depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1302,7 +1302,7 @@ depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1388,7 +1388,7 @@ depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1564,7 +1564,7 @@ depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = args[0]; @@ -1640,7 +1640,7 @@ depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 2) { @@ -1722,7 +1722,7 @@ depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 3) { @@ -1803,7 +1803,7 @@ depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && nargs < 2 && args[1]) { @@ -1890,7 +1890,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2 && args[1]) || (nargs < 3 && args[2]))) { @@ -1906,7 +1906,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1983,7 +1983,7 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 1 && args[0]) || (nargs < 2 && args[1]) || (nargs < 3 && args[2]))) { @@ -1998,13 +1998,13 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { a = args[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2081,7 +2081,7 @@ depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2) || (nargs < 3 && args[2]))) { @@ -2260,7 +2260,7 @@ depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *h; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 7) { @@ -2370,7 +2370,7 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 3) { @@ -2394,4 +2394,4 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=5007ff912ac9e436 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=574ca6fac5ef50be input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testinternalcapi.c.h b/Modules/clinic/_testinternalcapi.c.h index 2622c8060ec8f9..8943cf481dcf9a 100644 --- a/Modules/clinic/_testinternalcapi.c.h +++ b/Modules/clinic/_testinternalcapi.c.h @@ -53,7 +53,7 @@ _testinternalcapi_compiler_cleandoc(PyObject *module, PyObject *const *args, Py_ PyObject *doc; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -136,7 +136,7 @@ _testinternalcapi_compiler_codegen(PyObject *module, PyObject *const *args, Py_s int compile_mode = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } ast = args[0]; @@ -207,7 +207,7 @@ _testinternalcapi_optimize_cfg(PyObject *module, PyObject *const *args, Py_ssize int nlocals; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } instructions = args[0]; @@ -272,7 +272,7 @@ _testinternalcapi_assemble_code_object(PyObject *module, PyObject *const *args, PyObject *metadata; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } filename = args[0]; @@ -347,7 +347,7 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *spam = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -360,4 +360,4 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO exit: return return_value; } -/*[clinic end generated code: output=f120642a05d04b48 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cca8ba865128f563 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index 7f1f6fc405225e..d4a4013882d4b5 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -110,13 +110,13 @@ _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *se int twice = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { n = PyLong_AsInt(args[0]); if (n == -1 && PyErr_Occurred()) { goto exit; @@ -162,4 +162,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=2de726e06b68a08e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=03a3ab2c6522f488 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index d54264d75db1d2..6ea931715c777b 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -794,7 +794,7 @@ _winapi_GetLongPathName(PyObject *module, PyObject *const *args, Py_ssize_t narg LPCWSTR path = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -898,7 +898,7 @@ _winapi_GetShortPathName(PyObject *module, PyObject *const *args, Py_ssize_t nar LPCWSTR path = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -2005,7 +2005,7 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args PyObject *on_type_read; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } on_type_read = args[0]; @@ -2124,4 +2124,4 @@ _winapi_CopyFile2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO return return_value; } -/*[clinic end generated code: output=99af750bb10b5e32 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=571f9de179c27f62 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_zoneinfo.c.h b/Modules/clinic/_zoneinfo.c.h index f2961b12715c80..6d1ef733a5ad27 100644 --- a/Modules/clinic/_zoneinfo.c.h +++ b/Modules/clinic/_zoneinfo.c.h @@ -56,7 +56,7 @@ zoneinfo_ZoneInfo_from_file(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } file_obj = args[0]; @@ -117,7 +117,7 @@ zoneinfo_ZoneInfo_no_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *cons PyObject *key; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -174,7 +174,7 @@ zoneinfo_ZoneInfo_clear_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *c PyObject *only_keys = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -222,7 +222,7 @@ zoneinfo_ZoneInfo_utcoffset(PyObject *self, PyTypeObject *cls, PyObject *const * PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } dt = args[0]; @@ -265,7 +265,7 @@ zoneinfo_ZoneInfo_dst(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } dt = args[0]; @@ -309,7 +309,7 @@ zoneinfo_ZoneInfo_tzname(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } dt = args[0]; @@ -354,7 +354,7 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con unsigned char from_cache; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -372,4 +372,4 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con exit: return return_value; } -/*[clinic end generated code: output=c92c60d6c3241d6f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=02f798101dc2dbe2 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index 8e09bebdfae2dc..6e198ca7be3b35 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -195,7 +195,7 @@ array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *bb; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } bb = args[0]; @@ -350,7 +350,7 @@ array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t n; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } f = args[0]; @@ -405,7 +405,7 @@ array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *f; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } f = args[0]; @@ -651,7 +651,7 @@ array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -691,4 +691,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=bb7b89c568a8d9ea input=a9049054013a1b77]*/ +/*[clinic end generated code: output=473caa53b7bb1a4f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index f77adebd6023d3..9260d240068402 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -86,7 +86,7 @@ binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int backtick = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -162,7 +162,7 @@ binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int strict_mode = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!ascii_buffer_converter(args[0], &data)) { @@ -233,7 +233,7 @@ binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int newline = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -413,7 +413,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -422,7 +422,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { sep = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -502,7 +502,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -511,7 +511,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { sep = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -647,7 +647,7 @@ binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int header = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!ascii_buffer_converter(args[0], &data)) { @@ -725,7 +725,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int header = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -734,7 +734,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { quotetabs = PyObject_IsTrue(args[1]); if (quotetabs < 0) { goto exit; @@ -743,7 +743,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { istext = PyObject_IsTrue(args[2]); if (istext < 0) { goto exit; @@ -767,4 +767,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=a8bc5138d77c4611 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8e2cbe255a3dc9c3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index e3e05d4974bf6d..f6e34f813b5dc4 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -933,7 +933,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } a = PyComplex_AsCComplex(args[0]); @@ -947,7 +947,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (PyFloat_CheckExact(args[2])) { rel_tol = PyFloat_AS_DOUBLE(args[2]); } @@ -982,4 +982,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=6e8e7fe487b07692 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=56d038284cb333f7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index 8bba2cce667027..51c05a7b0f4cd1 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -126,7 +126,7 @@ gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -372,7 +372,7 @@ gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t generation = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -533,4 +533,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=13d662cc458a71f4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1172999379b5232e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index d9b4c036880408..2fed686b5cf4e0 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -72,7 +72,7 @@ batched_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int strict = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; @@ -187,7 +187,7 @@ itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *keyfunc = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } it = fastargs[0]; @@ -532,7 +532,7 @@ itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t r; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; @@ -603,7 +603,7 @@ itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyOb Py_ssize_t r; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; @@ -674,7 +674,7 @@ itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *robj = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; @@ -737,14 +737,14 @@ itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *initial = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { binop = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; @@ -810,7 +810,7 @@ itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *seq2; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } seq1 = fastargs[0]; @@ -909,13 +909,13 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *long_step = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { long_cnt = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -928,4 +928,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=ca02baa405489154 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=90f49b09d0fccf3e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 1b827f4533be44..4abeca0a5a5ddb 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -673,7 +673,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyFloat_CheckExact(args[0])) { @@ -699,7 +699,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (PyFloat_CheckExact(args[2])) { rel_tol = PyFloat_AS_DOUBLE(args[2]); } @@ -788,7 +788,7 @@ math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *start = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } iterable = args[0]; @@ -939,7 +939,7 @@ math_nextafter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *steps = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyFloat_CheckExact(args[0])) { @@ -1011,4 +1011,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=549053f6aaaf3d4a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1ad13c0f0b3f0915 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index f5e369177cbfd9..2bdccc2ac70ee4 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -122,13 +122,13 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -148,4 +148,4 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw exit: return return_value; } -/*[clinic end generated code: output=930c187ecc3e68d2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7708f14b44e990ed input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index a02bc0f9175b3a..84d365c50114c5 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -485,7 +485,7 @@ _overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) HANDLE event = INVALID_HANDLE_VALUE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { @@ -1239,4 +1239,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=3f6cd189f280532c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=36289a87d2594634 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 3c2385036414bd..2df8b7ab2889fd 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -77,7 +77,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -86,7 +86,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { if (!FSTATAT_DIR_FD_CONVERTER(args[1], &dir_fd)) { goto exit; } @@ -158,7 +158,7 @@ os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -258,7 +258,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -271,7 +271,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (!FACCESSAT_DIR_FD_CONVERTER(args[2], &dir_fd)) { goto exit; } @@ -279,7 +279,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { effective_ids = PyObject_IsTrue(args[3]); if (effective_ids < 0) { goto exit; @@ -412,7 +412,7 @@ os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("chdir", "path", 0, 0, 0, PATH_HAVE_FCHDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -477,7 +477,7 @@ os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -566,7 +566,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = CHMOD_DEFAULT_FOLLOW_SYMLINKS; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -579,7 +579,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (!FCHMODAT_DIR_FD_CONVERTER(args[2], &dir_fd)) { goto exit; } @@ -659,7 +659,7 @@ os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -729,7 +729,7 @@ os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -807,7 +807,7 @@ os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -888,7 +888,7 @@ os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject unsigned long flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -957,7 +957,7 @@ os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("chroot", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1021,7 +1021,7 @@ os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -1105,7 +1105,7 @@ os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -1197,7 +1197,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1212,7 +1212,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { if (!FCHOWNAT_DIR_FD_CONVERTER(args[3], &dir_fd)) { goto exit; } @@ -1287,7 +1287,7 @@ os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k gid_t gid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -1360,7 +1360,7 @@ os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k gid_t gid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1483,7 +1483,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &src)) { @@ -1495,7 +1495,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -1503,7 +1503,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!dir_fd_converter(args[3], &dst_dir_fd)) { goto exit; } @@ -1586,7 +1586,7 @@ os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("listdir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1702,7 +1702,7 @@ os_listmounts(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec path_t volume = PATH_T_INITIALIZE_P("listmounts", "volume", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &volume)) { @@ -1766,7 +1766,7 @@ os__path_isdevdrive(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P path_t path = PATH_T_INITIALIZE_P("_path_isdevdrive", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1931,7 +1931,7 @@ os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE_P("_getvolumepathname", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1995,7 +1995,7 @@ os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py path_t path = PATH_T_INITIALIZE_P("_path_splitroot", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2138,7 +2138,7 @@ os__path_isdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2207,7 +2207,7 @@ os__path_isfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2276,7 +2276,7 @@ os__path_islink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2345,7 +2345,7 @@ os__path_isjunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2413,7 +2413,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE("_path_splitroot_ex", "path", 0, 1, 1, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2473,7 +2473,7 @@ os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO path_t path = PATH_T_INITIALIZE("_path_normpath", "path", 0, 1, 1, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2544,7 +2544,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2553,7 +2553,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -2659,7 +2659,7 @@ os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int who; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } which = PyLong_AsInt(args[0]); @@ -2727,7 +2727,7 @@ os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int priority; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } which = PyLong_AsInt(args[0]); @@ -2806,7 +2806,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dst_dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &src)) { @@ -2818,7 +2818,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -2897,7 +2897,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int dst_dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &src)) { @@ -2909,7 +2909,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -2984,7 +2984,7 @@ os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3054,7 +3054,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3128,7 +3128,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_FSConverter(args[0], &command)) { @@ -3233,7 +3233,7 @@ os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3307,7 +3307,7 @@ os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3428,7 +3428,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3437,7 +3437,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { times = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -3447,13 +3447,13 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[2]) { + if (args[2] != NULL) { ns = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { if (!FUTIMENSAT_DIR_FD_CONVERTER(args[3], &dir_fd)) { goto exit; } @@ -3520,7 +3520,7 @@ os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int status; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -3633,7 +3633,7 @@ os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *env; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3736,7 +3736,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *scheduler = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3747,19 +3747,19 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { file_actions = args[3]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[4]) { + if (args[4] != NULL) { setpgroup = args[4]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[5]) { + if (args[5] != NULL) { resetids = PyObject_IsTrue(args[5]); if (resetids < 0) { goto exit; @@ -3768,7 +3768,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[6]) { + if (args[6] != NULL) { setsid = PyObject_IsTrue(args[6]); if (setsid < 0) { goto exit; @@ -3777,13 +3777,13 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[7]) { + if (args[7] != NULL) { setsigmask = args[7]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[8]) { + if (args[8] != NULL) { setsigdef = args[8]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3886,7 +3886,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *scheduler = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3897,19 +3897,19 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_kwonly; } - if (args[3]) { + if (args[3] != NULL) { file_actions = args[3]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[4]) { + if (args[4] != NULL) { setpgroup = args[4]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[5]) { + if (args[5] != NULL) { resetids = PyObject_IsTrue(args[5]); if (resetids < 0) { goto exit; @@ -3918,7 +3918,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[6]) { + if (args[6] != NULL) { setsid = PyObject_IsTrue(args[6]); if (setsid < 0) { goto exit; @@ -3927,13 +3927,13 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[7]) { + if (args[7] != NULL) { setsigmask = args[7]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[8]) { + if (args[8] != NULL) { setsigdef = args[8]; if (!--noptargs) { goto skip_optional_kwonly; @@ -4122,19 +4122,19 @@ os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *after_in_parent = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0]) { + if (args[0] != NULL) { before = args[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[1]) { + if (args[1] != NULL) { after_in_child = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -4245,7 +4245,7 @@ os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t na int policy; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } policy = PyLong_AsInt(args[0]); @@ -4307,7 +4307,7 @@ os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t na int policy; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } policy = PyLong_AsInt(args[0]); @@ -4404,7 +4404,7 @@ os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *sched_priority; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } sched_priority = fastargs[0]; @@ -5732,7 +5732,7 @@ os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int options; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } options = PyLong_AsInt(args[0]); @@ -6069,7 +6069,7 @@ os_setns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int nstype = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6142,7 +6142,7 @@ os_unshare(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } flags = PyLong_AsInt(args[0]); @@ -6212,7 +6212,7 @@ os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -6298,7 +6298,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &src)) { @@ -6310,7 +6310,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { target_is_directory = PyObject_IsTrue(args[2]); if (target_is_directory < 0) { goto exit; @@ -6427,7 +6427,7 @@ os_timerfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } clockid = PyLong_AsInt(args[0]); @@ -6511,7 +6511,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py double interval_double = 0.0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6521,7 +6521,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -6530,7 +6530,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { if (PyFloat_CheckExact(args[2])) { initial_double = PyFloat_AS_DOUBLE(args[2]); } @@ -6625,7 +6625,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, long long interval = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6635,7 +6635,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_kwonly; } - if (args[1]) { + if (args[1] != NULL) { flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -6644,7 +6644,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { initial = PyLong_AsLongLong(args[2]); if (initial == -1 && PyErr_Occurred()) { goto exit; @@ -6942,7 +6942,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -6955,7 +6955,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { mode = PyLong_AsInt(args[2]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -7030,7 +7030,7 @@ os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -7163,7 +7163,7 @@ os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -7623,7 +7623,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7643,13 +7643,13 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[4]) { + if (args[4] != NULL) { headers = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { trailers = args[5]; if (!--noptargs) { goto skip_optional_pos; @@ -7725,7 +7725,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7754,13 +7754,13 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[4]) { + if (args[4] != NULL) { headers = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { trailers = args[5]; if (!--noptargs) { goto skip_optional_pos; @@ -7830,7 +7830,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t count; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7955,7 +7955,7 @@ os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -8308,7 +8308,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *offset_dst = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } src = PyLong_AsInt(args[0]); @@ -8334,7 +8334,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[3]) { + if (args[3] != NULL) { offset_src = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -8423,7 +8423,7 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k unsigned int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } src = PyLong_AsInt(args[0]); @@ -8449,13 +8449,13 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_pos; } - if (args[3]) { + if (args[3] != NULL) { offset_src = args[3]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { offset_dst = args[4]; if (!--noptargs) { goto skip_optional_pos; @@ -8528,7 +8528,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -8537,7 +8537,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -8629,7 +8629,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -8638,7 +8638,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -8647,7 +8647,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { if (!_Py_Dev_Converter(args[2], &device)) { goto exit; } @@ -8869,7 +8869,7 @@ os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_off_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9261,7 +9261,7 @@ os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9328,7 +9328,7 @@ os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9395,7 +9395,7 @@ os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9462,7 +9462,7 @@ os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9529,7 +9529,7 @@ os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9596,7 +9596,7 @@ os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9663,7 +9663,7 @@ os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9767,7 +9767,7 @@ os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("statvfs", "path", 0, 0, 0, PATH_HAVE_FSTATVFS); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9831,7 +9831,7 @@ os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb path_t path = PATH_T_INITIALIZE_P("_getdiskusage", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9947,7 +9947,7 @@ os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10139,7 +10139,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int show_cmd = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &filepath)) { @@ -10148,7 +10148,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("startfile", "argument 'operation'", "str", args[1]); goto exit; @@ -10161,7 +10161,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("startfile", "argument 'arguments'", "str", args[2]); goto exit; @@ -10174,7 +10174,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { if (!path_converter(args[3], &cwd)) { goto exit; } @@ -10278,7 +10278,7 @@ os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -10475,7 +10475,7 @@ os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10564,7 +10564,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10579,7 +10579,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[3]) { + if (args[3] != NULL) { flags = PyLong_AsInt(args[3]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -10670,7 +10670,7 @@ os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10755,13 +10755,13 @@ os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (!path_converter(args[0], &path)) { goto exit; } @@ -10873,7 +10873,7 @@ os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj unsigned int flags = MFD_CLOEXEC; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_FSConverter(args[0], &name)) { @@ -10947,7 +10947,7 @@ os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int flags = EFD_CLOEXEC; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!_PyLong_UnsignedInt_Converter(args[0], &initval)) { @@ -11016,7 +11016,7 @@ os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -11079,7 +11079,7 @@ os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb unsigned long long value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -11488,7 +11488,7 @@ os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const * int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -11553,7 +11553,7 @@ os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -11622,7 +11622,7 @@ os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *cons int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -11731,7 +11731,7 @@ os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("scandir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -11799,7 +11799,7 @@ os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } path = args[0]; @@ -11858,7 +11858,7 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } { @@ -11943,7 +11943,7 @@ os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE_P("_add_dll_directory", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!path_converter(args[0], &path)) { @@ -12011,7 +12011,7 @@ os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *cookie; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } cookie = args[0]; @@ -12082,7 +12082,7 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *status_obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } status_obj = args[0]; @@ -12837,4 +12837,4 @@ os__create_environ(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ -/*[clinic end generated code: output=8dd4d597e70e7108 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=742670acc69a2252 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 0c18b870cbb39c..28b0f16c962a65 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -92,7 +92,7 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const int isfinal = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } data = args[0]; @@ -144,7 +144,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *c PyObject *file; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } file = args[0]; @@ -268,7 +268,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject const char *encoding = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (args[0] == Py_None) { @@ -385,7 +385,7 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObjec int flag = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -454,13 +454,13 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *intern = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (args[0] == Py_None) { encoding = NULL; } @@ -483,7 +483,7 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { if (args[1] == Py_None) { namespace_separator = NULL; } @@ -545,4 +545,4 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg) #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */ -/*[clinic end generated code: output=f5960f0528d2af18 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=69039db78d04a9d8 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index 04a987cdd4bac4..c5e3f425f2f609 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -597,13 +597,13 @@ select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) int flags = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { sizehint = PyLong_AsInt(fastargs[0]); if (sizehint == -1 && PyErr_Occurred()) { goto exit; @@ -767,7 +767,7 @@ select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na unsigned int eventmask = EPOLLIN | EPOLLPRI | EPOLLOUT; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -844,7 +844,7 @@ select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t narg unsigned int eventmask; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -913,7 +913,7 @@ select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -987,13 +987,13 @@ select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, int maxevents = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { timeout_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1360,4 +1360,4 @@ select_kqueue_control(kqueue_queue_Object *self, PyObject *const *args, Py_ssize #ifndef SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ -/*[clinic end generated code: output=edfdade5afb19de4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=368d1ac25db4f26d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index 110df15ad448f9..e626106099ce84 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -122,13 +122,13 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -148,4 +148,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=9a5a3473dc1e813e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b17bdf9cabf627f6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h index ec7ded20067096..5fd8ca4ed1f806 100644 --- a/Modules/clinic/sha2module.c.h +++ b/Modules/clinic/sha2module.c.h @@ -189,13 +189,13 @@ _sha2_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -263,13 +263,13 @@ _sha2_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -337,13 +337,13 @@ _sha2_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -411,13 +411,13 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -437,4 +437,4 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=7f1a0432c4f191d1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3f16b46fce693d25 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha3module.c.h b/Modules/clinic/sha3module.c.h index d85ab06ab448b6..f27851563df71f 100644 --- a/Modules/clinic/sha3module.c.h +++ b/Modules/clinic/sha3module.c.h @@ -55,7 +55,7 @@ py_sha3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (nargs < 1) { @@ -194,4 +194,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=01eca8c0fc4ef1b5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9924224afa3fe5e7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 2969df1dea5245..af740de7b0edcd 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -333,7 +333,7 @@ signal_set_wakeup_fd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int warn_on_full_buffer = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } fdobj = args[0]; @@ -776,4 +776,4 @@ signal_pidfd_send_signal(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */ -/*[clinic end generated code: output=46084b29ab9c637c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b445527154417f04 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index b1d2b6d337727a..8c8a34954ff874 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -78,13 +78,13 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *fdobj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { family = PyLong_AsInt(fastargs[0]); if (family == -1 && PyErr_Occurred()) { goto exit; @@ -93,7 +93,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { type = PyLong_AsInt(fastargs[1]); if (type == -1 && PyErr_Occurred()) { goto exit; @@ -102,7 +102,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { proto = PyLong_AsInt(fastargs[2]); if (proto == -1 && PyErr_Occurred()) { goto exit; @@ -286,4 +286,4 @@ _socket_socket_if_nametoindex(PySocketSockObject *self, PyObject *arg) #ifndef _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #define _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #endif /* !defined(_SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF) */ -/*[clinic end generated code: output=a888057b404f8d2d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c52d79afe7e3a794 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index 63f4d49cee0b31..d261fec6887783 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -59,13 +59,13 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje long facility = LOG_USER; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("openlog", "argument 'ident'", "str", args[0]); goto exit; @@ -75,7 +75,7 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { logopt = PyLong_AsLong(args[1]); if (logopt == -1 && PyErr_Occurred()) { goto exit; @@ -262,4 +262,4 @@ syslog_LOG_UPTO(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=e26dcd1fe726a2f6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2f59bf4a05a76261 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index e40936783d6d46..34c719fe295730 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -64,7 +64,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int wbits = MAX_WBITS; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -73,7 +73,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { level = PyLong_AsInt(args[1]); if (level == -1 && PyErr_Occurred()) { goto exit; @@ -154,7 +154,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t bufsize = DEF_BUF_SIZE; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -163,7 +163,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { wbits = PyLong_AsInt(args[1]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -272,13 +272,13 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb Py_buffer zdict = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { level = PyLong_AsInt(args[0]); if (level == -1 && PyErr_Occurred()) { goto exit; @@ -287,7 +287,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { method = PyLong_AsInt(args[1]); if (method == -1 && PyErr_Occurred()) { goto exit; @@ -296,7 +296,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { wbits = PyLong_AsInt(args[2]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -305,7 +305,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { memLevel = PyLong_AsInt(args[3]); if (memLevel == -1 && PyErr_Occurred()) { goto exit; @@ -314,7 +314,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { strategy = PyLong_AsInt(args[4]); if (strategy == -1 && PyErr_Occurred()) { goto exit; @@ -391,13 +391,13 @@ zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *zdict = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { wbits = PyLong_AsInt(args[0]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -455,7 +455,7 @@ zlib_Compress_compress(compobject *self, PyTypeObject *cls, PyObject *const *arg Py_buffer data = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -531,7 +531,7 @@ zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const Py_ssize_t max_length = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -603,7 +603,7 @@ zlib_Compress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, int mode = Z_FINISH; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -706,7 +706,7 @@ zlib_Compress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const PyObject *memo; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } memo = args[0]; @@ -804,7 +804,7 @@ zlib_Decompress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *cons PyObject *memo; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } memo = args[0]; @@ -853,7 +853,7 @@ zlib_Decompress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t length = DEF_BUF_SIZE; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (nargs < 1) { @@ -939,7 +939,7 @@ zlib_ZlibDecompressor_decompress(ZlibDecompressor *self, PyObject *const *args, Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -1098,4 +1098,4 @@ zlib_crc32(PyObject *module, PyObject *const *args, Py_ssize_t nargs) #ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */ -/*[clinic end generated code: output=7a532d89f6515797 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=33dca082eca14248 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 58c68ab8c0e7fe..bb78f9653e27f6 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -51,19 +51,19 @@ bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { arg = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("bytearray", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -618,7 +618,7 @@ bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t n PyObject *deletechars = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } table = args[0]; @@ -805,13 +805,13 @@ bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -927,13 +927,13 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1304,13 +1304,13 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; @@ -1410,7 +1410,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1523,13 +1523,13 @@ bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1616,4 +1616,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=d6770a8f30d5045f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=22da0ddac4fa3167 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 493b7e92213be4..34696997b24d8f 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -82,13 +82,13 @@ bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -248,13 +248,13 @@ bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -703,7 +703,7 @@ bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *deletechars = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } table = args[0]; @@ -1064,13 +1064,13 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; @@ -1157,7 +1157,7 @@ bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, P int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1270,13 +1270,13 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1335,19 +1335,19 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { x = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("bytes", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -1384,4 +1384,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=2262747a40245e76 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=631946bafd7564b2 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index eb1cef211a8d47..d3f5eb83ea1dc1 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -224,13 +224,13 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *co_exceptiontable = self->co_exceptiontable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0]) { + if (args[0] != NULL) { co_argcount = PyLong_AsInt(args[0]); if (co_argcount == -1 && PyErr_Occurred()) { goto exit; @@ -239,7 +239,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[1]) { + if (args[1] != NULL) { co_posonlyargcount = PyLong_AsInt(args[1]); if (co_posonlyargcount == -1 && PyErr_Occurred()) { goto exit; @@ -248,7 +248,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[2]) { + if (args[2] != NULL) { co_kwonlyargcount = PyLong_AsInt(args[2]); if (co_kwonlyargcount == -1 && PyErr_Occurred()) { goto exit; @@ -257,7 +257,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[3]) { + if (args[3] != NULL) { co_nlocals = PyLong_AsInt(args[3]); if (co_nlocals == -1 && PyErr_Occurred()) { goto exit; @@ -266,7 +266,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[4]) { + if (args[4] != NULL) { co_stacksize = PyLong_AsInt(args[4]); if (co_stacksize == -1 && PyErr_Occurred()) { goto exit; @@ -275,7 +275,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[5]) { + if (args[5] != NULL) { co_flags = PyLong_AsInt(args[5]); if (co_flags == -1 && PyErr_Occurred()) { goto exit; @@ -284,7 +284,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[6]) { + if (args[6] != NULL) { co_firstlineno = PyLong_AsInt(args[6]); if (co_firstlineno == -1 && PyErr_Occurred()) { goto exit; @@ -293,7 +293,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[7]) { + if (args[7] != NULL) { if (!PyBytes_Check(args[7])) { _PyArg_BadArgument("replace", "argument 'co_code'", "bytes", args[7]); goto exit; @@ -303,7 +303,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[8]) { + if (args[8] != NULL) { if (!PyTuple_Check(args[8])) { _PyArg_BadArgument("replace", "argument 'co_consts'", "tuple", args[8]); goto exit; @@ -313,7 +313,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[9]) { + if (args[9] != NULL) { if (!PyTuple_Check(args[9])) { _PyArg_BadArgument("replace", "argument 'co_names'", "tuple", args[9]); goto exit; @@ -323,7 +323,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[10]) { + if (args[10] != NULL) { if (!PyTuple_Check(args[10])) { _PyArg_BadArgument("replace", "argument 'co_varnames'", "tuple", args[10]); goto exit; @@ -333,7 +333,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[11]) { + if (args[11] != NULL) { if (!PyTuple_Check(args[11])) { _PyArg_BadArgument("replace", "argument 'co_freevars'", "tuple", args[11]); goto exit; @@ -343,7 +343,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[12]) { + if (args[12] != NULL) { if (!PyTuple_Check(args[12])) { _PyArg_BadArgument("replace", "argument 'co_cellvars'", "tuple", args[12]); goto exit; @@ -353,7 +353,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[13]) { + if (args[13] != NULL) { if (!PyUnicode_Check(args[13])) { _PyArg_BadArgument("replace", "argument 'co_filename'", "str", args[13]); goto exit; @@ -363,7 +363,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[14]) { + if (args[14] != NULL) { if (!PyUnicode_Check(args[14])) { _PyArg_BadArgument("replace", "argument 'co_name'", "str", args[14]); goto exit; @@ -373,7 +373,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[15]) { + if (args[15] != NULL) { if (!PyUnicode_Check(args[15])) { _PyArg_BadArgument("replace", "argument 'co_qualname'", "str", args[15]); goto exit; @@ -383,7 +383,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[16]) { + if (args[16] != NULL) { if (!PyBytes_Check(args[16])) { _PyArg_BadArgument("replace", "argument 'co_linetable'", "bytes", args[16]); goto exit; @@ -452,7 +452,7 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n int oparg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } oparg = PyLong_AsInt(args[0]); @@ -464,4 +464,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=1890970a003cbd1b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3a9660315288fab3 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 5f004360988665..1d57bd901fb480 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -141,13 +141,13 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *i = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { r = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -169,4 +169,4 @@ PyDoc_STRVAR(complex_from_number__doc__, #define COMPLEX_FROM_NUMBER_METHODDEF \ {"from_number", (PyCFunction)complex_from_number, METH_O|METH_CLASS, complex_from_number__doc__}, -/*[clinic end generated code: output=963680825c224a12 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bd0ab47ef26b6b2c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 3a06427ab3c776..694c2da04734fe 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -52,7 +52,7 @@ mappingproxy_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *mapping; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } mapping = fastargs[0]; @@ -142,25 +142,25 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *doc = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { fget = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { fset = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { fdel = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; @@ -173,4 +173,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=74a4ad2f7bef2b0c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c4a777c31a75e4ae input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 55075f5104508c..9bb5c9b0eff0f2 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -63,7 +63,7 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *start = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } iterable = fastargs[0]; @@ -107,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=c8c45aca15d6d540 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b8b0f0f98511df6b input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 593f4b1db6bbac..3c6e977419e97f 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -74,7 +74,7 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *kwdefaults = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyObject_TypeCheck(fastargs[0], &PyCode_Type)) { @@ -90,19 +90,19 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_pos; } - if (fastargs[2]) { + if (fastargs[2] != NULL) { name = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { defaults = fastargs[3]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { closure = fastargs[4]; if (!--noptargs) { goto skip_optional_pos; @@ -115,4 +115,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=90bf8ef1757569ca input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f2e2db50dc8465ed input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index c438feab433e9d..1c94391eb79ea5 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -236,13 +236,13 @@ list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject int reverse = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0]) { + if (args[0] != NULL) { keyfunc = args[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -439,4 +439,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=1a94d259d06b8847 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5a5033fd463948ca input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 1ce256a0860aa6..33af83d45b2183 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -49,7 +49,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *obase = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (nargs < 1) { @@ -316,13 +316,13 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * int is_signed = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[0]); @@ -339,7 +339,7 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * goto skip_optional_pos; } } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("to_bytes", "argument 'byteorder'", "str", args[1]); goto exit; @@ -427,14 +427,14 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb int is_signed = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } bytes_obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("from_bytes", "argument 'byteorder'", "str", args[1]); goto exit; @@ -476,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored)) { return int_is_integer_impl(self); } -/*[clinic end generated code: output=7c25ba2c37f5ae49 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=98e0bc2621f61521 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index 26dc82ce17da37..4bd692bcad3760 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -52,7 +52,7 @@ memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *object; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } object = fastargs[0]; @@ -108,7 +108,7 @@ memoryview__from_flags(PyTypeObject *type, PyObject *const *args, Py_ssize_t nar int flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } object = args[0]; @@ -188,7 +188,7 @@ memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t narg PyObject *shape = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -295,7 +295,7 @@ memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t n const char *order = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -391,13 +391,13 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -413,4 +413,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=5e8841d6ba2137ad input=a9049054013a1b77]*/ +/*[clinic end generated code: output=959c1e7fd39cc944 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index baade99470e367..72703841cd1c23 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -56,7 +56,7 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *doc = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -74,4 +74,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=b481af93ff176cb7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6a3543c10db7de58 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index f7592823951e87..96c67c895976a3 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -55,7 +55,7 @@ OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs PyObject *value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } seq = args[0]; @@ -120,7 +120,7 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -186,7 +186,7 @@ OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *default_value = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -249,7 +249,7 @@ OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs int last = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -315,7 +315,7 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n int last = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = args[0]; @@ -332,4 +332,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=8a132fa582835ff3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e2befca6325e3a2f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index 34fcbb04ff7c79..03abf9e5dc6098 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -48,7 +48,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *dict = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } arg = fastargs[0]; @@ -62,4 +62,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=0a357a8f8a803dc6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=28d3a5df25c298e7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h index 71dcf0eaa9ca05..0c7d49501e26b5 100644 --- a/Objects/clinic/typevarobject.c.h +++ b/Objects/clinic/typevarobject.c.h @@ -62,7 +62,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int infer_variance = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -73,19 +73,19 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { bound = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { default_value = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { covariant = PyObject_IsTrue(fastargs[3]); if (covariant < 0) { goto exit; @@ -94,7 +94,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { contravariant = PyObject_IsTrue(fastargs[4]); if (contravariant < 0) { goto exit; @@ -109,7 +109,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) } skip_optional_kwonly: constraints = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX); - if (!constraints) { + if (constraints == NULL) { goto exit; } return_value = typevar_new_impl(type, name, constraints, bound, default_value, covariant, contravariant, infer_variance); @@ -237,7 +237,7 @@ paramspecargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *origin; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } origin = fastargs[0]; @@ -291,7 +291,7 @@ paramspeckwargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *origin; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } origin = fastargs[0]; @@ -354,7 +354,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int infer_variance = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -365,19 +365,19 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1]) { + if (fastargs[1] != NULL) { bound = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { default_value = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3]) { + if (fastargs[3] != NULL) { covariant = PyObject_IsTrue(fastargs[3]); if (covariant < 0) { goto exit; @@ -386,7 +386,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4]) { + if (fastargs[4] != NULL) { contravariant = PyObject_IsTrue(fastargs[4]); if (contravariant < 0) { goto exit; @@ -525,7 +525,7 @@ typevartuple(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *default_value = &_Py_NoDefaultStruct; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -681,7 +681,7 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *type_params = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -700,4 +700,4 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=682ae821936a44c1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2bdc60a143b19655 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index d5d955c97deaff..d31eaafac7aa7e 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -247,13 +247,13 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[0]); goto exit; @@ -339,7 +339,7 @@ unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb int tabsize = 8; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -959,7 +959,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObjec Py_ssize_t count = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1283,13 +1283,13 @@ unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1405,13 +1405,13 @@ unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0]) { + if (args[0] != NULL) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1485,7 +1485,7 @@ unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1839,19 +1839,19 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { x = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("str", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -1888,4 +1888,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=8abe66fb123b96da input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cd8361f9ab0b544f input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 223773fe1c32c5..99e9dac5e1ca5a 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -57,7 +57,7 @@ stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py int tabsize = 8; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -321,4 +321,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=2f983f50ff6b1e99 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=240c25da9d061513 input=a9049054013a1b77]*/ diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h index 1bb6726b396c44..0d45f059dafe01 100644 --- a/PC/clinic/_wmimodule.cpp.h +++ b/PC/clinic/_wmimodule.cpp.h @@ -56,7 +56,7 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *query; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -69,4 +69,4 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj exit: return return_value; } -/*[clinic end generated code: output=25bdc78997031840 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ee15d75d2d34a917 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 07aa60f9151199..e75210c8ede2c1 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -352,7 +352,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -374,7 +374,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -535,7 +535,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int reserved = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -552,7 +552,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { access = PyLong_AsInt(args[2]); if (access == -1 && PyErr_Occurred()) { goto exit; @@ -967,7 +967,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -989,7 +989,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -1084,7 +1084,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -1106,7 +1106,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[2]) { + if (args[2] != NULL) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -1762,4 +1762,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) #ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF #define WINREG_QUERYREFLECTIONKEY_METHODDEF #endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=896dbd1bccdedebb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=715976b302c43444 input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index aa6441c4592fdf..1d8843c9b2398c 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -50,7 +50,7 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } readline = fastargs[0]; @@ -80,4 +80,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6c4d4137d988ae0d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=11a98d3654fc33dc input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index d67562fb421086..db58f189febe60 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -75,20 +75,20 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyTupleObject *skip_file_prefixes = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } message = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { category = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -105,7 +105,7 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { source = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -185,7 +185,7 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *sourceobj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } message = args[0]; @@ -202,19 +202,19 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs if (!noptargs) { goto skip_optional_pos; } - if (args[4]) { + if (args[4] != NULL) { mod = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { registry = args[5]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[6]) { + if (args[6] != NULL) { module_globals = args[6]; if (!--noptargs) { goto skip_optional_pos; @@ -244,4 +244,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored)) { return warnings_filters_mutated_impl(module); } -/*[clinic end generated code: output=4f2020f0ede0871e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a72e7f6b7a9c01f8 input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index 6e3e05fa4c99be..c265d6aceca682 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -75,26 +75,26 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int level = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } name = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { locals = args[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[3]) { + if (args[3] != NULL) { fromlist = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -300,7 +300,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int feature_version = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } source = args[0]; @@ -323,7 +323,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[3]) { + if (args[3] != NULL) { flags = PyLong_AsInt(args[3]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -332,7 +332,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[4]) { + if (args[4] != NULL) { dont_inherit = PyObject_IsTrue(args[4]); if (dont_inherit < 0) { goto exit; @@ -341,7 +341,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[5]) { + if (args[5] != NULL) { optimize = PyLong_AsInt(args[5]); if (optimize == -1 && PyErr_Occurred()) { goto exit; @@ -450,14 +450,14 @@ builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *locals = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } source = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -529,20 +529,20 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *closure = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } source = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1]) { + if (args[1] != NULL) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2]) { + if (args[2] != NULL) { locals = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -867,7 +867,7 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *mod = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } base = args[0]; @@ -944,25 +944,25 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int flush = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0]) { + if (fastargs[0] != NULL) { sep = fastargs[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[1]) { + if (fastargs[1] != NULL) { end = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2]) { + if (fastargs[2] != NULL) { file = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1085,7 +1085,7 @@ builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *ndigits = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } number = args[0]; @@ -1151,7 +1151,7 @@ builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *start = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } iterable = args[0]; @@ -1235,4 +1235,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=a25d6dfbf3079304 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cc800da5daf97b53 input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 31cd7e0a7d0f17..8b6b33f95c8d4b 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -224,7 +224,7 @@ _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int withdata = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -595,7 +595,7 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb Py_buffer source = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } key = PyLong_AsLong(args[0]); @@ -623,4 +623,4 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb #ifndef _IMP_EXEC_DYNAMIC_METHODDEF #define _IMP_EXEC_DYNAMIC_METHODDEF #endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */ -/*[clinic end generated code: output=e801e47448df8e84 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0e2089fe632e4bf0 input=a9049054013a1b77]*/ diff --git a/Python/clinic/instruction_sequence.c.h b/Python/clinic/instruction_sequence.c.h index 616a061e3bbaab..f58accf4b575e4 100644 --- a/Python/clinic/instruction_sequence.c.h +++ b/Python/clinic/instruction_sequence.c.h @@ -83,7 +83,7 @@ InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const int label; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } label = PyLong_AsInt(args[0]); @@ -149,7 +149,7 @@ InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *arg int end_col_offset; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -256,7 +256,7 @@ InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const PyObject *nested; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } nested = args[0]; @@ -301,4 +301,4 @@ InstructionSequenceType_get_instructions(_PyInstructionSequence *self, PyObject { return InstructionSequenceType_get_instructions_impl(self); } -/*[clinic end generated code: output=d27cfe58b6f3f332 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=572e5eb66f3b4f79 input=a9049054013a1b77]*/ diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index 75be65f816bf9b..009fb94327ba3c 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -71,7 +71,7 @@ marshal_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -158,7 +158,7 @@ marshal_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } file = args[0]; @@ -235,7 +235,7 @@ marshal_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } value = args[0]; @@ -315,7 +315,7 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (PyObject_GetBuffer(args[0], &bytes, PyBUF_SIMPLE) != 0) { @@ -339,4 +339,4 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec return return_value; } -/*[clinic end generated code: output=8f25dc60e1f525c8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2bee9d6b6b2406d4 input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index 9316f8a2d30587..284cbd0f7df646 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -53,7 +53,7 @@ sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *hook; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } hook = args[0]; @@ -562,7 +562,7 @@ sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, int depth; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } depth = PyLong_AsInt(args[0]); @@ -863,7 +863,7 @@ sys_set_int_max_str_digits(PyObject *module, PyObject *const *args, Py_ssize_t n int maxdigits; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } maxdigits = PyLong_AsInt(args[0]); @@ -1014,7 +1014,7 @@ sys_getunicodeinternedsize(PyObject *module, PyObject *const *args, Py_ssize_t n Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1480,7 +1480,7 @@ sys__getframemodulename(PyObject *module, PyObject *const *args, Py_ssize_t narg int depth = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (!args) { + if (args == NULL) { goto exit; } if (!noptargs) { @@ -1614,4 +1614,4 @@ sys__is_gil_enabled(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=fdec7ddc2508d65f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=70813735fd58757d input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index 6a6d40b3e0f5b3..d606d2a812b5b8 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -56,7 +56,7 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int tb_lineno; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, 0, argsbuf); - if (!fastargs) { + if (fastargs == NULL) { goto exit; } tb_next = fastargs[0]; @@ -78,4 +78,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=a82471b667511d1d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6e7d38a07b275eb3 input=a9049054013a1b77]*/ diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index e460b6c730b7fb..ea1458277d419e 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -480,7 +480,7 @@ def _parse_vararg(self) -> str: size = f'nargs - {self.max_pos}' if self.max_pos else 'nargs' return f""" {paramname} = PyTuple_New({size}); - if (!{paramname}) {{{{ + if ({paramname} == NULL) {{{{ goto exit; }}}} for (Py_ssize_t i = {self.max_pos}; i < nargs; ++i) {{{{ @@ -512,7 +512,7 @@ def _parse_vararg(self) -> str: if self.max_pos: return f""" {paramname} = PyTuple_GetSlice(args, {self.max_pos}, PY_SSIZE_T_MAX); - if (!{paramname}) {{{{ + if ({paramname} == NULL) {{{{ goto exit; }}}} """ @@ -684,7 +684,7 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t noptargs = %s + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" %s = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, %d, %d, %d, %d, argsbuf); - if (!%s) {{ + if (%s == NULL) {{ goto exit; }} """ % (argsname, @@ -707,7 +707,7 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t noptargs = %s + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, %d, %d, %d, %d, argsbuf); - if (!fastargs) {{ + if (fastargs == NULL) {{ goto exit; }} """ % (self.min_pos, @@ -775,7 +775,7 @@ def parse_general(self, clang: CLanguage) -> None: else: add_label = label parser_code.append(libclinic.normalize_snippet(""" - if (%s) {{ + if (%s != NULL) {{ """ % (argname_fmt % i), indent=4)) parser_code.append(libclinic.normalize_snippet(parsearg, indent=8)) parser_code.append(libclinic.normalize_snippet(""" From 6b0ff24d3460fc23cc4eb7b432696846d5cbfa03 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 12 Aug 2024 23:40:39 +0300 Subject: [PATCH 03/14] Revert "Change style for comparison with NULL." This reverts commit 99f2c168da9333df7135ab8dcdad2354856361b0. --- Lib/test/clinic.test.c | 166 +++++----- Lib/test/test_clinic.py | 2 +- Modules/_blake2/clinic/blake2b_impl.c.h | 26 +- Modules/_blake2/clinic/blake2s_impl.c.h | 26 +- Modules/_ctypes/clinic/_ctypes.c.h | 24 +- Modules/_io/clinic/_iomodule.c.h | 18 +- Modules/_io/clinic/bufferedio.c.h | 16 +- Modules/_io/clinic/bytesio.c.h | 4 +- Modules/_io/clinic/fileio.c.h | 16 +- Modules/_io/clinic/iobase.c.h | 6 +- Modules/_io/clinic/stringio.c.h | 6 +- Modules/_io/clinic/textio.c.h | 32 +- Modules/_io/clinic/winconsoleio.c.h | 14 +- Modules/_multiprocessing/clinic/semaphore.c.h | 12 +- Modules/_sqlite/clinic/connection.c.h | 54 ++-- Modules/_sqlite/clinic/cursor.c.h | 4 +- Modules/_sqlite/clinic/module.c.h | 4 +- Modules/_sre/clinic/sre.c.h | 40 +-- Modules/_ssl/clinic/cert.c.h | 4 +- Modules/_testcapi/clinic/exceptions.c.h | 8 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 14 +- Modules/clinic/_asynciomodule.c.h | 48 +-- Modules/clinic/_bisectmodule.c.h | 26 +- Modules/clinic/_bz2module.c.h | 4 +- Modules/clinic/_codecsmodule.c.h | 10 +- Modules/clinic/_collectionsmodule.c.h | 6 +- Modules/clinic/_csv.c.h | 8 +- Modules/clinic/_curses_panel.c.h | 8 +- Modules/clinic/_cursesmodule.c.h | 6 +- Modules/clinic/_datetimemodule.c.h | 42 +-- Modules/clinic/_elementtree.c.h | 38 +-- Modules/clinic/_functoolsmodule.c.h | 4 +- Modules/clinic/_hashopenssl.c.h | 80 ++--- Modules/clinic/_lzmamodule.c.h | 10 +- Modules/clinic/_opcode.c.h | 22 +- Modules/clinic/_pickle.c.h | 50 +-- Modules/clinic/_queuemodule.c.h | 12 +- Modules/clinic/_ssl.c.h | 38 +-- Modules/clinic/_struct.c.h | 8 +- Modules/clinic/_testclinic.c.h | 96 +++--- Modules/clinic/_testclinic_depr.c.h | 56 ++-- Modules/clinic/_testinternalcapi.c.h | 12 +- Modules/clinic/_testmultiphase.c.h | 6 +- Modules/clinic/_winapi.c.h | 8 +- Modules/clinic/_zoneinfo.c.h | 16 +- Modules/clinic/arraymodule.c.h | 10 +- Modules/clinic/binascii.c.h | 24 +- Modules/clinic/cmathmodule.c.h | 6 +- Modules/clinic/gcmodule.c.h | 6 +- Modules/clinic/itertoolsmodule.c.h | 22 +- Modules/clinic/mathmodule.c.h | 10 +- Modules/clinic/md5module.c.h | 6 +- Modules/clinic/overlapped.c.h | 4 +- Modules/clinic/posixmodule.c.h | 290 +++++++++--------- Modules/clinic/pyexpat.c.h | 16 +- Modules/clinic/selectmodule.c.h | 16 +- Modules/clinic/sha1module.c.h | 6 +- Modules/clinic/sha2module.c.h | 18 +- Modules/clinic/sha3module.c.h | 4 +- Modules/clinic/signalmodule.c.h | 4 +- Modules/clinic/socketmodule.c.h | 10 +- Modules/clinic/syslogmodule.c.h | 8 +- Modules/clinic/zlibmodule.c.h | 40 +-- Objects/clinic/bytearrayobject.c.h | 28 +- Objects/clinic/bytesobject.c.h | 28 +- Objects/clinic/codeobject.c.h | 40 +-- Objects/clinic/complexobject.c.h | 6 +- Objects/clinic/descrobject.c.h | 12 +- Objects/clinic/enumobject.c.h | 4 +- Objects/clinic/funcobject.c.h | 10 +- Objects/clinic/listobject.c.h | 6 +- Objects/clinic/longobject.c.h | 14 +- Objects/clinic/memoryobject.c.h | 14 +- Objects/clinic/moduleobject.c.h | 4 +- Objects/clinic/odictobject.c.h | 12 +- Objects/clinic/structseq.c.h | 4 +- Objects/clinic/typevarobject.c.h | 32 +- Objects/clinic/unicodeobject.c.h | 26 +- Objects/stringlib/clinic/transmogrify.h.h | 4 +- PC/clinic/_wmimodule.cpp.h | 4 +- PC/clinic/winreg.c.h | 18 +- Python/clinic/Python-tokenize.c.h | 4 +- Python/clinic/_warnings.c.h | 18 +- Python/clinic/bltinmodule.c.h | 42 +-- Python/clinic/import.c.h | 6 +- Python/clinic/instruction_sequence.c.h | 8 +- Python/clinic/marshal.c.h | 10 +- Python/clinic/sysmodule.c.h | 12 +- Python/clinic/traceback.c.h | 4 +- Tools/clinic/libclinic/parse_args.py | 10 +- 90 files changed, 995 insertions(+), 995 deletions(-) diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c index ed53ff9e466247..3e6475e825e214 100644 --- a/Lib/test/clinic.test.c +++ b/Lib/test/clinic.test.c @@ -2200,7 +2200,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2213,7 +2213,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=4e09d9574a3f8ae0 input=0d3484844749c05b]*/ +/*[clinic end generated code: output=8c0345bdc2d4279f input=0d3484844749c05b]*/ /*[clinic input] @@ -2270,7 +2270,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2283,7 +2283,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=405b5fee6815aca1 input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=66625282d27df5b4 input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2343,14 +2343,14 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2367,7 +2367,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=c092bcffeaaa72e6 input=eda7964f784f4607]*/ +/*[clinic end generated code: output=b64f34a10ee58dfe input=eda7964f784f4607]*/ /*[clinic input] @@ -2430,14 +2430,14 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2447,7 +2447,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2464,7 +2464,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=636f21b4e1246360 input=209387a4815e5082]*/ +/*[clinic end generated code: output=c9d506684af98d1f input=209387a4815e5082]*/ /*[clinic input] @@ -2525,14 +2525,14 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2549,7 +2549,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=7cdfa03e3f384237 input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=68edbf1d2262f7aa input=18393cc64fa000f4]*/ /*[clinic input] @@ -2606,7 +2606,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2619,7 +2619,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=2432f57378c9ec50 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=4292a4b34fc66678 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2677,7 +2677,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2690,7 +2690,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=721cdd929053f8c1 input=9042f2818f664839]*/ +/*[clinic end generated code: output=879bb3b449bc11b4 input=9042f2818f664839]*/ /*[clinic input] @@ -2751,7 +2751,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2766,7 +2766,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=298efe935ebddfe2 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=06380eb7891a8853 input=29546ebdca492fea]*/ /*[clinic input] @@ -2829,7 +2829,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2837,7 +2837,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2854,7 +2854,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=fafa8f7cc2ea0e33 input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=3131e879b31e9ddf input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2915,14 +2915,14 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2939,7 +2939,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=a82c579013c4b193 input=1581299d21d16f14]*/ +/*[clinic end generated code: output=1f6ab441c0a23c0b input=1581299d21d16f14]*/ /*[clinic input] @@ -3002,7 +3002,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3015,7 +3015,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3032,7 +3032,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=05ee0e7485b9d2b8 input=408798ec3d42949f]*/ +/*[clinic end generated code: output=1e9adfbf0156f8e2 input=408798ec3d42949f]*/ /*[clinic input] @@ -3096,7 +3096,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3104,7 +3104,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3121,7 +3121,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=54bd406e8da453f0 input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=bf69c0352b83d03e input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -3183,14 +3183,14 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3207,7 +3207,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=d22114decc846282 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=e1818c157f03f3d1 input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -3271,7 +3271,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3284,7 +3284,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3301,7 +3301,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=89d14d17f80a92b0 input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=a83c8f2a857434f5 input=1e557dc979d120fd]*/ /*[clinic input] @@ -3368,7 +3368,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3377,7 +3377,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3395,7 +3395,7 @@ static PyObject * test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=7d492cf1acd2d86e input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=affd90c19f802f78 input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3459,7 +3459,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3467,7 +3467,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3484,7 +3484,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=ec33a92df16b0508 input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=437e74e675923bb9 input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3552,7 +3552,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3560,7 +3560,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3570,7 +3570,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3588,7 +3588,7 @@ static PyObject * test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=860b2bb202b203ed input=d0883d45876f186c]*/ +/*[clinic end generated code: output=ad0869d8a7f2c677 input=d0883d45876f186c]*/ /*[clinic input] @@ -3656,20 +3656,20 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -3679,7 +3679,7 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3697,7 +3697,7 @@ static PyObject * test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=706f968ba915193f input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=0c9b524795e3c177 input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3768,7 +3768,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args PyObject *f = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -3781,13 +3781,13 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -3797,7 +3797,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args if (!noptargs) { goto skip_optional_kwonly; } - if (args[4] != NULL) { + if (args[4]) { e = args[4]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3816,7 +3816,7 @@ test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f) -/*[clinic end generated code: output=6f5f2923372292e7 input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=10507e1f8db1f7b0 input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3872,7 +3872,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -3892,7 +3892,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=cb2e11ad7adab5b2 input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=3a56ca73418929be input=303df5046c7e37a3]*/ /*[clinic input] @@ -4233,7 +4233,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -4254,7 +4254,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=e0f7eafcb9fa5b90 input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=83da0088d61ef092 input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -4315,7 +4315,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar int b = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -4345,7 +4345,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=6262643aa7837e3b input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=6d5d4c7b8725a523 input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -4406,13 +4406,13 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize PyObject *c = " "; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { b = PyObject_IsTrue(fastargs[0]); if (b < 0) { goto exit; @@ -4439,7 +4439,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=43a01f79976a31ff input=fa56a709a035666e]*/ +/*[clinic end generated code: output=71967475eadae191 input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4491,7 +4491,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *mod; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } mod = args[0]; @@ -4503,7 +4503,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=d9801075d3007030 input=afefe259667f13ba]*/ +/*[clinic end generated code: output=20495fdbd57c9532 input=afefe259667f13ba]*/ /*[clinic input] mangle1 @@ -4576,7 +4576,7 @@ mangle1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_noptargs; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } __clinic_args = args[0]; @@ -4599,7 +4599,7 @@ mangle1_impl(PyObject *module, PyObject *args, PyObject *kwnames, PyObject *return_value, PyObject *_keywords, PyObject *_parser, PyObject *argsbuf, PyObject *fastargs, PyObject *nargs, PyObject *noptargs) -/*[clinic end generated code: output=602d6c5d98514d01 input=a3ed51bdedf8a3c7]*/ +/*[clinic end generated code: output=11a67d5f9b51d1e5 input=a3ed51bdedf8a3c7]*/ /*[clinic input] mangle2 @@ -4657,7 +4657,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } __clinic_args = args[0]; @@ -4672,7 +4672,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn static PyObject * mangle2_impl(PyObject *module, PyObject *args, PyObject *kwargs, PyObject *return_value) -/*[clinic end generated code: output=377d11ceab98ce76 input=391766fee51bad7a]*/ +/*[clinic end generated code: output=228db961b4469d07 input=391766fee51bad7a]*/ /*[clinic input] @@ -4726,7 +4726,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ int a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = PyLong_AsInt(args[0]); @@ -4741,7 +4741,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ static PyObject * Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a) -/*[clinic end generated code: output=df4202508aa6cfa3 input=af158077bd237ef9]*/ +/*[clinic end generated code: output=c2e71608109772f2 input=af158077bd237ef9]*/ /*[clinic input] @@ -5074,7 +5074,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *a; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -5086,7 +5086,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) static int Test___init___impl(TestObj *self, PyObject *a) -/*[clinic end generated code: output=3eec6387c01b5c81 input=a8f9222a6ab35c59]*/ +/*[clinic end generated code: output=ca1607b9a98fb44a input=a8f9222a6ab35c59]*/ /*[clinic input] @@ -5340,7 +5340,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t int int_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } int_value = PyLong_AsInt(args[0]); @@ -5355,7 +5355,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * mangled_c_keyword_identifier_impl(PyObject *module, int int_value) -/*[clinic end generated code: output=7b4182b13bdd0132 input=060876448ab567a2]*/ +/*[clinic end generated code: output=6e8a7c9097050537 input=060876448ab567a2]*/ /*[clinic input] @@ -5599,7 +5599,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *arg = CONST_A + CONST_B; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -5615,7 +5615,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * fn_with_default_binop_expr_impl(PyObject *module, PyObject *arg) -/*[clinic end generated code: output=c4e262bb744618b0 input=1b55c8ae68d89453]*/ +/*[clinic end generated code: output=fa4fe50d45ddcbb6 input=1b55c8ae68d89453]*/ /*[python input] @@ -5687,7 +5687,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py str a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!c_converter_func(args[0], &a)) { @@ -5701,7 +5701,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py static PyObject * docstr_fallback_to_converter_default_impl(PyObject *module, str a) -/*[clinic end generated code: output=ed7f24967fd701ee input=0cbe6a4d24bc2274]*/ +/*[clinic end generated code: output=a3efbe6cf731ca9e input=0cbe6a4d24bc2274]*/ /*[clinic input] diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 82948731fa08aa..94e79222934c7a 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -2694,7 +2694,7 @@ def test_cli_force(self): # Verify by checking the checksum. checksum = ( "/*[clinic end generated code: " - "output=72c28b3f18a73d51 input=9543a8d2da235301]*/\n" + "output=843576e3ffe85e2d input=9543a8d2da235301]*/\n" ) with open(fn, encoding='utf-8') as f: generated = f.read() diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 9f0d8a2ca912e5..6c28f404069008 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -73,7 +73,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (nargs < 1) { @@ -85,7 +85,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { digest_size = PyLong_AsInt(fastargs[1]); if (digest_size == -1 && PyErr_Occurred()) { goto exit; @@ -94,7 +94,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { if (PyObject_GetBuffer(fastargs[2], &key, PyBUF_SIMPLE) != 0) { goto exit; } @@ -102,7 +102,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { if (PyObject_GetBuffer(fastargs[3], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -110,7 +110,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { if (PyObject_GetBuffer(fastargs[4], &person, PyBUF_SIMPLE) != 0) { goto exit; } @@ -118,7 +118,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[5] != NULL) { + if (fastargs[5]) { fanout = PyLong_AsInt(fastargs[5]); if (fanout == -1 && PyErr_Occurred()) { goto exit; @@ -127,7 +127,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[6] != NULL) { + if (fastargs[6]) { depth = PyLong_AsInt(fastargs[6]); if (depth == -1 && PyErr_Occurred()) { goto exit; @@ -136,7 +136,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[7] != NULL) { + if (fastargs[7]) { if (!_PyLong_UnsignedLong_Converter(fastargs[7], &leaf_size)) { goto exit; } @@ -144,7 +144,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[8] != NULL) { + if (fastargs[8]) { if (!_PyLong_UnsignedLongLong_Converter(fastargs[8], &node_offset)) { goto exit; } @@ -152,7 +152,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[9] != NULL) { + if (fastargs[9]) { node_depth = PyLong_AsInt(fastargs[9]); if (node_depth == -1 && PyErr_Occurred()) { goto exit; @@ -161,7 +161,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[10] != NULL) { + if (fastargs[10]) { inner_size = PyLong_AsInt(fastargs[10]); if (inner_size == -1 && PyErr_Occurred()) { goto exit; @@ -170,7 +170,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[11] != NULL) { + if (fastargs[11]) { last_node = PyObject_IsTrue(fastargs[11]); if (last_node < 0) { goto exit; @@ -265,4 +265,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=cbaa541a6a67d1e4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d65f094670bd0ba7 input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index 2d7bbf6a057deb..9e9c1f4e2e7554 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -73,7 +73,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (nargs < 1) { @@ -85,7 +85,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { digest_size = PyLong_AsInt(fastargs[1]); if (digest_size == -1 && PyErr_Occurred()) { goto exit; @@ -94,7 +94,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { if (PyObject_GetBuffer(fastargs[2], &key, PyBUF_SIMPLE) != 0) { goto exit; } @@ -102,7 +102,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { if (PyObject_GetBuffer(fastargs[3], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -110,7 +110,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { if (PyObject_GetBuffer(fastargs[4], &person, PyBUF_SIMPLE) != 0) { goto exit; } @@ -118,7 +118,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[5] != NULL) { + if (fastargs[5]) { fanout = PyLong_AsInt(fastargs[5]); if (fanout == -1 && PyErr_Occurred()) { goto exit; @@ -127,7 +127,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[6] != NULL) { + if (fastargs[6]) { depth = PyLong_AsInt(fastargs[6]); if (depth == -1 && PyErr_Occurred()) { goto exit; @@ -136,7 +136,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[7] != NULL) { + if (fastargs[7]) { if (!_PyLong_UnsignedLong_Converter(fastargs[7], &leaf_size)) { goto exit; } @@ -144,7 +144,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[8] != NULL) { + if (fastargs[8]) { if (!_PyLong_UnsignedLongLong_Converter(fastargs[8], &node_offset)) { goto exit; } @@ -152,7 +152,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[9] != NULL) { + if (fastargs[9]) { node_depth = PyLong_AsInt(fastargs[9]); if (node_depth == -1 && PyErr_Occurred()) { goto exit; @@ -161,7 +161,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[10] != NULL) { + if (fastargs[10]) { inner_size = PyLong_AsInt(fastargs[10]); if (inner_size == -1 && PyErr_Occurred()) { goto exit; @@ -170,7 +170,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[11] != NULL) { + if (fastargs[11]) { last_node = PyObject_IsTrue(fastargs[11]); if (last_node < 0) { goto exit; @@ -265,4 +265,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=d2a4c67b805ffce2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0f0893fd7822513b input=a9049054013a1b77]*/ diff --git a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h index 356fdb2d5b8ec2..47426a29f453ae 100644 --- a/Modules/_ctypes/clinic/_ctypes.c.h +++ b/Modules/_ctypes/clinic/_ctypes.c.h @@ -66,7 +66,7 @@ CDataType_from_address(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -113,7 +113,7 @@ CDataType_from_buffer(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; @@ -176,7 +176,7 @@ CDataType_from_buffer_copy(PyObject *type, PyTypeObject *cls, PyObject *const *a Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_SIMPLE) != 0) { @@ -246,7 +246,7 @@ CDataType_in_dll(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ss const char *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } dll = args[0]; @@ -302,7 +302,7 @@ CDataType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -345,7 +345,7 @@ PyCPointerType_set_type(PyTypeObject *self, PyTypeObject *cls, PyObject *const * PyObject *type; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } type = args[0]; @@ -389,7 +389,7 @@ PyCPointerType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *ar PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -431,7 +431,7 @@ c_wchar_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -473,7 +473,7 @@ c_char_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -515,7 +515,7 @@ c_void_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -559,7 +559,7 @@ PyCSimpleType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *arg PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -610,4 +610,4 @@ Simple_from_outparm(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py } return Simple_from_outparm_impl(self, cls); } -/*[clinic end generated code: output=9adcf797fc056e1b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2ae83e7090e0bbba input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index e27d99d8867ee1..54b6ac8e4ddb4d 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -176,14 +176,14 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *opener = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } file = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("open", "argument 'mode'", "str", args[1]); goto exit; @@ -201,7 +201,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { buffering = PyLong_AsInt(args[2]); if (buffering == -1 && PyErr_Occurred()) { goto exit; @@ -210,7 +210,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (args[3] == Py_None) { encoding = NULL; } @@ -233,7 +233,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { if (args[4] == Py_None) { errors = NULL; } @@ -256,7 +256,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { if (args[5] == Py_None) { newline = NULL; } @@ -279,7 +279,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[6] != NULL) { + if (args[6]) { closefd = PyObject_IsTrue(args[6]); if (closefd < 0) { goto exit; @@ -391,7 +391,7 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -404,4 +404,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=154cb6ba91c6eb81 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ca839985e0d5219c input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index d6de1b6d294d22..887aaa75c1f31e 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -152,7 +152,7 @@ _io__BufferedIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *arg int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -206,7 +206,7 @@ _io__BufferedIOBase_read1(PyObject *self, PyTypeObject *cls, PyObject *const *ar int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -263,7 +263,7 @@ _io__BufferedIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } b = args[0]; @@ -911,7 +911,7 @@ _io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args, PyObject *pos = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -974,7 +974,7 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } raw = fastargs[0]; @@ -1051,7 +1051,7 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } raw = fastargs[0]; @@ -1220,7 +1220,7 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } raw = fastargs[0]; @@ -1245,4 +1245,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=14945db89d878161 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4a40772275c05bbd input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index 104813796f38fa..d42d3c83d2c6af 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -521,7 +521,7 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *initvalue = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -534,4 +534,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=d8b8ef5ff340cad6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c8d7b26174a8c180 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index e54b4c6624c9b4..067adf82f4799b 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -95,14 +95,14 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *opener = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } nameobj = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("FileIO", "argument 'mode'", "str", fastargs[1]); goto exit; @@ -120,7 +120,7 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { closefd = PyObject_IsTrue(fastargs[2]); if (closefd < 0) { goto exit; @@ -242,7 +242,7 @@ _io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s Py_buffer buffer = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_WRITABLE) < 0) { @@ -318,7 +318,7 @@ _io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize Py_ssize_t size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -371,7 +371,7 @@ _io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssiz Py_buffer b = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) { @@ -491,7 +491,7 @@ _io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *posobj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -528,4 +528,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO_FILEIO_TRUNCATE_METHODDEF #define _IO_FILEIO_TRUNCATE_METHODDEF #endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */ -/*[clinic end generated code: output=092fe21364f68f31 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7eb93019525a5a8d input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index 247cfcb5617b8b..57810d09884ff8 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -57,7 +57,7 @@ _io__IOBase_seek(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ss int whence = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } offset = PyLong_AsInt(args[0]); @@ -133,7 +133,7 @@ _io__IOBase_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *size = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -441,4 +441,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _io__RawIOBase_readall_impl(self); } -/*[clinic end generated code: output=bbf8ec2b7701e7d2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d3d99fa9e875e696 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index f2ce060b3f389d..ac1fc093815204 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -337,13 +337,13 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *newline_obj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { value = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -555,4 +555,4 @@ _io_StringIO_newlines_get(stringio *self, void *Py_UNUSED(context)) return return_value; } -/*[clinic end generated code: output=e83b2aab6d92f146 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4f03839c05618ef5 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index f4d74b511399b1..6141ee24eabb5c 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -71,7 +71,7 @@ _io__TextIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, P int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -125,7 +125,7 @@ _io__TextIOBase_readline(PyObject *self, PyTypeObject *cls, PyObject *const *arg int size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -179,7 +179,7 @@ _io__TextIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, const char *s; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -340,7 +340,7 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject PyObject *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } decoder = fastargs[0]; @@ -406,7 +406,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } input = args[0]; @@ -547,14 +547,14 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) int write_through = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } buffer = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (fastargs[1] == Py_None) { encoding = NULL; } @@ -577,13 +577,13 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { errors = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { if (fastargs[3] == Py_None) { newline = NULL; } @@ -606,7 +606,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { line_buffering = PyObject_IsTrue(fastargs[4]); if (line_buffering < 0) { goto exit; @@ -682,31 +682,31 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na PyObject *write_through_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0] != NULL) { + if (args[0]) { encoding = args[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[1] != NULL) { + if (args[1]) { errors = args[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { newline_obj = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { line_buffering_obj = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1292,4 +1292,4 @@ _io_TextIOWrapper__CHUNK_SIZE_set(textio *self, PyObject *value, void *Py_UNUSED return return_value; } -/*[clinic end generated code: output=63c5bbef1c6af379 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=50e75a2cb6d7566f input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 7005057183a3cc..0bb8e6785b3483 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -94,14 +94,14 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *opener = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } nameobj = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("_WindowsConsoleIO", "argument 'mode'", "str", fastargs[1]); goto exit; @@ -119,7 +119,7 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { closefd = PyObject_IsTrue(fastargs[2]); if (closefd < 0) { goto exit; @@ -240,7 +240,7 @@ _io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject * Py_buffer buffer = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_WRITABLE) < 0) { @@ -324,7 +324,7 @@ _io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *cons Py_ssize_t size = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -381,7 +381,7 @@ _io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *con Py_buffer b = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &b, PyBUF_SIMPLE) != 0) { @@ -457,4 +457,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */ -/*[clinic end generated code: output=7805bbadbfcbe566 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=24f4d87b9b3ff97f input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index 2455bfa7492b66..cb253da5f4d01b 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -59,13 +59,13 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { blocking = PyObject_IsTrue(args[0]); if (blocking < 0) { goto exit; @@ -164,13 +164,13 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { blocking = PyObject_IsTrue(args[0]); if (blocking < 0) { goto exit; @@ -264,7 +264,7 @@ _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) int unlink; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } kind = PyLong_AsInt(fastargs[0]); @@ -573,4 +573,4 @@ _multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */ -/*[clinic end generated code: output=3040f3da2ba99e39 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=785ab7ac492ce400 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index cf8080878d4095..31c9ad5ee89399 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -82,14 +82,14 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } database = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (PyFloat_CheckExact(fastargs[1])) { timeout = PyFloat_AS_DOUBLE(fastargs[1]); } @@ -104,7 +104,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { detect_types = PyLong_AsInt(fastargs[2]); if (detect_types == -1 && PyErr_Occurred()) { goto exit; @@ -113,7 +113,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { if (!isolation_level_converter(fastargs[3], &isolation_level)) { goto exit; } @@ -121,7 +121,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { check_same_thread = PyObject_IsTrue(fastargs[4]); if (check_same_thread < 0) { goto exit; @@ -130,13 +130,13 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[5] != NULL) { + if (fastargs[5]) { factory = fastargs[5]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[6] != NULL) { + if (fastargs[6]) { cache_size = PyLong_AsInt(fastargs[6]); if (cache_size == -1 && PyErr_Occurred()) { goto exit; @@ -145,7 +145,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[7] != NULL) { + if (fastargs[7]) { uri = PyObject_IsTrue(fastargs[7]); if (uri < 0) { goto exit; @@ -214,7 +214,7 @@ pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ PyObject *factory = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -290,7 +290,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -325,7 +325,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { readonly = PyObject_IsTrue(args[3]); if (readonly < 0) { goto exit; @@ -482,7 +482,7 @@ pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls int deterministic = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 3) { @@ -575,7 +575,7 @@ create_window_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *c PyObject *aggregate_class; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -671,7 +671,7 @@ pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cl PyObject *aggregate_class; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 3) { @@ -771,7 +771,7 @@ pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -865,7 +865,7 @@ pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject int n; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -952,7 +952,7 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject * PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -1056,7 +1056,7 @@ pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *const *a const char *entrypoint = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1253,7 +1253,7 @@ pysqlite_connection_iterdump(pysqlite_Connection *self, PyObject *const *args, P PyObject *filter = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1321,7 +1321,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ double sleep = 0.25; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyObject_TypeCheck(args[0], clinic_state()->ConnectionType)) { @@ -1332,7 +1332,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { pages = PyLong_AsInt(args[1]); if (pages == -1 && PyErr_Occurred()) { goto exit; @@ -1341,13 +1341,13 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { progress = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("backup", "argument 'name'", "str", args[3]); goto exit; @@ -1419,7 +1419,7 @@ pysqlite_connection_create_collation(pysqlite_Connection *self, PyTypeObject *cl PyObject *callable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1498,7 +1498,7 @@ serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1588,7 +1588,7 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, const char *name = "main"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyUnicode_Check(args[0])) { @@ -1866,4 +1866,4 @@ getconfig(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=14390eaa877f1ba0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9e00c4721c5f653b input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index 7d1cefa8017695..e076789d7fc255 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -217,7 +217,7 @@ pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize int maxrows = self->arraysize; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -313,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=a8cccaf5563a44ce input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7277c0b2524c5c5a input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index 8740bfe17b7230..cb37f2b1f8e0ce 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -53,7 +53,7 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t const char *statement; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -208,4 +208,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=6c9173c86c2bfebb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=05f04beb7ae081cc input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index 0254b18bfe2435..c6a213f0209d19 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -214,14 +214,14 @@ _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const * Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -307,14 +307,14 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *con Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -402,14 +402,14 @@ _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -494,14 +494,14 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -589,14 +589,14 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -681,14 +681,14 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t endpos = PY_SSIZE_T_MAX; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[1]); @@ -772,7 +772,7 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t na Py_ssize_t maxsplit = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } string = args[0]; @@ -847,7 +847,7 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *ar Py_ssize_t count = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } repl = args[0]; @@ -924,7 +924,7 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *a Py_ssize_t count = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } repl = args[0]; @@ -1028,7 +1028,7 @@ _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *indexgroup; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } pattern = args[0]; @@ -1153,7 +1153,7 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *template; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } template = args[0]; @@ -1212,7 +1212,7 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1275,7 +1275,7 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t na PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1461,4 +1461,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=1870cead82705de0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e3592512bd214efd input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index 9f339230946c60..b2efbdb6122271 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -53,7 +53,7 @@ _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ int format = PY_SSL_ENCODING_PEM; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -86,4 +86,4 @@ _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored)) { return _ssl_Certificate_get_info_impl(self); } -/*[clinic end generated code: output=306961a93ccd423a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cbdcf54a8d29c126 input=a9049054013a1b77]*/ diff --git a/Modules/_testcapi/clinic/exceptions.c.h b/Modules/_testcapi/clinic/exceptions.c.h index e60bbd4bed2d8e..3e46b9db5c8313 100644 --- a/Modules/_testcapi/clinic/exceptions.c.h +++ b/Modules/_testcapi/clinic/exceptions.c.h @@ -105,7 +105,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss PyObject *dict = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -124,7 +124,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("make_exception_with_doc", "argument 'doc'", "str", args[1]); goto exit; @@ -142,7 +142,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { base = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -456,4 +456,4 @@ _testcapi_unstable_exc_prep_reraise_star(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=010e7122a0215175 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7a5adf45325bdd9f input=a9049054013a1b77]*/ diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index 121aa02276332b..db5ee69fd855b9 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -62,7 +62,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } input = args[0]; @@ -148,7 +148,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) { @@ -235,7 +235,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } input = args[0]; @@ -364,7 +364,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb int final = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) { @@ -599,7 +599,7 @@ _multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, P PyObject *strobj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } strobj = args[0]; @@ -643,7 +643,7 @@ _multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *se PyObject *lines; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } lines = args[0]; @@ -682,4 +682,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__, #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \ {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__}, -/*[clinic end generated code: output=af367323cf185718 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d4b12769230c42bb input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index d410cd2a7306e0..216e2d510948e1 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -64,7 +64,7 @@ _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *loop = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -164,7 +164,7 @@ _asyncio_Future_set_result(FutureObj *self, PyTypeObject *cls, PyObject *const * PyObject *result; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } result = args[0]; @@ -211,7 +211,7 @@ _asyncio_Future_set_exception(FutureObj *self, PyTypeObject *cls, PyObject *cons PyObject *exception; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } exception = args[0]; @@ -273,7 +273,7 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyTypeObject *cls, PyObject * PyObject *context = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fn = args[0]; @@ -324,7 +324,7 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyTypeObject *cls, PyObjec PyObject *fn; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fn = args[0]; @@ -385,7 +385,7 @@ _asyncio_Future_cancel(FutureObj *self, PyTypeObject *cls, PyObject *const *args PyObject *msg = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -532,26 +532,26 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) int eager_start = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } coro = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { loop = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { name = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { context = fastargs[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -654,7 +654,7 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *msg = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -777,7 +777,7 @@ _asyncio_Task_get_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *args, PyObject *limit = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -845,13 +845,13 @@ _asyncio_Task_print_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *arg PyObject *file = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0] != NULL) { + if (args[0]) { limit = args[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1065,7 +1065,7 @@ _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } task = args[0]; @@ -1122,7 +1122,7 @@ _asyncio__register_eager_task(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } task = args[0]; @@ -1179,7 +1179,7 @@ _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } task = args[0]; @@ -1236,7 +1236,7 @@ _asyncio__unregister_eager_task(PyObject *module, PyObject *const *args, Py_ssiz PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } task = args[0]; @@ -1296,7 +1296,7 @@ _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } loop = args[0]; @@ -1357,7 +1357,7 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } loop = args[0]; @@ -1417,7 +1417,7 @@ _asyncio__swap_current_task(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *task; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } loop = args[0]; @@ -1474,7 +1474,7 @@ _asyncio_current_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1534,7 +1534,7 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *loop = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1547,4 +1547,4 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py exit: return return_value; } -/*[clinic end generated code: output=c80426f91740f5a7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2ec3af5a73914995 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index ec07ea2b1998fd..3d9597d4a3edf0 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -70,7 +70,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -78,7 +78,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -95,7 +95,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -177,7 +177,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -185,7 +185,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -202,7 +202,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -283,7 +283,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -291,7 +291,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -308,7 +308,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -390,7 +390,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -398,7 +398,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -415,7 +415,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (!_Py_convert_optional_to_ssize_t(args[3], &hi)) { goto exit; } @@ -434,4 +434,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=c8c191698442d883 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f30e300ff9c13401 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 1eb8a16fd33311..02413e27ebc07b 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -171,7 +171,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -234,4 +234,4 @@ _bz2_BZ2Decompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=14199ed4f22426be input=a9049054013a1b77]*/ +/*[clinic end generated code: output=43bd1646494d5118 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index 5402de1ca38723..ea9e17ecf942a3 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -124,14 +124,14 @@ _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[1]); goto exit; @@ -224,14 +224,14 @@ _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[1]); goto exit; @@ -2746,4 +2746,4 @@ _codecs_lookup_error(PyObject *module, PyObject *arg) #ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF #define _CODECS_CODE_PAGE_ENCODE_METHODDEF #endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */ -/*[clinic end generated code: output=bd7067347259139a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1642a3b61c8d3de7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index acf1b69ca78e41..6ce22f4f372507 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -498,13 +498,13 @@ deque_init(PyObject *deque, PyObject *args, PyObject *kwargs) PyObject *maxlenobj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { iterable = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -629,4 +629,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=3f6c5748d18137ef input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cfb6b9597af0afce input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index 137c250d9ecd48..269031484a8252 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -75,7 +75,7 @@ _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } name = args[0]; @@ -132,7 +132,7 @@ _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } name = args[0]; @@ -193,7 +193,7 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *new_limit = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -206,4 +206,4 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=0a4d49e85185a770 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=520893573ec130ab input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index 801edc0646715c..93f13b0a4ef28a 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -186,7 +186,7 @@ _curses_panel_panel_move(PyCursesPanelObject *self, PyTypeObject *cls, PyObject int x; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } y = PyLong_AsInt(args[0]); @@ -256,7 +256,7 @@ _curses_panel_panel_replace(PyCursesPanelObject *self, PyTypeObject *cls, PyObje PyCursesWindowObject *win; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyObject_TypeCheck(args[0], &PyCursesWindow_Type)) { @@ -304,7 +304,7 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyTypeObject *cls, Py PyObject *obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; @@ -421,4 +421,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _curses_panel_update_panels_impl(module); } -/*[clinic end generated code: output=7beb8c8bfc0b12f4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=175a4c3caeedd3de input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 1529675e15706b..bd22b512103736 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2715,13 +2715,13 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int fd = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (args[0] == Py_None) { term = NULL; } @@ -4318,4 +4318,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=04f068f9d45c87bd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=68fe1e92542d3ede input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 4b12de58b90bed..60fecca4c37775 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -61,7 +61,7 @@ iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int weekday; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } year = PyLong_AsInt(fastargs[0]); @@ -131,13 +131,13 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n int day = GET_DAY(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { year = PyLong_AsInt(args[0]); if (year == -1 && PyErr_Occurred()) { goto exit; @@ -146,7 +146,7 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { month = PyLong_AsInt(args[1]); if (month == -1 && PyErr_Occurred()) { goto exit; @@ -220,13 +220,13 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n int fold = TIME_GET_FOLD(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { hour = PyLong_AsInt(args[0]); if (hour == -1 && PyErr_Occurred()) { goto exit; @@ -235,7 +235,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { minute = PyLong_AsInt(args[1]); if (minute == -1 && PyErr_Occurred()) { goto exit; @@ -244,7 +244,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { second = PyLong_AsInt(args[2]); if (second == -1 && PyErr_Occurred()) { goto exit; @@ -253,7 +253,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { microsecond = PyLong_AsInt(args[3]); if (microsecond == -1 && PyErr_Occurred()) { goto exit; @@ -262,7 +262,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { tzinfo = args[4]; if (!--noptargs) { goto skip_optional_pos; @@ -334,7 +334,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg PyObject *tz = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -407,13 +407,13 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s int fold = DATE_GET_FOLD(self); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { year = PyLong_AsInt(args[0]); if (year == -1 && PyErr_Occurred()) { goto exit; @@ -422,7 +422,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { month = PyLong_AsInt(args[1]); if (month == -1 && PyErr_Occurred()) { goto exit; @@ -431,7 +431,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { day = PyLong_AsInt(args[2]); if (day == -1 && PyErr_Occurred()) { goto exit; @@ -440,7 +440,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { hour = PyLong_AsInt(args[3]); if (hour == -1 && PyErr_Occurred()) { goto exit; @@ -449,7 +449,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { minute = PyLong_AsInt(args[4]); if (minute == -1 && PyErr_Occurred()) { goto exit; @@ -458,7 +458,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { second = PyLong_AsInt(args[5]); if (second == -1 && PyErr_Occurred()) { goto exit; @@ -467,7 +467,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[6] != NULL) { + if (args[6]) { microsecond = PyLong_AsInt(args[6]); if (microsecond == -1 && PyErr_Occurred()) { goto exit; @@ -476,7 +476,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s goto skip_optional_pos; } } - if (args[7] != NULL) { + if (args[7]) { tzinfo = args[7]; if (!--noptargs) { goto skip_optional_pos; @@ -496,4 +496,4 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s exit: return return_value; } -/*[clinic end generated code: output=1819c1ea1b08445b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a62af1bb85589bc4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 9ececb192a99aa..6d989a0825296f 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -42,7 +42,7 @@ _elementtree_Element_append(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *subelement; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyObject_TypeCheck(args[0], clinic_state()->Element_Type)) { @@ -199,7 +199,7 @@ _elementtree_Element___setstate__(ElementObject *self, PyTypeObject *cls, PyObje PyObject *state; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } state = args[0]; @@ -242,7 +242,7 @@ _elementtree_Element_extend(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *elements; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } elements = args[0]; @@ -299,7 +299,7 @@ _elementtree_Element_find(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } path = args[0]; @@ -363,14 +363,14 @@ _elementtree_Element_findtext(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } path = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { default_value = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -431,7 +431,7 @@ _elementtree_Element_findall(ElementObject *self, PyTypeObject *cls, PyObject *c PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } path = args[0]; @@ -493,7 +493,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *namespaces = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } path = args[0]; @@ -555,7 +555,7 @@ _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -616,7 +616,7 @@ _elementtree_Element_iter(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *tag = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -764,7 +764,7 @@ _elementtree_Element_makeelement(ElementObject *self, PyTypeObject *cls, PyObjec PyObject *attrib; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } tag = args[0]; @@ -884,13 +884,13 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar int insert_pis = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { element_factory = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -900,19 +900,19 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { comment_factory = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { pi_factory = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { insert_comments = PyObject_IsTrue(fastargs[3]); if (insert_comments < 0) { goto exit; @@ -1115,13 +1115,13 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs const char *encoding = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { target = fastargs[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1236,4 +1236,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=5f9c6f6954f0003c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=386bfc0b02ea9531 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_functoolsmodule.c.h b/Modules/clinic/_functoolsmodule.c.h index 4d977ad1da4feb..5bdad0bc061574 100644 --- a/Modules/clinic/_functoolsmodule.c.h +++ b/Modules/clinic/_functoolsmodule.c.h @@ -57,7 +57,7 @@ _functools_cmp_to_key(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *mycmp; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } mycmp = args[0]; @@ -114,4 +114,4 @@ _functools__lru_cache_wrapper_cache_clear(PyObject *self, PyObject *Py_UNUSED(ig return return_value; } -/*[clinic end generated code: output=14e1fd25309674b8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=913ff19f52a6c0c6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 2e37a741d44ada..af24c6d3e5929a 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -119,7 +119,7 @@ EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } { @@ -189,7 +189,7 @@ EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } { @@ -266,14 +266,14 @@ EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } name_obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { data_obj = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -342,13 +342,13 @@ _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -417,13 +417,13 @@ _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -492,13 +492,13 @@ _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -567,13 +567,13 @@ _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -642,13 +642,13 @@ _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -717,13 +717,13 @@ _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t narg int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -794,13 +794,13 @@ _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -873,13 +873,13 @@ _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -952,13 +952,13 @@ _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1031,13 +1031,13 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1110,13 +1110,13 @@ _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t n int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1189,13 +1189,13 @@ _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t n int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { data_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1271,7 +1271,7 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *dklen_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1374,7 +1374,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj long dklen = 64; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &password, PyBUF_SIMPLE) != 0) { @@ -1383,7 +1383,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { if (PyObject_GetBuffer(args[1], &salt, PyBUF_SIMPLE) != 0) { goto exit; } @@ -1391,7 +1391,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { if (!PyLong_Check(args[2])) { _PyArg_BadArgument("scrypt", "argument 'n'", "int", args[2]); goto exit; @@ -1401,7 +1401,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!PyLong_Check(args[3])) { _PyArg_BadArgument("scrypt", "argument 'r'", "int", args[3]); goto exit; @@ -1411,7 +1411,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[4] != NULL) { + if (args[4]) { if (!PyLong_Check(args[4])) { _PyArg_BadArgument("scrypt", "argument 'p'", "int", args[4]); goto exit; @@ -1421,7 +1421,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[5] != NULL) { + if (args[5]) { maxmem = PyLong_AsLong(args[5]); if (maxmem == -1 && PyErr_Occurred()) { goto exit; @@ -1500,7 +1500,7 @@ _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *digest; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &key, PyBUF_SIMPLE) != 0) { @@ -1574,7 +1574,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *digestmod = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &key, PyBUF_SIMPLE) != 0) { @@ -1583,7 +1583,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { msg_obj = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1665,7 +1665,7 @@ _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *msg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } msg = args[0]; @@ -1824,4 +1824,4 @@ _hashlib_compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t narg #ifndef _HASHLIB_SCRYPT_METHODDEF #define _HASHLIB_SCRYPT_METHODDEF #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */ -/*[clinic end generated code: output=ed3fe902bc0114c5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3fd09a3a1c01d6b3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 09deb6d1e25143..deb6d61cecabd3 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -129,7 +129,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -227,13 +227,13 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *filters = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { format = PyLong_AsInt(fastargs[0]); if (format == -1 && PyErr_Occurred()) { goto exit; @@ -242,7 +242,7 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { memlimit = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; @@ -327,4 +327,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=14a064d5e4cdbb2f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c46aa2a65004e866 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index ae8edbeeeb628f..9e1b6ed75fb1de 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -58,7 +58,7 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -132,7 +132,7 @@ _opcode_is_valid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -195,7 +195,7 @@ _opcode_has_arg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -258,7 +258,7 @@ _opcode_has_const(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -321,7 +321,7 @@ _opcode_has_name(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -384,7 +384,7 @@ _opcode_has_jump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -452,7 +452,7 @@ _opcode_has_free(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -515,7 +515,7 @@ _opcode_has_local(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -578,7 +578,7 @@ _opcode_has_exc(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -733,7 +733,7 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int offset; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } code = args[0]; @@ -746,4 +746,4 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=49d2e529e8bbdc90 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f71f2499af48a0ec input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 65c480c89c3de7..164a0ba1ca2616 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -65,7 +65,7 @@ _pickle_Pickler_dump(PicklerObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; @@ -182,20 +182,20 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *buffer_callback = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } file = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { protocol = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { fix_imports = PyObject_IsTrue(fastargs[2]); if (fix_imports < 0) { goto exit; @@ -299,7 +299,7 @@ _pickle_Unpickler_persistent_load(UnpicklerObject *self, PyTypeObject *cls, PyOb PyObject *pid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } pid = args[0]; @@ -378,7 +378,7 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyTypeObject *cls, PyObject PyObject *global_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } module_name = args[0]; @@ -488,14 +488,14 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *buffers = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } file = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { fix_imports = PyObject_IsTrue(fastargs[1]); if (fix_imports < 0) { goto exit; @@ -504,7 +504,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { if (!PyUnicode_Check(fastargs[2])) { _PyArg_BadArgument("Unpickler", "argument 'encoding'", "str", fastargs[2]); goto exit; @@ -522,7 +522,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { if (!PyUnicode_Check(fastargs[3])) { _PyArg_BadArgument("Unpickler", "argument 'errors'", "str", fastargs[3]); goto exit; @@ -680,7 +680,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *buffer_callback = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; @@ -688,7 +688,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { protocol = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -698,7 +698,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { fix_imports = PyObject_IsTrue(args[3]); if (fix_imports < 0) { goto exit; @@ -783,14 +783,14 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *buffer_callback = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { protocol = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -800,7 +800,7 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { fix_imports = PyObject_IsTrue(args[2]); if (fix_imports < 0) { goto exit; @@ -892,14 +892,14 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *buffers = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } file = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { fix_imports = PyObject_IsTrue(args[1]); if (fix_imports < 0) { goto exit; @@ -908,7 +908,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("load", "argument 'encoding'", "str", args[2]); goto exit; @@ -926,7 +926,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("load", "argument 'errors'", "str", args[3]); goto exit; @@ -1018,14 +1018,14 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *buffers = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } data = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { fix_imports = PyObject_IsTrue(args[1]); if (fix_imports < 0) { goto exit; @@ -1034,7 +1034,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("loads", "argument 'encoding'", "str", args[2]); goto exit; @@ -1052,7 +1052,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!PyUnicode_Check(args[3])) { _PyArg_BadArgument("loads", "argument 'errors'", "str", args[3]); goto exit; @@ -1077,4 +1077,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=dffe1870ee080695 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8a506d99b5471c17 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index 7dd6258999b747..bcdcbbce906fdf 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -90,14 +90,14 @@ _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_ PyObject *timeout = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } item = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { block = PyObject_IsTrue(args[1]); if (block < 0) { goto exit; @@ -164,7 +164,7 @@ _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py PyObject *item; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } item = args[0]; @@ -232,13 +232,13 @@ _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *con PyObject *timeout_obj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { block = PyObject_IsTrue(args[0]); if (block < 0) { goto exit; @@ -349,4 +349,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=3bfac8c1394e6b5f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b5a7e8b51839eda4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 6d4c0b8c1bbcb7..bf2e1d9806a704 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -380,7 +380,7 @@ _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py const char *cb_type = "tls-unique"; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -584,14 +584,14 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s PyObject *password = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } certfile = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { keyfile = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -655,19 +655,19 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args PyObject *cadata = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { cafile = args[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { capath = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -741,7 +741,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz PyObject *session = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->Sock_Type)) { @@ -756,7 +756,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { hostname_obj = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -766,7 +766,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { owner = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -834,7 +834,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t PyObject *session = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->PySSLMemoryBIO_Type)) { @@ -854,7 +854,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_pos; } - if (args[3] != NULL) { + if (args[3]) { hostname_obj = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -864,7 +864,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[4] != NULL) { + if (args[4]) { owner = args[4]; if (!--noptargs) { goto skip_optional_kwonly; @@ -996,7 +996,7 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssiz int binary_form = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1058,7 +1058,7 @@ _ssl__SSLContext_set_psk_client_callback(PySSLContext *self, PyObject *const *ar PyObject *callback; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } callback = args[0]; @@ -1116,7 +1116,7 @@ _ssl__SSLContext_set_psk_server_callback(PySSLContext *self, PyObject *const *ar const char *identity_hint = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } callback = args[0]; @@ -1445,7 +1445,7 @@ _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int name = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1556,7 +1556,7 @@ _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs const char *store_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1632,7 +1632,7 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *store_name; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1663,4 +1663,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=673f847e520d1592 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b5411cac645a849f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index a2ff8a87c5955a..85659a39a48e3f 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -58,7 +58,7 @@ Struct___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *format; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } format = fastargs[0]; @@ -160,7 +160,7 @@ Struct_unpack_from(PyStructObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &buffer, PyBUF_SIMPLE) != 0) { @@ -358,7 +358,7 @@ unpack_from(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t offset = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!cache_struct_converter(module, args[0], &s_object)) { @@ -436,4 +436,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=0fea346bc04d8e76 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5c11cb40bebddc0a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index 69ce36efe60eca..ea080ea7980c58 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -1480,7 +1480,7 @@ keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1536,7 +1536,7 @@ keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1594,14 +1594,14 @@ keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1664,14 +1664,14 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1681,7 +1681,7 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1743,14 +1743,14 @@ keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1809,7 +1809,7 @@ posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1865,7 +1865,7 @@ posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1923,7 +1923,7 @@ posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1984,7 +1984,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1992,7 +1992,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2055,7 +2055,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2068,7 +2068,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2131,7 +2131,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2139,7 +2139,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2202,7 +2202,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2215,7 +2215,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2279,7 +2279,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2288,7 +2288,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2354,7 +2354,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz PyObject *e = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2362,7 +2362,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2372,7 +2372,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { d = args[3]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2437,7 +2437,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ PyObject *d = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2450,7 +2450,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { c = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -2512,7 +2512,7 @@ keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *a; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -2660,7 +2660,7 @@ posonly_poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -2726,7 +2726,7 @@ poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -2794,7 +2794,7 @@ poskw_varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg int b = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -2871,14 +2871,14 @@ poskw_varpos_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -2948,7 +2948,7 @@ varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *b = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -3019,14 +3019,14 @@ varpos_kwonly_req_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *c = Py_False; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { b = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3099,7 +3099,7 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *kw2 = Py_None; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } pos1 = fastargs[0]; @@ -3107,7 +3107,7 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[2] != NULL) { + if (fastargs[2]) { kw1 = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3180,7 +3180,7 @@ gh_32092_kw_pass(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *kw = Py_None; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } pos = fastargs[0]; @@ -3297,7 +3297,7 @@ null_or_tuple_for_varargs(PyObject *module, PyObject *const *args, Py_ssize_t na int covariant = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } name = fastargs[0]; @@ -3368,7 +3368,7 @@ clone_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw const char *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3434,7 +3434,7 @@ clone_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw const char *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3503,7 +3503,7 @@ clone_with_conv_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py }; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -3566,7 +3566,7 @@ clone_with_conv_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py }; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -3650,7 +3650,7 @@ _testclinic_TestClass_get_defining_class_arg(PyObject *self, PyTypeObject *cls, PyObject *arg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } arg = args[0]; @@ -3694,7 +3694,7 @@ _testclinic_TestClass_defclass_varpos(PyObject *self, PyTypeObject *cls, PyObjec PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } __clinic_args = _PyTuple_FromArray(args, nargs); @@ -3748,7 +3748,7 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, PyObject *__clinic_args = NULL; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } a = fastargs[0]; @@ -3765,4 +3765,4 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=037c1e9f0b9c7750 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e4dbf2d15659b41a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index 738fd8f1ddb4af..f22bc2403dc79b 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -81,7 +81,7 @@ depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -164,7 +164,7 @@ depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyO } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -248,7 +248,7 @@ depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs) } } fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -331,7 +331,7 @@ depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -475,7 +475,7 @@ depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *a = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) { @@ -558,7 +558,7 @@ depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *a = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) { @@ -722,7 +722,7 @@ depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -801,7 +801,7 @@ depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -884,7 +884,7 @@ depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -967,7 +967,7 @@ depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1051,7 +1051,7 @@ depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1134,7 +1134,7 @@ depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1218,7 +1218,7 @@ depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1302,7 +1302,7 @@ depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1388,7 +1388,7 @@ depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1564,7 +1564,7 @@ depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = args[0]; @@ -1640,7 +1640,7 @@ depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 2) { @@ -1722,7 +1722,7 @@ depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 3) { @@ -1803,7 +1803,7 @@ depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && nargs < 2 && args[1]) { @@ -1890,7 +1890,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2 && args[1]) || (nargs < 3 && args[2]))) { @@ -1906,7 +1906,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -1983,7 +1983,7 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 1 && args[0]) || (nargs < 2 && args[1]) || (nargs < 3 && args[2]))) { @@ -1998,13 +1998,13 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { a = args[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { b = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -2081,7 +2081,7 @@ depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *c = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2) || (nargs < 3 && args[2]))) { @@ -2260,7 +2260,7 @@ depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *h; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 7) { @@ -2370,7 +2370,7 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * } } args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 3) { @@ -2394,4 +2394,4 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=574ca6fac5ef50be input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5007ff912ac9e436 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testinternalcapi.c.h b/Modules/clinic/_testinternalcapi.c.h index 8943cf481dcf9a..2622c8060ec8f9 100644 --- a/Modules/clinic/_testinternalcapi.c.h +++ b/Modules/clinic/_testinternalcapi.c.h @@ -53,7 +53,7 @@ _testinternalcapi_compiler_cleandoc(PyObject *module, PyObject *const *args, Py_ PyObject *doc; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -136,7 +136,7 @@ _testinternalcapi_compiler_codegen(PyObject *module, PyObject *const *args, Py_s int compile_mode = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } ast = args[0]; @@ -207,7 +207,7 @@ _testinternalcapi_optimize_cfg(PyObject *module, PyObject *const *args, Py_ssize int nlocals; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } instructions = args[0]; @@ -272,7 +272,7 @@ _testinternalcapi_assemble_code_object(PyObject *module, PyObject *const *args, PyObject *metadata; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } filename = args[0]; @@ -347,7 +347,7 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *spam = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -360,4 +360,4 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO exit: return return_value; } -/*[clinic end generated code: output=cca8ba865128f563 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f120642a05d04b48 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index d4a4013882d4b5..7f1f6fc405225e 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -110,13 +110,13 @@ _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *se int twice = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { n = PyLong_AsInt(args[0]); if (n == -1 && PyErr_Occurred()) { goto exit; @@ -162,4 +162,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=03a3ab2c6522f488 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2de726e06b68a08e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index 6ea931715c777b..d54264d75db1d2 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -794,7 +794,7 @@ _winapi_GetLongPathName(PyObject *module, PyObject *const *args, Py_ssize_t narg LPCWSTR path = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -898,7 +898,7 @@ _winapi_GetShortPathName(PyObject *module, PyObject *const *args, Py_ssize_t nar LPCWSTR path = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -2005,7 +2005,7 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args PyObject *on_type_read; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } on_type_read = args[0]; @@ -2124,4 +2124,4 @@ _winapi_CopyFile2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO return return_value; } -/*[clinic end generated code: output=571f9de179c27f62 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=99af750bb10b5e32 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_zoneinfo.c.h b/Modules/clinic/_zoneinfo.c.h index 6d1ef733a5ad27..f2961b12715c80 100644 --- a/Modules/clinic/_zoneinfo.c.h +++ b/Modules/clinic/_zoneinfo.c.h @@ -56,7 +56,7 @@ zoneinfo_ZoneInfo_from_file(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *key = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } file_obj = args[0]; @@ -117,7 +117,7 @@ zoneinfo_ZoneInfo_no_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *cons PyObject *key; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -174,7 +174,7 @@ zoneinfo_ZoneInfo_clear_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *c PyObject *only_keys = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -222,7 +222,7 @@ zoneinfo_ZoneInfo_utcoffset(PyObject *self, PyTypeObject *cls, PyObject *const * PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } dt = args[0]; @@ -265,7 +265,7 @@ zoneinfo_ZoneInfo_dst(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } dt = args[0]; @@ -309,7 +309,7 @@ zoneinfo_ZoneInfo_tzname(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *dt; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } dt = args[0]; @@ -354,7 +354,7 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con unsigned char from_cache; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -372,4 +372,4 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con exit: return return_value; } -/*[clinic end generated code: output=02f798101dc2dbe2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c92c60d6c3241d6f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index 6e198ca7be3b35..8e09bebdfae2dc 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -195,7 +195,7 @@ array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *bb; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } bb = args[0]; @@ -350,7 +350,7 @@ array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t n; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } f = args[0]; @@ -405,7 +405,7 @@ array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *f; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } f = args[0]; @@ -651,7 +651,7 @@ array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const PyObject *value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -691,4 +691,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=473caa53b7bb1a4f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bb7b89c568a8d9ea input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 9260d240068402..f77adebd6023d3 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -86,7 +86,7 @@ binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int backtick = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -162,7 +162,7 @@ binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int strict_mode = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!ascii_buffer_converter(args[0], &data)) { @@ -233,7 +233,7 @@ binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int newline = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -413,7 +413,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -422,7 +422,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { sep = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -502,7 +502,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -511,7 +511,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { sep = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -647,7 +647,7 @@ binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int header = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!ascii_buffer_converter(args[0], &data)) { @@ -725,7 +725,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int header = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -734,7 +734,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { quotetabs = PyObject_IsTrue(args[1]); if (quotetabs < 0) { goto exit; @@ -743,7 +743,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { istext = PyObject_IsTrue(args[2]); if (istext < 0) { goto exit; @@ -767,4 +767,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=8e2cbe255a3dc9c3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a8bc5138d77c4611 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index f6e34f813b5dc4..e3e05d4974bf6d 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -933,7 +933,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } a = PyComplex_AsCComplex(args[0]); @@ -947,7 +947,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (PyFloat_CheckExact(args[2])) { rel_tol = PyFloat_AS_DOUBLE(args[2]); } @@ -982,4 +982,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=56d038284cb333f7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6e8e7fe487b07692 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index 51c05a7b0f4cd1..8bba2cce667027 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -126,7 +126,7 @@ gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -372,7 +372,7 @@ gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t generation = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -533,4 +533,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=1172999379b5232e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=13d662cc458a71f4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index 2fed686b5cf4e0..d9b4c036880408 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -72,7 +72,7 @@ batched_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int strict = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; @@ -187,7 +187,7 @@ itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *keyfunc = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } it = fastargs[0]; @@ -532,7 +532,7 @@ itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t r; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; @@ -603,7 +603,7 @@ itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyOb Py_ssize_t r; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; @@ -674,7 +674,7 @@ itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *robj = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; @@ -737,14 +737,14 @@ itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *initial = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; if (!noptargs) { goto skip_optional_pos; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { binop = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; @@ -810,7 +810,7 @@ itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *seq2; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } seq1 = fastargs[0]; @@ -909,13 +909,13 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *long_step = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { long_cnt = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -928,4 +928,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=90f49b09d0fccf3e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ca02baa405489154 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 4abeca0a5a5ddb..1b827f4533be44 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -673,7 +673,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyFloat_CheckExact(args[0])) { @@ -699,7 +699,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (PyFloat_CheckExact(args[2])) { rel_tol = PyFloat_AS_DOUBLE(args[2]); } @@ -788,7 +788,7 @@ math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *start = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } iterable = args[0]; @@ -939,7 +939,7 @@ math_nextafter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *steps = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyFloat_CheckExact(args[0])) { @@ -1011,4 +1011,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=1ad13c0f0b3f0915 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=549053f6aaaf3d4a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index 2bdccc2ac70ee4..f5e369177cbfd9 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -122,13 +122,13 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -148,4 +148,4 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw exit: return return_value; } -/*[clinic end generated code: output=7708f14b44e990ed input=a9049054013a1b77]*/ +/*[clinic end generated code: output=930c187ecc3e68d2 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 84d365c50114c5..a02bc0f9175b3a 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -485,7 +485,7 @@ _overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) HANDLE event = INVALID_HANDLE_VALUE; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { @@ -1239,4 +1239,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=36289a87d2594634 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3f6cd189f280532c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 2df8b7ab2889fd..3c2385036414bd 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -77,7 +77,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -86,7 +86,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { if (!FSTATAT_DIR_FD_CONVERTER(args[1], &dir_fd)) { goto exit; } @@ -158,7 +158,7 @@ os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -258,7 +258,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -271,7 +271,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (!FACCESSAT_DIR_FD_CONVERTER(args[2], &dir_fd)) { goto exit; } @@ -279,7 +279,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { effective_ids = PyObject_IsTrue(args[3]); if (effective_ids < 0) { goto exit; @@ -412,7 +412,7 @@ os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("chdir", "path", 0, 0, 0, PATH_HAVE_FCHDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -477,7 +477,7 @@ os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -566,7 +566,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = CHMOD_DEFAULT_FOLLOW_SYMLINKS; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -579,7 +579,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (!FCHMODAT_DIR_FD_CONVERTER(args[2], &dir_fd)) { goto exit; } @@ -659,7 +659,7 @@ os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -729,7 +729,7 @@ os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -807,7 +807,7 @@ os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -888,7 +888,7 @@ os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject unsigned long flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -957,7 +957,7 @@ os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("chroot", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1021,7 +1021,7 @@ os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -1105,7 +1105,7 @@ os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -1197,7 +1197,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1212,7 +1212,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { if (!FCHOWNAT_DIR_FD_CONVERTER(args[3], &dir_fd)) { goto exit; } @@ -1287,7 +1287,7 @@ os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k gid_t gid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -1360,7 +1360,7 @@ os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k gid_t gid; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1483,7 +1483,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &src)) { @@ -1495,7 +1495,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -1503,7 +1503,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!dir_fd_converter(args[3], &dst_dir_fd)) { goto exit; } @@ -1586,7 +1586,7 @@ os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("listdir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1702,7 +1702,7 @@ os_listmounts(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec path_t volume = PATH_T_INITIALIZE_P("listmounts", "volume", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &volume)) { @@ -1766,7 +1766,7 @@ os__path_isdevdrive(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P path_t path = PATH_T_INITIALIZE_P("_path_isdevdrive", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1931,7 +1931,7 @@ os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE_P("_getvolumepathname", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -1995,7 +1995,7 @@ os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py path_t path = PATH_T_INITIALIZE_P("_path_splitroot", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2138,7 +2138,7 @@ os__path_isdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2207,7 +2207,7 @@ os__path_isfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2276,7 +2276,7 @@ os__path_islink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2345,7 +2345,7 @@ os__path_isjunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2413,7 +2413,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE("_path_splitroot_ex", "path", 0, 1, 1, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2473,7 +2473,7 @@ os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO path_t path = PATH_T_INITIALIZE("_path_normpath", "path", 0, 1, 1, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2544,7 +2544,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -2553,7 +2553,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -2659,7 +2659,7 @@ os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int who; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } which = PyLong_AsInt(args[0]); @@ -2727,7 +2727,7 @@ os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int priority; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } which = PyLong_AsInt(args[0]); @@ -2806,7 +2806,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dst_dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &src)) { @@ -2818,7 +2818,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -2897,7 +2897,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int dst_dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &src)) { @@ -2909,7 +2909,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { if (!dir_fd_converter(args[2], &src_dir_fd)) { goto exit; } @@ -2984,7 +2984,7 @@ os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3054,7 +3054,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -3128,7 +3128,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_FSConverter(args[0], &command)) { @@ -3233,7 +3233,7 @@ os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3307,7 +3307,7 @@ os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3428,7 +3428,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3437,7 +3437,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { times = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -3447,13 +3447,13 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_kwonly; } - if (args[2] != NULL) { + if (args[2]) { ns = args[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { if (!FUTIMENSAT_DIR_FD_CONVERTER(args[3], &dir_fd)) { goto exit; } @@ -3520,7 +3520,7 @@ os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int status; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -3633,7 +3633,7 @@ os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *env; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3736,7 +3736,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *scheduler = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3747,19 +3747,19 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { file_actions = args[3]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[4] != NULL) { + if (args[4]) { setpgroup = args[4]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[5] != NULL) { + if (args[5]) { resetids = PyObject_IsTrue(args[5]); if (resetids < 0) { goto exit; @@ -3768,7 +3768,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[6] != NULL) { + if (args[6]) { setsid = PyObject_IsTrue(args[6]); if (setsid < 0) { goto exit; @@ -3777,13 +3777,13 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[7] != NULL) { + if (args[7]) { setsigmask = args[7]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[8] != NULL) { + if (args[8]) { setsigdef = args[8]; if (!--noptargs) { goto skip_optional_kwonly; @@ -3886,7 +3886,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *scheduler = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -3897,19 +3897,19 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_kwonly; } - if (args[3] != NULL) { + if (args[3]) { file_actions = args[3]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[4] != NULL) { + if (args[4]) { setpgroup = args[4]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[5] != NULL) { + if (args[5]) { resetids = PyObject_IsTrue(args[5]); if (resetids < 0) { goto exit; @@ -3918,7 +3918,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[6] != NULL) { + if (args[6]) { setsid = PyObject_IsTrue(args[6]); if (setsid < 0) { goto exit; @@ -3927,13 +3927,13 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_kwonly; } } - if (args[7] != NULL) { + if (args[7]) { setsigmask = args[7]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[8] != NULL) { + if (args[8]) { setsigdef = args[8]; if (!--noptargs) { goto skip_optional_kwonly; @@ -4122,19 +4122,19 @@ os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *after_in_parent = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0] != NULL) { + if (args[0]) { before = args[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (args[1] != NULL) { + if (args[1]) { after_in_child = args[1]; if (!--noptargs) { goto skip_optional_kwonly; @@ -4245,7 +4245,7 @@ os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t na int policy; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } policy = PyLong_AsInt(args[0]); @@ -4307,7 +4307,7 @@ os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t na int policy; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } policy = PyLong_AsInt(args[0]); @@ -4404,7 +4404,7 @@ os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *sched_priority; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } sched_priority = fastargs[0]; @@ -5732,7 +5732,7 @@ os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int options; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } options = PyLong_AsInt(args[0]); @@ -6069,7 +6069,7 @@ os_setns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int nstype = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6142,7 +6142,7 @@ os_unshare(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } flags = PyLong_AsInt(args[0]); @@ -6212,7 +6212,7 @@ os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -6298,7 +6298,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &src)) { @@ -6310,7 +6310,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { target_is_directory = PyObject_IsTrue(args[2]); if (target_is_directory < 0) { goto exit; @@ -6427,7 +6427,7 @@ os_timerfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } clockid = PyLong_AsInt(args[0]); @@ -6511,7 +6511,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py double interval_double = 0.0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6521,7 +6521,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -6530,7 +6530,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { if (PyFloat_CheckExact(args[2])) { initial_double = PyFloat_AS_DOUBLE(args[2]); } @@ -6625,7 +6625,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, long long interval = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -6635,7 +6635,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, if (!noptargs) { goto skip_optional_kwonly; } - if (args[1] != NULL) { + if (args[1]) { flags = PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -6644,7 +6644,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { initial = PyLong_AsLongLong(args[2]); if (initial == -1 && PyErr_Occurred()) { goto exit; @@ -6942,7 +6942,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -6955,7 +6955,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { mode = PyLong_AsInt(args[2]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -7030,7 +7030,7 @@ os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -7163,7 +7163,7 @@ os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -7623,7 +7623,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7643,13 +7643,13 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[4] != NULL) { + if (args[4]) { headers = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { trailers = args[5]; if (!--noptargs) { goto skip_optional_pos; @@ -7725,7 +7725,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7754,13 +7754,13 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[4] != NULL) { + if (args[4]) { headers = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { trailers = args[5]; if (!--noptargs) { goto skip_optional_pos; @@ -7830,7 +7830,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t count; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } out_fd = PyLong_AsInt(args[0]); @@ -7955,7 +7955,7 @@ os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -8308,7 +8308,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *offset_dst = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } src = PyLong_AsInt(args[0]); @@ -8334,7 +8334,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[3] != NULL) { + if (args[3]) { offset_src = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -8423,7 +8423,7 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k unsigned int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } src = PyLong_AsInt(args[0]); @@ -8449,13 +8449,13 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_pos; } - if (args[3] != NULL) { + if (args[3]) { offset_src = args[3]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { offset_dst = args[4]; if (!--noptargs) { goto skip_optional_pos; @@ -8528,7 +8528,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -8537,7 +8537,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -8629,7 +8629,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -8638,7 +8638,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { mode = PyLong_AsInt(args[1]); if (mode == -1 && PyErr_Occurred()) { goto exit; @@ -8647,7 +8647,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { if (!_Py_Dev_Converter(args[2], &device)) { goto exit; } @@ -8869,7 +8869,7 @@ os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_off_t length; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9261,7 +9261,7 @@ os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9328,7 +9328,7 @@ os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9395,7 +9395,7 @@ os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9462,7 +9462,7 @@ os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9529,7 +9529,7 @@ os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9596,7 +9596,7 @@ os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9663,7 +9663,7 @@ os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status = PyLong_AsInt(args[0]); @@ -9767,7 +9767,7 @@ os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("statvfs", "path", 0, 0, 0, PATH_HAVE_FSTATVFS); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9831,7 +9831,7 @@ os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb path_t path = PATH_T_INITIALIZE_P("_getdiskusage", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -9947,7 +9947,7 @@ os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject long _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10139,7 +10139,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int show_cmd = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &filepath)) { @@ -10148,7 +10148,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("startfile", "argument 'operation'", "str", args[1]); goto exit; @@ -10161,7 +10161,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { if (!PyUnicode_Check(args[2])) { _PyArg_BadArgument("startfile", "argument 'arguments'", "str", args[2]); goto exit; @@ -10174,7 +10174,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { if (!path_converter(args[3], &cwd)) { goto exit; } @@ -10278,7 +10278,7 @@ os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyLong_AsInt(args[0]); @@ -10475,7 +10475,7 @@ os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10564,7 +10564,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10579,7 +10579,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject if (!noptargs) { goto skip_optional_pos; } - if (args[3] != NULL) { + if (args[3]) { flags = PyLong_AsInt(args[3]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -10670,7 +10670,7 @@ os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -10755,13 +10755,13 @@ os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (!path_converter(args[0], &path)) { goto exit; } @@ -10873,7 +10873,7 @@ os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj unsigned int flags = MFD_CLOEXEC; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_FSConverter(args[0], &name)) { @@ -10947,7 +10947,7 @@ os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int flags = EFD_CLOEXEC; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!_PyLong_UnsignedInt_Converter(args[0], &initval)) { @@ -11016,7 +11016,7 @@ os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -11079,7 +11079,7 @@ os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb unsigned long long value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -11488,7 +11488,7 @@ os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const * int follow_symlinks = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -11553,7 +11553,7 @@ os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -11622,7 +11622,7 @@ os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *cons int _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -11731,7 +11731,7 @@ os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * path_t path = PATH_T_INITIALIZE_P("scandir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -11799,7 +11799,7 @@ os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *path; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } path = args[0]; @@ -11858,7 +11858,7 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } { @@ -11943,7 +11943,7 @@ os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, path_t path = PATH_T_INITIALIZE_P("_add_dll_directory", "path", 0, 0, 0, 0); args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!path_converter(args[0], &path)) { @@ -12011,7 +12011,7 @@ os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *cookie; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } cookie = args[0]; @@ -12082,7 +12082,7 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *status_obj; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } status_obj = args[0]; @@ -12837,4 +12837,4 @@ os__create_environ(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ -/*[clinic end generated code: output=742670acc69a2252 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8dd4d597e70e7108 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 28b0f16c962a65..0c18b870cbb39c 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -92,7 +92,7 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const int isfinal = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } data = args[0]; @@ -144,7 +144,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *c PyObject *file; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } file = args[0]; @@ -268,7 +268,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject const char *encoding = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (args[0] == Py_None) { @@ -385,7 +385,7 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObjec int flag = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -454,13 +454,13 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *intern = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (args[0] == Py_None) { encoding = NULL; } @@ -483,7 +483,7 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { if (args[1] == Py_None) { namespace_separator = NULL; } @@ -545,4 +545,4 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg) #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */ -/*[clinic end generated code: output=69039db78d04a9d8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f5960f0528d2af18 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index c5e3f425f2f609..04a987cdd4bac4 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -597,13 +597,13 @@ select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) int flags = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { sizehint = PyLong_AsInt(fastargs[0]); if (sizehint == -1 && PyErr_Occurred()) { goto exit; @@ -767,7 +767,7 @@ select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na unsigned int eventmask = EPOLLIN | EPOLLPRI | EPOLLOUT; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -844,7 +844,7 @@ select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t narg unsigned int eventmask; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -913,7 +913,7 @@ select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t int fd; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fd = PyObject_AsFileDescriptor(args[0]); @@ -987,13 +987,13 @@ select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, int maxevents = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { timeout_obj = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1360,4 +1360,4 @@ select_kqueue_control(kqueue_queue_Object *self, PyObject *const *args, Py_ssize #ifndef SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ -/*[clinic end generated code: output=368d1ac25db4f26d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=edfdade5afb19de4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index e626106099ce84..110df15ad448f9 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -122,13 +122,13 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -148,4 +148,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=b17bdf9cabf627f6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9a5a3473dc1e813e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h index 5fd8ca4ed1f806..ec7ded20067096 100644 --- a/Modules/clinic/sha2module.c.h +++ b/Modules/clinic/sha2module.c.h @@ -189,13 +189,13 @@ _sha2_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -263,13 +263,13 @@ _sha2_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -337,13 +337,13 @@ _sha2_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -411,13 +411,13 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int usedforsecurity = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { string = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -437,4 +437,4 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=3f16b46fce693d25 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7f1a0432c4f191d1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha3module.c.h b/Modules/clinic/sha3module.c.h index f27851563df71f..d85ab06ab448b6 100644 --- a/Modules/clinic/sha3module.c.h +++ b/Modules/clinic/sha3module.c.h @@ -55,7 +55,7 @@ py_sha3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int usedforsecurity = 1; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (nargs < 1) { @@ -194,4 +194,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=9924224afa3fe5e7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=01eca8c0fc4ef1b5 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index af740de7b0edcd..2969df1dea5245 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -333,7 +333,7 @@ signal_set_wakeup_fd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, int warn_on_full_buffer = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } fdobj = args[0]; @@ -776,4 +776,4 @@ signal_pidfd_send_signal(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */ -/*[clinic end generated code: output=b445527154417f04 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=46084b29ab9c637c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 8c8a34954ff874..b1d2b6d337727a 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -78,13 +78,13 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *fdobj = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { family = PyLong_AsInt(fastargs[0]); if (family == -1 && PyErr_Occurred()) { goto exit; @@ -93,7 +93,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { type = PyLong_AsInt(fastargs[1]); if (type == -1 && PyErr_Occurred()) { goto exit; @@ -102,7 +102,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { proto = PyLong_AsInt(fastargs[2]); if (proto == -1 && PyErr_Occurred()) { goto exit; @@ -286,4 +286,4 @@ _socket_socket_if_nametoindex(PySocketSockObject *self, PyObject *arg) #ifndef _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #define _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #endif /* !defined(_SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF) */ -/*[clinic end generated code: output=c52d79afe7e3a794 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a888057b404f8d2d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index d261fec6887783..63f4d49cee0b31 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -59,13 +59,13 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje long facility = LOG_USER; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("openlog", "argument 'ident'", "str", args[0]); goto exit; @@ -75,7 +75,7 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { logopt = PyLong_AsLong(args[1]); if (logopt == -1 && PyErr_Occurred()) { goto exit; @@ -262,4 +262,4 @@ syslog_LOG_UPTO(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=2f59bf4a05a76261 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e26dcd1fe726a2f6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 34c719fe295730..e40936783d6d46 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -64,7 +64,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int wbits = MAX_WBITS; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -73,7 +73,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { level = PyLong_AsInt(args[1]); if (level == -1 && PyErr_Occurred()) { goto exit; @@ -154,7 +154,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t bufsize = DEF_BUF_SIZE; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -163,7 +163,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { wbits = PyLong_AsInt(args[1]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -272,13 +272,13 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb Py_buffer zdict = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { level = PyLong_AsInt(args[0]); if (level == -1 && PyErr_Occurred()) { goto exit; @@ -287,7 +287,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { method = PyLong_AsInt(args[1]); if (method == -1 && PyErr_Occurred()) { goto exit; @@ -296,7 +296,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { wbits = PyLong_AsInt(args[2]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -305,7 +305,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { memLevel = PyLong_AsInt(args[3]); if (memLevel == -1 && PyErr_Occurred()) { goto exit; @@ -314,7 +314,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { strategy = PyLong_AsInt(args[4]); if (strategy == -1 && PyErr_Occurred()) { goto exit; @@ -391,13 +391,13 @@ zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *zdict = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { wbits = PyLong_AsInt(args[0]); if (wbits == -1 && PyErr_Occurred()) { goto exit; @@ -455,7 +455,7 @@ zlib_Compress_compress(compobject *self, PyTypeObject *cls, PyObject *const *arg Py_buffer data = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -531,7 +531,7 @@ zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const Py_ssize_t max_length = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -603,7 +603,7 @@ zlib_Compress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, int mode = Z_FINISH; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -706,7 +706,7 @@ zlib_Compress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const PyObject *memo; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } memo = args[0]; @@ -804,7 +804,7 @@ zlib_Decompress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *cons PyObject *memo; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } memo = args[0]; @@ -853,7 +853,7 @@ zlib_Decompress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t length = DEF_BUF_SIZE; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (nargs < 1) { @@ -939,7 +939,7 @@ zlib_ZlibDecompressor_decompress(ZlibDecompressor *self, PyObject *const *args, Py_ssize_t max_length = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &data, PyBUF_SIMPLE) != 0) { @@ -1098,4 +1098,4 @@ zlib_crc32(PyObject *module, PyObject *const *args, Py_ssize_t nargs) #ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */ -/*[clinic end generated code: output=33dca082eca14248 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7a532d89f6515797 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index bb78f9653e27f6..58c68ab8c0e7fe 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -51,19 +51,19 @@ bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { arg = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("bytearray", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -618,7 +618,7 @@ bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t n PyObject *deletechars = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } table = args[0]; @@ -805,13 +805,13 @@ bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -927,13 +927,13 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1304,13 +1304,13 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; @@ -1410,7 +1410,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1523,13 +1523,13 @@ bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1616,4 +1616,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=22da0ddac4fa3167 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d6770a8f30d5045f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 34696997b24d8f..493b7e92213be4 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -82,13 +82,13 @@ bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -248,13 +248,13 @@ bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -703,7 +703,7 @@ bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *deletechars = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } table = args[0]; @@ -1064,13 +1064,13 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("decode", "argument 'encoding'", "str", args[0]); goto exit; @@ -1157,7 +1157,7 @@ bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, P int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1270,13 +1270,13 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1335,19 +1335,19 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { x = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("bytes", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -1384,4 +1384,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=631946bafd7564b2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2262747a40245e76 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index d3f5eb83ea1dc1..eb1cef211a8d47 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -224,13 +224,13 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *co_exceptiontable = self->co_exceptiontable; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0] != NULL) { + if (args[0]) { co_argcount = PyLong_AsInt(args[0]); if (co_argcount == -1 && PyErr_Occurred()) { goto exit; @@ -239,7 +239,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[1] != NULL) { + if (args[1]) { co_posonlyargcount = PyLong_AsInt(args[1]); if (co_posonlyargcount == -1 && PyErr_Occurred()) { goto exit; @@ -248,7 +248,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[2] != NULL) { + if (args[2]) { co_kwonlyargcount = PyLong_AsInt(args[2]); if (co_kwonlyargcount == -1 && PyErr_Occurred()) { goto exit; @@ -257,7 +257,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[3] != NULL) { + if (args[3]) { co_nlocals = PyLong_AsInt(args[3]); if (co_nlocals == -1 && PyErr_Occurred()) { goto exit; @@ -266,7 +266,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[4] != NULL) { + if (args[4]) { co_stacksize = PyLong_AsInt(args[4]); if (co_stacksize == -1 && PyErr_Occurred()) { goto exit; @@ -275,7 +275,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[5] != NULL) { + if (args[5]) { co_flags = PyLong_AsInt(args[5]); if (co_flags == -1 && PyErr_Occurred()) { goto exit; @@ -284,7 +284,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[6] != NULL) { + if (args[6]) { co_firstlineno = PyLong_AsInt(args[6]); if (co_firstlineno == -1 && PyErr_Occurred()) { goto exit; @@ -293,7 +293,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[7] != NULL) { + if (args[7]) { if (!PyBytes_Check(args[7])) { _PyArg_BadArgument("replace", "argument 'co_code'", "bytes", args[7]); goto exit; @@ -303,7 +303,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[8] != NULL) { + if (args[8]) { if (!PyTuple_Check(args[8])) { _PyArg_BadArgument("replace", "argument 'co_consts'", "tuple", args[8]); goto exit; @@ -313,7 +313,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[9] != NULL) { + if (args[9]) { if (!PyTuple_Check(args[9])) { _PyArg_BadArgument("replace", "argument 'co_names'", "tuple", args[9]); goto exit; @@ -323,7 +323,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[10] != NULL) { + if (args[10]) { if (!PyTuple_Check(args[10])) { _PyArg_BadArgument("replace", "argument 'co_varnames'", "tuple", args[10]); goto exit; @@ -333,7 +333,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[11] != NULL) { + if (args[11]) { if (!PyTuple_Check(args[11])) { _PyArg_BadArgument("replace", "argument 'co_freevars'", "tuple", args[11]); goto exit; @@ -343,7 +343,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[12] != NULL) { + if (args[12]) { if (!PyTuple_Check(args[12])) { _PyArg_BadArgument("replace", "argument 'co_cellvars'", "tuple", args[12]); goto exit; @@ -353,7 +353,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[13] != NULL) { + if (args[13]) { if (!PyUnicode_Check(args[13])) { _PyArg_BadArgument("replace", "argument 'co_filename'", "str", args[13]); goto exit; @@ -363,7 +363,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[14] != NULL) { + if (args[14]) { if (!PyUnicode_Check(args[14])) { _PyArg_BadArgument("replace", "argument 'co_name'", "str", args[14]); goto exit; @@ -373,7 +373,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[15] != NULL) { + if (args[15]) { if (!PyUnicode_Check(args[15])) { _PyArg_BadArgument("replace", "argument 'co_qualname'", "str", args[15]); goto exit; @@ -383,7 +383,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje goto skip_optional_kwonly; } } - if (args[16] != NULL) { + if (args[16]) { if (!PyBytes_Check(args[16])) { _PyArg_BadArgument("replace", "argument 'co_linetable'", "bytes", args[16]); goto exit; @@ -452,7 +452,7 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n int oparg; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } oparg = PyLong_AsInt(args[0]); @@ -464,4 +464,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=3a9660315288fab3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1890970a003cbd1b input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 1d57bd901fb480..5f004360988665 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -141,13 +141,13 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *i = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { r = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; @@ -169,4 +169,4 @@ PyDoc_STRVAR(complex_from_number__doc__, #define COMPLEX_FROM_NUMBER_METHODDEF \ {"from_number", (PyCFunction)complex_from_number, METH_O|METH_CLASS, complex_from_number__doc__}, -/*[clinic end generated code: output=bd0ab47ef26b6b2c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=963680825c224a12 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 694c2da04734fe..3a06427ab3c776 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -52,7 +52,7 @@ mappingproxy_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *mapping; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } mapping = fastargs[0]; @@ -142,25 +142,25 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *doc = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { fget = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { fset = fastargs[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { fdel = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; @@ -173,4 +173,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=c4a777c31a75e4ae input=a9049054013a1b77]*/ +/*[clinic end generated code: output=74a4ad2f7bef2b0c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 9bb5c9b0eff0f2..55075f5104508c 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -63,7 +63,7 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *start = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } iterable = fastargs[0]; @@ -107,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=b8b0f0f98511df6b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c8c45aca15d6d540 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 3c6e977419e97f..593f4b1db6bbac 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -74,7 +74,7 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *kwdefaults = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyObject_TypeCheck(fastargs[0], &PyCode_Type)) { @@ -90,19 +90,19 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_pos; } - if (fastargs[2] != NULL) { + if (fastargs[2]) { name = fastargs[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { defaults = fastargs[3]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { closure = fastargs[4]; if (!--noptargs) { goto skip_optional_pos; @@ -115,4 +115,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=f2e2db50dc8465ed input=a9049054013a1b77]*/ +/*[clinic end generated code: output=90bf8ef1757569ca input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 1c94391eb79ea5..c438feab433e9d 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -236,13 +236,13 @@ list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject int reverse = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (args[0] != NULL) { + if (args[0]) { keyfunc = args[0]; if (!--noptargs) { goto skip_optional_kwonly; @@ -439,4 +439,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=5a5033fd463948ca input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1a94d259d06b8847 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 33af83d45b2183..1ce256a0860aa6 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -49,7 +49,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *obase = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (nargs < 1) { @@ -316,13 +316,13 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * int is_signed = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[0]); @@ -339,7 +339,7 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * goto skip_optional_pos; } } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("to_bytes", "argument 'byteorder'", "str", args[1]); goto exit; @@ -427,14 +427,14 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb int is_signed = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } bytes_obj = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("from_bytes", "argument 'byteorder'", "str", args[1]); goto exit; @@ -476,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored)) { return int_is_integer_impl(self); } -/*[clinic end generated code: output=98e0bc2621f61521 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7c25ba2c37f5ae49 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index 4bd692bcad3760..26dc82ce17da37 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -52,7 +52,7 @@ memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *object; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } object = fastargs[0]; @@ -108,7 +108,7 @@ memoryview__from_flags(PyTypeObject *type, PyObject *const *args, Py_ssize_t nar int flags; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } object = args[0]; @@ -188,7 +188,7 @@ memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t narg PyObject *shape = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -295,7 +295,7 @@ memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t n const char *order = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -391,13 +391,13 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs int bytes_per_sep = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -413,4 +413,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=959c1e7fd39cc944 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e8841d6ba2137ad input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index 72703841cd1c23..baade99470e367 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -56,7 +56,7 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *doc = Py_None; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -74,4 +74,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6a3543c10db7de58 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b481af93ff176cb7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index 96c67c895976a3..f7592823951e87 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -55,7 +55,7 @@ OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs PyObject *value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } seq = args[0]; @@ -120,7 +120,7 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na PyObject *default_value = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -186,7 +186,7 @@ OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *default_value = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -249,7 +249,7 @@ OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs int last = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -315,7 +315,7 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n int last = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = args[0]; @@ -332,4 +332,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=e2befca6325e3a2f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8a132fa582835ff3 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index 03abf9e5dc6098..34fcbb04ff7c79 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -48,7 +48,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *dict = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } arg = fastargs[0]; @@ -62,4 +62,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=28d3a5df25c298e7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0a357a8f8a803dc6 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h index 0c7d49501e26b5..71dcf0eaa9ca05 100644 --- a/Objects/clinic/typevarobject.c.h +++ b/Objects/clinic/typevarobject.c.h @@ -62,7 +62,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int infer_variance = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -73,19 +73,19 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { bound = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { default_value = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { covariant = PyObject_IsTrue(fastargs[3]); if (covariant < 0) { goto exit; @@ -94,7 +94,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { contravariant = PyObject_IsTrue(fastargs[4]); if (contravariant < 0) { goto exit; @@ -109,7 +109,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) } skip_optional_kwonly: constraints = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX); - if (constraints == NULL) { + if (!constraints) { goto exit; } return_value = typevar_new_impl(type, name, constraints, bound, default_value, covariant, contravariant, infer_variance); @@ -237,7 +237,7 @@ paramspecargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *origin; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } origin = fastargs[0]; @@ -291,7 +291,7 @@ paramspeckwargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *origin; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } origin = fastargs[0]; @@ -354,7 +354,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int infer_variance = 0; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -365,19 +365,19 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[1] != NULL) { + if (fastargs[1]) { bound = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { default_value = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[3] != NULL) { + if (fastargs[3]) { covariant = PyObject_IsTrue(fastargs[3]); if (covariant < 0) { goto exit; @@ -386,7 +386,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto skip_optional_kwonly; } } - if (fastargs[4] != NULL) { + if (fastargs[4]) { contravariant = PyObject_IsTrue(fastargs[4]); if (contravariant < 0) { goto exit; @@ -525,7 +525,7 @@ typevartuple(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *default_value = &_Py_NoDefaultStruct; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -681,7 +681,7 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *type_params = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!PyUnicode_Check(fastargs[0])) { @@ -700,4 +700,4 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=2bdc60a143b19655 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=682ae821936a44c1 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index d31eaafac7aa7e..d5d955c97deaff 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -247,13 +247,13 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject const char *errors = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { if (!PyUnicode_Check(args[0])) { _PyArg_BadArgument("encode", "argument 'encoding'", "str", args[0]); goto exit; @@ -339,7 +339,7 @@ unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb int tabsize = 8; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -959,7 +959,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObjec Py_ssize_t count = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -1283,13 +1283,13 @@ unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1405,13 +1405,13 @@ unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t maxsplit = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (args[0] != NULL) { + if (args[0]) { sep = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -1485,7 +1485,7 @@ unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb int keepends = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1839,19 +1839,19 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *errors = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_pos; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { x = fastargs[0]; if (!--noptargs) { goto skip_optional_pos; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { if (!PyUnicode_Check(fastargs[1])) { _PyArg_BadArgument("str", "argument 'encoding'", "str", fastargs[1]); goto exit; @@ -1888,4 +1888,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=cd8361f9ab0b544f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8abe66fb123b96da input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 99e9dac5e1ca5a..223773fe1c32c5 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -57,7 +57,7 @@ stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py int tabsize = 8; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -321,4 +321,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=240c25da9d061513 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2f983f50ff6b1e99 input=a9049054013a1b77]*/ diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h index 0d45f059dafe01..1bb6726b396c44 100644 --- a/PC/clinic/_wmimodule.cpp.h +++ b/PC/clinic/_wmimodule.cpp.h @@ -56,7 +56,7 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *query; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -69,4 +69,4 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj exit: return return_value; } -/*[clinic end generated code: output=ee15d75d2d34a917 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=25bdc78997031840 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index e75210c8ede2c1..07aa60f9151199 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -352,7 +352,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -374,7 +374,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -535,7 +535,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int reserved = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -552,7 +552,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { access = PyLong_AsInt(args[2]); if (access == -1 && PyErr_Occurred()) { goto exit; @@ -967,7 +967,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -989,7 +989,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -1084,7 +1084,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb HKEY _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!clinic_HKEY_converter(_PyModule_GetState(module), args[0], &key)) { @@ -1106,7 +1106,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb if (!noptargs) { goto skip_optional_pos; } - if (args[2] != NULL) { + if (args[2]) { reserved = PyLong_AsInt(args[2]); if (reserved == -1 && PyErr_Occurred()) { goto exit; @@ -1762,4 +1762,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) #ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF #define WINREG_QUERYREFLECTIONKEY_METHODDEF #endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=715976b302c43444 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=896dbd1bccdedebb input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index 1d8843c9b2398c..aa6441c4592fdf 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -50,7 +50,7 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } readline = fastargs[0]; @@ -80,4 +80,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=11a98d3654fc33dc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6c4d4137d988ae0d input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index db58f189febe60..d67562fb421086 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -75,20 +75,20 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyTupleObject *skip_file_prefixes = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } message = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { category = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { { Py_ssize_t ival = -1; PyObject *iobj = _PyNumber_Index(args[2]); @@ -105,7 +105,7 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { source = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -185,7 +185,7 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *sourceobj = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } message = args[0]; @@ -202,19 +202,19 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs if (!noptargs) { goto skip_optional_pos; } - if (args[4] != NULL) { + if (args[4]) { mod = args[4]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { registry = args[5]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[6] != NULL) { + if (args[6]) { module_globals = args[6]; if (!--noptargs) { goto skip_optional_pos; @@ -244,4 +244,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored)) { return warnings_filters_mutated_impl(module); } -/*[clinic end generated code: output=a72e7f6b7a9c01f8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4f2020f0ede0871e input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index c265d6aceca682..6e3e05fa4c99be 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -75,26 +75,26 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int level = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } name = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { locals = args[2]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[3] != NULL) { + if (args[3]) { fromlist = args[3]; if (!--noptargs) { goto skip_optional_pos; @@ -300,7 +300,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int feature_version = -1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } source = args[0]; @@ -323,7 +323,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (!noptargs) { goto skip_optional_pos; } - if (args[3] != NULL) { + if (args[3]) { flags = PyLong_AsInt(args[3]); if (flags == -1 && PyErr_Occurred()) { goto exit; @@ -332,7 +332,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[4] != NULL) { + if (args[4]) { dont_inherit = PyObject_IsTrue(args[4]); if (dont_inherit < 0) { goto exit; @@ -341,7 +341,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto skip_optional_pos; } } - if (args[5] != NULL) { + if (args[5]) { optimize = PyLong_AsInt(args[5]); if (optimize == -1 && PyErr_Occurred()) { goto exit; @@ -450,14 +450,14 @@ builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *locals = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } source = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; @@ -529,20 +529,20 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *closure = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } source = args[0]; if (!noptargs) { goto skip_optional_pos; } - if (args[1] != NULL) { + if (args[1]) { globals = args[1]; if (!--noptargs) { goto skip_optional_pos; } } - if (args[2] != NULL) { + if (args[2]) { locals = args[2]; if (!--noptargs) { goto skip_optional_pos; @@ -867,7 +867,7 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *mod = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } base = args[0]; @@ -944,25 +944,25 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int flush = 0; fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } if (!noptargs) { goto skip_optional_kwonly; } - if (fastargs[0] != NULL) { + if (fastargs[0]) { sep = fastargs[0]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[1] != NULL) { + if (fastargs[1]) { end = fastargs[1]; if (!--noptargs) { goto skip_optional_kwonly; } } - if (fastargs[2] != NULL) { + if (fastargs[2]) { file = fastargs[2]; if (!--noptargs) { goto skip_optional_kwonly; @@ -1085,7 +1085,7 @@ builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *ndigits = Py_None; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } number = args[0]; @@ -1151,7 +1151,7 @@ builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *start = NULL; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } iterable = args[0]; @@ -1235,4 +1235,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=cc800da5daf97b53 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a25d6dfbf3079304 input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 8b6b33f95c8d4b..31cd7e0a7d0f17 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -224,7 +224,7 @@ _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int withdata = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!PyUnicode_Check(args[0])) { @@ -595,7 +595,7 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb Py_buffer source = {NULL, NULL}; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } key = PyLong_AsLong(args[0]); @@ -623,4 +623,4 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb #ifndef _IMP_EXEC_DYNAMIC_METHODDEF #define _IMP_EXEC_DYNAMIC_METHODDEF #endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */ -/*[clinic end generated code: output=0e2089fe632e4bf0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e801e47448df8e84 input=a9049054013a1b77]*/ diff --git a/Python/clinic/instruction_sequence.c.h b/Python/clinic/instruction_sequence.c.h index f58accf4b575e4..616a061e3bbaab 100644 --- a/Python/clinic/instruction_sequence.c.h +++ b/Python/clinic/instruction_sequence.c.h @@ -83,7 +83,7 @@ InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const int label; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } label = PyLong_AsInt(args[0]); @@ -149,7 +149,7 @@ InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *arg int end_col_offset; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } opcode = PyLong_AsInt(args[0]); @@ -256,7 +256,7 @@ InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const PyObject *nested; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } nested = args[0]; @@ -301,4 +301,4 @@ InstructionSequenceType_get_instructions(_PyInstructionSequence *self, PyObject { return InstructionSequenceType_get_instructions_impl(self); } -/*[clinic end generated code: output=572e5eb66f3b4f79 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d27cfe58b6f3f332 input=a9049054013a1b77]*/ diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index 009fb94327ba3c..75be65f816bf9b 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -71,7 +71,7 @@ marshal_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -158,7 +158,7 @@ marshal_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } file = args[0]; @@ -235,7 +235,7 @@ marshal_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } value = args[0]; @@ -315,7 +315,7 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int allow_code = 1; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (PyObject_GetBuffer(args[0], &bytes, PyBUF_SIMPLE) != 0) { @@ -339,4 +339,4 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec return return_value; } -/*[clinic end generated code: output=2bee9d6b6b2406d4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8f25dc60e1f525c8 input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index 284cbd0f7df646..9316f8a2d30587 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -53,7 +53,7 @@ sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *hook; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } hook = args[0]; @@ -562,7 +562,7 @@ sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, int depth; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } depth = PyLong_AsInt(args[0]); @@ -863,7 +863,7 @@ sys_set_int_max_str_digits(PyObject *module, PyObject *const *args, Py_ssize_t n int maxdigits; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } maxdigits = PyLong_AsInt(args[0]); @@ -1014,7 +1014,7 @@ sys_getunicodeinternedsize(PyObject *module, PyObject *const *args, Py_ssize_t n Py_ssize_t _return_value; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1480,7 +1480,7 @@ sys__getframemodulename(PyObject *module, PyObject *const *args, Py_ssize_t narg int depth = 0; args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); - if (args == NULL) { + if (!args) { goto exit; } if (!noptargs) { @@ -1614,4 +1614,4 @@ sys__is_gil_enabled(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=70813735fd58757d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fdec7ddc2508d65f input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index d606d2a812b5b8..6a6d40b3e0f5b3 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -56,7 +56,7 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int tb_lineno; fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, 0, argsbuf); - if (fastargs == NULL) { + if (!fastargs) { goto exit; } tb_next = fastargs[0]; @@ -78,4 +78,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6e7d38a07b275eb3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a82471b667511d1d input=a9049054013a1b77]*/ diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index ea1458277d419e..e460b6c730b7fb 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -480,7 +480,7 @@ def _parse_vararg(self) -> str: size = f'nargs - {self.max_pos}' if self.max_pos else 'nargs' return f""" {paramname} = PyTuple_New({size}); - if ({paramname} == NULL) {{{{ + if (!{paramname}) {{{{ goto exit; }}}} for (Py_ssize_t i = {self.max_pos}; i < nargs; ++i) {{{{ @@ -512,7 +512,7 @@ def _parse_vararg(self) -> str: if self.max_pos: return f""" {paramname} = PyTuple_GetSlice(args, {self.max_pos}, PY_SSIZE_T_MAX); - if ({paramname} == NULL) {{{{ + if (!{paramname}) {{{{ goto exit; }}}} """ @@ -684,7 +684,7 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t noptargs = %s + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" %s = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, %d, %d, %d, %d, argsbuf); - if (%s == NULL) {{ + if (!%s) {{ goto exit; }} """ % (argsname, @@ -707,7 +707,7 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t noptargs = %s + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) parser_code = [libclinic.normalize_snippet(""" fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, %d, %d, %d, %d, argsbuf); - if (fastargs == NULL) {{ + if (!fastargs) {{ goto exit; }} """ % (self.min_pos, @@ -775,7 +775,7 @@ def parse_general(self, clang: CLanguage) -> None: else: add_label = label parser_code.append(libclinic.normalize_snippet(""" - if (%s != NULL) {{ + if (%s) {{ """ % (argname_fmt % i), indent=4)) parser_code.append(libclinic.normalize_snippet(parsearg, indent=8)) parser_code.append(libclinic.normalize_snippet(""" From 2735de9346e842e7a45176905861d6959f08dc49 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 12 Aug 2024 23:53:12 +0300 Subject: [PATCH 04/14] Satisfy MyPy. --- Tools/clinic/libclinic/parse_args.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index e460b6c730b7fb..7fd8fc90ce9b31 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -292,7 +292,7 @@ def use_meth_o(self) -> bool: def use_meth_varargs(self) -> bool: return (not self.parameters - and self.varpos + and self.varpos is not None and not self.requires_defining_class and not self.is_new_or_init()) @@ -471,6 +471,7 @@ def parse_option_groups(self) -> None: self.parser_body(parser_code) def _parse_vararg(self) -> str: + assert self.varpos is not None paramname = self.varpos.converter.parser_name if self.fastcall: if self.limited_capi: From 05fe2ebf3f4733664b8fd90a96d77ca04a6744d5 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 13 Aug 2024 09:29:20 +0300 Subject: [PATCH 05/14] Refactor template. --- Tools/clinic/libclinic/parse_args.py | 34 ++++++++++------------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 7fd8fc90ce9b31..ee43f931146842 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -683,22 +683,12 @@ def parse_general(self, clang: CLanguage) -> None: argname_fmt = 'args[%d]' if has_optional_kw: self.declarations += "\nPy_ssize_t noptargs = %s + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) - parser_code = [libclinic.normalize_snippet(""" - %s = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, %d, %d, %d, %d, argsbuf); - if (!%s) {{ - goto exit; - }} - """ % (argsname, - self.min_pos, - self.max_pos, - self.min_kw_only, - int(self.varpos is not None), - argsname), - indent=4)] + unpack_args = 'args, nargs, NULL, kwnames' else: # positional-or-keyword arguments self.flags = "METH_VARARGS|METH_KEYWORDS" self.parser_prototype = PARSER_PROTOTYPE_KEYWORD + argsname = 'fastargs' argname_fmt = 'fastargs[%d]' self.declarations = declare_parser(self.func, codegen=self.codegen) self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters) @@ -706,16 +696,16 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t nargs = PyTuple_GET_SIZE(args);" if has_optional_kw: self.declarations += "\nPy_ssize_t noptargs = %s + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) - parser_code = [libclinic.normalize_snippet(""" - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, %d, %d, %d, %d, argsbuf); - if (!fastargs) {{ - goto exit; - }} - """ % (self.min_pos, - self.max_pos, - self.min_kw_only, - int(self.varpos is not None)), - indent=4)] + unpack_args = '_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL' + unpack_args += (f', &_parser, {self.min_pos}, {self.max_pos}, ' + f'{self.min_kw_only}, ' + f'{int(self.varpos is not None)}, argsbuf') + parser_code = [libclinic.normalize_snippet(f""" + {argsname} = _PyArg_UnpackKeywords({unpack_args}); + if (!{argsname}) {{{{ + goto exit; + }}}} + """, indent=4)] if self.requires_defining_class: self.flags = 'METH_METHOD|' + self.flags From 7b541899466301f9ce7863a84db9b5c99fc17687 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 13 Aug 2024 10:34:04 +0300 Subject: [PATCH 06/14] Minimized diff for this step. --- Include/internal/pycore_modsupport.h | 15 +- Lib/test/clinic.test.c | 124 +++++------ Modules/_blake2/clinic/blake2b_impl.c.h | 4 +- Modules/_blake2/clinic/blake2s_impl.c.h | 4 +- Modules/_ctypes/clinic/_ctypes.c.h | 24 +-- Modules/_io/clinic/_iomodule.c.h | 6 +- Modules/_io/clinic/bufferedio.c.h | 16 +- Modules/_io/clinic/bytesio.c.h | 4 +- Modules/_io/clinic/fileio.c.h | 12 +- Modules/_io/clinic/iobase.c.h | 6 +- Modules/_io/clinic/stringio.c.h | 4 +- Modules/_io/clinic/textio.c.h | 16 +- Modules/_io/clinic/winconsoleio.c.h | 10 +- Modules/_multiprocessing/clinic/semaphore.c.h | 8 +- Modules/_sqlite/clinic/connection.c.h | 32 +-- Modules/_sqlite/clinic/cursor.c.h | 4 +- Modules/_sqlite/clinic/module.c.h | 4 +- Modules/_sre/clinic/sre.c.h | 28 +-- Modules/_ssl/clinic/cert.c.h | 4 +- Modules/_testcapi/clinic/exceptions.c.h | 4 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 14 +- Modules/clinic/_asynciomodule.c.h | 40 ++-- Modules/clinic/_bisectmodule.c.h | 10 +- Modules/clinic/_bz2module.c.h | 4 +- Modules/clinic/_codecsmodule.c.h | 6 +- Modules/clinic/_collectionsmodule.c.h | 4 +- Modules/clinic/_csv.c.h | 8 +- Modules/clinic/_curses_panel.c.h | 8 +- Modules/clinic/_cursesmodule.c.h | 4 +- Modules/clinic/_datetimemodule.c.h | 12 +- Modules/clinic/_elementtree.c.h | 26 +-- Modules/clinic/_functoolsmodule.c.h | 4 +- Modules/clinic/_hashopenssl.c.h | 42 ++-- Modules/clinic/_lzmamodule.c.h | 6 +- Modules/clinic/_opcode.c.h | 22 +- Modules/clinic/_pickle.c.h | 20 +- Modules/clinic/_queuemodule.c.h | 8 +- Modules/clinic/_ssl.c.h | 24 +-- Modules/clinic/_struct.c.h | 8 +- Modules/clinic/_testclinic.c.h | 66 +++--- Modules/clinic/_testclinic_depr.c.h | 50 ++--- Modules/clinic/_testinternalcapi.c.h | 12 +- Modules/clinic/_testmultiphase.c.h | 4 +- Modules/clinic/_winapi.c.h | 8 +- Modules/clinic/_zoneinfo.c.h | 16 +- Modules/clinic/arraymodule.c.h | 10 +- Modules/clinic/binascii.c.h | 16 +- Modules/clinic/cmathmodule.c.h | 4 +- Modules/clinic/gcmodule.c.h | 6 +- Modules/clinic/itertoolsmodule.c.h | 18 +- Modules/clinic/mathmodule.c.h | 8 +- Modules/clinic/md5module.c.h | 4 +- Modules/clinic/overlapped.c.h | 4 +- Modules/clinic/posixmodule.c.h | 194 +++++++++--------- Modules/clinic/pyexpat.c.h | 12 +- Modules/clinic/selectmodule.c.h | 12 +- Modules/clinic/sha1module.c.h | 4 +- Modules/clinic/sha2module.c.h | 10 +- Modules/clinic/sha3module.c.h | 4 +- Modules/clinic/signalmodule.c.h | 4 +- Modules/clinic/socketmodule.c.h | 4 +- Modules/clinic/syslogmodule.c.h | 4 +- Modules/clinic/zlibmodule.c.h | 24 +-- Objects/clinic/bytearrayobject.c.h | 16 +- Objects/clinic/bytesobject.c.h | 16 +- Objects/clinic/codeobject.c.h | 6 +- Objects/clinic/complexobject.c.h | 4 +- Objects/clinic/descrobject.c.h | 6 +- Objects/clinic/enumobject.c.h | 4 +- Objects/clinic/funcobject.c.h | 4 +- Objects/clinic/listobject.c.h | 4 +- Objects/clinic/longobject.c.h | 8 +- Objects/clinic/memoryobject.c.h | 12 +- Objects/clinic/moduleobject.c.h | 4 +- Objects/clinic/odictobject.c.h | 12 +- Objects/clinic/structseq.c.h | 4 +- Objects/clinic/typevarobject.c.h | 16 +- Objects/clinic/unicodeobject.c.h | 16 +- Objects/stringlib/clinic/transmogrify.h.h | 4 +- PC/clinic/_wmimodule.cpp.h | 4 +- PC/clinic/winreg.c.h | 10 +- Python/clinic/Python-tokenize.c.h | 4 +- Python/clinic/_warnings.c.h | 6 +- Python/clinic/bltinmodule.c.h | 18 +- Python/clinic/import.c.h | 6 +- Python/clinic/instruction_sequence.c.h | 8 +- Python/clinic/marshal.c.h | 10 +- Python/clinic/sysmodule.c.h | 12 +- Python/clinic/traceback.c.h | 4 +- Python/getargs.c | 4 +- Tools/clinic/libclinic/parse_args.py | 13 +- 91 files changed, 669 insertions(+), 663 deletions(-) diff --git a/Include/internal/pycore_modsupport.h b/Include/internal/pycore_modsupport.h index fbafbcf8e7b777..250106ad83a3ec 100644 --- a/Include/internal/pycore_modsupport.h +++ b/Include/internal/pycore_modsupport.h @@ -76,7 +76,7 @@ PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords( ...); // Export for 'math' shared extension -PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywords( +PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywordsEx( PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs, @@ -87,12 +87,17 @@ PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywords( int minkw, int varpos, PyObject **buf); -#define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, varpos, buf) \ +#define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, buf) \ (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \ - (minpos) <= (nargs) && (varpos || (nargs) <= (maxpos)) && (args) != NULL) ? \ + (minpos) <= (nargs) && (nargs) <= (maxpos) && (args) != NULL) ? \ (args) : \ - _PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \ - (minpos), (maxpos), (minkw), (varpos), (buf))) + _PyArg_UnpackKeywordsEx((args), (nargs), (kwargs), (kwnames), (parser), \ + (minpos), (maxpos), (minkw), 0, (buf))) +#define _PyArg_UnpackKeywordsWithVararg(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, buf) \ + (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \ + (minpos) <= (nargs) && (args) != NULL) ? (args) : \ + _PyArg_UnpackKeywordsEx((args), (nargs), (kwargs), (kwnames), (parser), \ + (minpos), (maxpos), (minkw), 1, (buf))) #ifdef __cplusplus } diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c index 3e6475e825e214..ac21f083bc0db5 100644 --- a/Lib/test/clinic.test.c +++ b/Lib/test/clinic.test.c @@ -2199,7 +2199,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2213,7 +2213,7 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=8c0345bdc2d4279f input=0d3484844749c05b]*/ +/*[clinic end generated code: output=13ba007e1c842a37 input=0d3484844749c05b]*/ /*[clinic input] @@ -2269,7 +2269,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -2283,7 +2283,7 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=66625282d27df5b4 input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=789799a6d2d6eb4d input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2342,7 +2342,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2367,7 +2367,7 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=b64f34a10ee58dfe input=eda7964f784f4607]*/ +/*[clinic end generated code: output=42430dd8ea5afde6 input=eda7964f784f4607]*/ /*[clinic input] @@ -2429,7 +2429,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2464,7 +2464,7 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=c9d506684af98d1f input=209387a4815e5082]*/ +/*[clinic end generated code: output=f312c35c380d2bf9 input=209387a4815e5082]*/ /*[clinic input] @@ -2524,7 +2524,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2549,7 +2549,7 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=68edbf1d2262f7aa input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=3937da2a8233ebe0 input=18393cc64fa000f4]*/ /*[clinic input] @@ -2605,7 +2605,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2619,7 +2619,7 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=4292a4b34fc66678 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=6b4f6dd5f4db3877 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2676,7 +2676,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -2690,7 +2690,7 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=879bb3b449bc11b4 input=9042f2818f664839]*/ +/*[clinic end generated code: output=8bef2a8198e70b26 input=9042f2818f664839]*/ /*[clinic input] @@ -2750,7 +2750,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); if (!args) { goto exit; } @@ -2766,7 +2766,7 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=06380eb7891a8853 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=a44b8ae8300955e1 input=29546ebdca492fea]*/ /*[clinic input] @@ -2828,7 +2828,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -2854,7 +2854,7 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=3131e879b31e9ddf input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=cae6647c9e8e0238 input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2914,7 +2914,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2939,7 +2939,7 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=1f6ab441c0a23c0b input=1581299d21d16f14]*/ +/*[clinic end generated code: output=6526fd08aafa2149 input=1581299d21d16f14]*/ /*[clinic input] @@ -3001,7 +3001,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -3032,7 +3032,7 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=1e9adfbf0156f8e2 input=408798ec3d42949f]*/ +/*[clinic end generated code: output=b8d01e98443738c2 input=408798ec3d42949f]*/ /*[clinic input] @@ -3095,7 +3095,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -3121,7 +3121,7 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=bf69c0352b83d03e input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=81d71c288f13d4dc input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -3182,7 +3182,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3207,7 +3207,7 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=e1818c157f03f3d1 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=a717d2a1a3310289 input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -3270,7 +3270,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -3301,7 +3301,7 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=a83c8f2a857434f5 input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=0f50b4b8d45cf2de input=1e557dc979d120fd]*/ /*[clinic input] @@ -3367,7 +3367,7 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); if (!args) { goto exit; } @@ -3395,7 +3395,7 @@ static PyObject * test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=affd90c19f802f78 input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=8dac8d2a4e6105fa input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3458,7 +3458,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -3484,7 +3484,7 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=437e74e675923bb9 input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=5a96d521e6414f5d input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3551,7 +3551,7 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -3588,7 +3588,7 @@ static PyObject * test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=ad0869d8a7f2c677 input=d0883d45876f186c]*/ +/*[clinic end generated code: output=d5a474dcd5dc3e9f input=d0883d45876f186c]*/ /*[clinic input] @@ -3655,7 +3655,7 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -3697,7 +3697,7 @@ static PyObject * test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=0c9b524795e3c177 input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=ac239c5ee8a74408 input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3767,7 +3767,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args PyObject *e = Py_None; PyObject *f = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -3816,7 +3816,7 @@ test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f) -/*[clinic end generated code: output=10507e1f8db1f7b0 input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=638bbd0005639342 input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3871,7 +3871,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -3892,7 +3892,7 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=3a56ca73418929be input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=b12fe2e515a62603 input=303df5046c7e37a3]*/ /*[clinic input] @@ -4232,7 +4232,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *a; PyObject *__clinic_args = NULL; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -4254,7 +4254,7 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=83da0088d61ef092 input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=e7d7da6a7e008125 input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -4314,7 +4314,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *__clinic_args = NULL; int b = 0; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -4345,7 +4345,7 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=6d5d4c7b8725a523 input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=46781f9920ecedcf input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -4405,7 +4405,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize int b = 0; PyObject *c = " "; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -4439,7 +4439,7 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=71967475eadae191 input=fa56a709a035666e]*/ +/*[clinic end generated code: output=d03daf5067039c03 input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4490,7 +4490,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *mod; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -4503,7 +4503,7 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=20495fdbd57c9532 input=afefe259667f13ba]*/ +/*[clinic end generated code: output=4a2a849ecbcc8b53 input=afefe259667f13ba]*/ /*[clinic input] mangle1 @@ -4575,7 +4575,7 @@ mangle1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_nargs; PyObject *__clinic_noptargs; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 9, 9, 0, argsbuf); if (!args) { goto exit; } @@ -4599,7 +4599,7 @@ mangle1_impl(PyObject *module, PyObject *args, PyObject *kwnames, PyObject *return_value, PyObject *_keywords, PyObject *_parser, PyObject *argsbuf, PyObject *fastargs, PyObject *nargs, PyObject *noptargs) -/*[clinic end generated code: output=11a67d5f9b51d1e5 input=a3ed51bdedf8a3c7]*/ +/*[clinic end generated code: output=083e5076be9987c3 input=a3ed51bdedf8a3c7]*/ /*[clinic input] mangle2 @@ -4656,7 +4656,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *__clinic_kwargs; PyObject *__clinic_return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -4672,7 +4672,7 @@ mangle2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn static PyObject * mangle2_impl(PyObject *module, PyObject *args, PyObject *kwargs, PyObject *return_value) -/*[clinic end generated code: output=228db961b4469d07 input=391766fee51bad7a]*/ +/*[clinic end generated code: output=2ebb62aaefe7590a input=391766fee51bad7a]*/ /*[clinic input] @@ -4725,7 +4725,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ PyObject *argsbuf[1]; int a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -4741,7 +4741,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_ static PyObject * Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a) -/*[clinic end generated code: output=c2e71608109772f2 input=af158077bd237ef9]*/ +/*[clinic end generated code: output=a3a968137b0f320a input=af158077bd237ef9]*/ /*[clinic input] @@ -5073,7 +5073,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *a; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -5086,7 +5086,7 @@ Test___init__(PyObject *self, PyObject *args, PyObject *kwargs) static int Test___init___impl(TestObj *self, PyObject *a) -/*[clinic end generated code: output=ca1607b9a98fb44a input=a8f9222a6ab35c59]*/ +/*[clinic end generated code: output=0e1239b9bc247bc1 input=a8f9222a6ab35c59]*/ /*[clinic input] @@ -5339,7 +5339,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; int int_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -5355,7 +5355,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t static PyObject * mangled_c_keyword_identifier_impl(PyObject *module, int int_value) -/*[clinic end generated code: output=6e8a7c9097050537 input=060876448ab567a2]*/ +/*[clinic end generated code: output=01a8088b57632916 input=060876448ab567a2]*/ /*[clinic input] @@ -5598,7 +5598,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *arg = CONST_A + CONST_B; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -5615,7 +5615,7 @@ fn_with_default_binop_expr(PyObject *module, PyObject *const *args, Py_ssize_t n static PyObject * fn_with_default_binop_expr_impl(PyObject *module, PyObject *arg) -/*[clinic end generated code: output=fa4fe50d45ddcbb6 input=1b55c8ae68d89453]*/ +/*[clinic end generated code: output=018672772e4092ff input=1b55c8ae68d89453]*/ /*[python input] @@ -5686,7 +5686,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py PyObject *argsbuf[1]; str a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -5701,7 +5701,7 @@ docstr_fallback_to_converter_default(PyObject *module, PyObject *const *args, Py static PyObject * docstr_fallback_to_converter_default_impl(PyObject *module, str a) -/*[clinic end generated code: output=a3efbe6cf731ca9e input=0cbe6a4d24bc2274]*/ +/*[clinic end generated code: output=3fff7b702f0065cb input=0cbe6a4d24bc2274]*/ /*[clinic input] diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 6c28f404069008..47d62717eb76e7 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -72,7 +72,7 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int last_node = 0; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -265,4 +265,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=d65f094670bd0ba7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e18eeaee40623bfc input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index 9e9c1f4e2e7554..7a0f6eeff5b5b5 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -72,7 +72,7 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int last_node = 0; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -265,4 +265,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=0f0893fd7822513b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=24690e4e2586cafd input=a9049054013a1b77]*/ diff --git a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h index 47426a29f453ae..e1d5a17cbe7d68 100644 --- a/Modules/_ctypes/clinic/_ctypes.c.h +++ b/Modules/_ctypes/clinic/_ctypes.c.h @@ -65,7 +65,7 @@ CDataType_from_address(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -112,7 +112,7 @@ CDataType_from_buffer(PyObject *type, PyTypeObject *cls, PyObject *const *args, PyObject *obj; Py_ssize_t offset = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -175,7 +175,7 @@ CDataType_from_buffer_copy(PyObject *type, PyTypeObject *cls, PyObject *const *a Py_buffer buffer = {NULL, NULL}; Py_ssize_t offset = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -245,7 +245,7 @@ CDataType_in_dll(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py_ss PyObject *dll; const char *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -301,7 +301,7 @@ CDataType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -344,7 +344,7 @@ PyCPointerType_set_type(PyTypeObject *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *type; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -388,7 +388,7 @@ PyCPointerType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -430,7 +430,7 @@ c_wchar_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -472,7 +472,7 @@ c_char_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -514,7 +514,7 @@ c_void_p_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -558,7 +558,7 @@ PyCSimpleType_from_param(PyObject *type, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -610,4 +610,4 @@ Simple_from_outparm(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py } return Simple_from_outparm_impl(self, cls); } -/*[clinic end generated code: output=2ae83e7090e0bbba input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a90886be2a294ee6 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 54b6ac8e4ddb4d..112408a95df036 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -175,7 +175,7 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int closefd = 1; PyObject *opener = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 8, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *argsbuf[1]; PyObject *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -404,4 +404,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=ca839985e0d5219c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5d60f4e778a600a4 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index 887aaa75c1f31e..708bef638887e2 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -151,7 +151,7 @@ _io__BufferedIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -205,7 +205,7 @@ _io__BufferedIOBase_read1(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -262,7 +262,7 @@ _io__BufferedIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -910,7 +910,7 @@ _io__Buffered_truncate(buffered *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *pos = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -973,7 +973,7 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1050,7 +1050,7 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1219,7 +1219,7 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *raw; Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1245,4 +1245,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=4a40772275c05bbd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8eead000083dc5fa input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index d42d3c83d2c6af..620e9e3b84ea19 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -520,7 +520,7 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *initvalue = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -534,4 +534,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=c8d7b26174a8c180 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ef116925b8b9e535 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index 067adf82f4799b..5b5487d63eba90 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -94,7 +94,7 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int closefd = 1; PyObject *opener = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -241,7 +241,7 @@ _io_FileIO_readinto(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *argsbuf[1]; Py_buffer buffer = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -317,7 +317,7 @@ _io_FileIO_read(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssize PyObject *argsbuf[1]; Py_ssize_t size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -370,7 +370,7 @@ _io_FileIO_write(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_ssiz PyObject *argsbuf[1]; Py_buffer b = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -490,7 +490,7 @@ _io_FileIO_truncate(fileio *self, PyTypeObject *cls, PyObject *const *args, Py_s PyObject *argsbuf[1]; PyObject *posobj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -528,4 +528,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO_FILEIO_TRUNCATE_METHODDEF #define _IO_FILEIO_TRUNCATE_METHODDEF #endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */ -/*[clinic end generated code: output=7eb93019525a5a8d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e3d9446b4087020e input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index 57810d09884ff8..a35cac7dc0b8d7 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -56,7 +56,7 @@ _io__IOBase_seek(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ss int offset; int whence = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -132,7 +132,7 @@ _io__IOBase_truncate(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; PyObject *size = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -441,4 +441,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _io__RawIOBase_readall_impl(self); } -/*[clinic end generated code: output=d3d99fa9e875e696 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dab5e9323d191e32 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index ac1fc093815204..6bdb2181985f7d 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -336,7 +336,7 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *value = NULL; PyObject *newline_obj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -555,4 +555,4 @@ _io_StringIO_newlines_get(stringio *self, void *Py_UNUSED(context)) return return_value; } -/*[clinic end generated code: output=4f03839c05618ef5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9ffea20cd32d4cd8 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index 6141ee24eabb5c..669e2aa637ebbf 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -70,7 +70,7 @@ _io__TextIOBase_read(PyObject *self, PyTypeObject *cls, PyObject *const *args, P PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -124,7 +124,7 @@ _io__TextIOBase_readline(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; int size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -178,7 +178,7 @@ _io__TextIOBase_write(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; const char *s; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -339,7 +339,7 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject int translate; PyObject *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -405,7 +405,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar PyObject *input; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -546,7 +546,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) int line_buffering = 0; int write_through = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, argsbuf); if (!fastargs) { goto exit; } @@ -681,7 +681,7 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na PyObject *line_buffering_obj = Py_None; PyObject *write_through_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1292,4 +1292,4 @@ _io_TextIOWrapper__CHUNK_SIZE_set(textio *self, PyObject *value, void *Py_UNUSED return return_value; } -/*[clinic end generated code: output=50e75a2cb6d7566f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=04cb7c67791a9ec1 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 0bb8e6785b3483..4696ecc5c843e6 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -93,7 +93,7 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int closefd = 1; PyObject *opener = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -239,7 +239,7 @@ _io__WindowsConsoleIO_readinto(winconsoleio *self, PyTypeObject *cls, PyObject * PyObject *argsbuf[1]; Py_buffer buffer = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -323,7 +323,7 @@ _io__WindowsConsoleIO_read(winconsoleio *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; Py_ssize_t size = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -380,7 +380,7 @@ _io__WindowsConsoleIO_write(winconsoleio *self, PyTypeObject *cls, PyObject *con PyObject *argsbuf[1]; Py_buffer b = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -457,4 +457,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored)) #ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF #endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */ -/*[clinic end generated code: output=24f4d87b9b3ff97f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2c2bc86713b21dd6 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index cb253da5f4d01b..512e5a016192fb 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -58,7 +58,7 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ int blocking = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -163,7 +163,7 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ int blocking = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -263,7 +263,7 @@ _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *name; int unlink; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 5, 5, 0, argsbuf); if (!fastargs) { goto exit; } @@ -573,4 +573,4 @@ _multiprocessing_SemLock___exit__(SemLockObject *self, PyObject *const *args, Py #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */ -/*[clinic end generated code: output=785ab7ac492ce400 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dea36482d23a355f input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 31c9ad5ee89399..6cb610a12b59c6 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -81,7 +81,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, argsbuf); if (!fastargs) { goto exit; } @@ -213,7 +213,7 @@ pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *factory = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -289,7 +289,7 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO int readonly = 0; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -481,7 +481,7 @@ pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls PyObject *func; int deterministic = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -574,7 +574,7 @@ create_window_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *c int num_params; PyObject *aggregate_class; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -670,7 +670,7 @@ pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cl int n_arg; PyObject *aggregate_class; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -770,7 +770,7 @@ pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, PyObject *argsbuf[1]; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -864,7 +864,7 @@ pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject PyObject *callable; int n; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -951,7 +951,7 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject * PyObject *argsbuf[1]; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1055,7 +1055,7 @@ pysqlite_connection_load_extension(pysqlite_Connection *self, PyObject *const *a const char *extension_name; const char *entrypoint = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1252,7 +1252,7 @@ pysqlite_connection_iterdump(pysqlite_Connection *self, PyObject *const *args, P Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *filter = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1320,7 +1320,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ const char *name = "main"; double sleep = 0.25; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1418,7 +1418,7 @@ pysqlite_connection_create_collation(pysqlite_Connection *self, PyTypeObject *cl const char *name; PyObject *callable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1497,7 +1497,7 @@ serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1587,7 +1587,7 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py_buffer data = {NULL, NULL}; const char *name = "main"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1866,4 +1866,4 @@ getconfig(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=9e00c4721c5f653b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5d4d7e4abe17b164 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index e076789d7fc255..a13e0d0745b58d 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -216,7 +216,7 @@ pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int maxrows = self->arraysize; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -313,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=7277c0b2524c5c5a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a8ce095c3c80cf65 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index cb37f2b1f8e0ce..529dc4e281e0eb 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -52,7 +52,7 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; const char *statement; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -208,4 +208,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=05f04beb7ae081cc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=457ab0fdbb9e1880 input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index c6a213f0209d19..48336c7a2fca26 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -213,7 +213,7 @@ _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const * Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -306,7 +306,7 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *con Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -401,7 +401,7 @@ _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -493,7 +493,7 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -588,7 +588,7 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -680,7 +680,7 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const Py_ssize_t pos = 0; Py_ssize_t endpos = PY_SSIZE_T_MAX; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -771,7 +771,7 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t na PyObject *string; Py_ssize_t maxsplit = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -846,7 +846,7 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *string; Py_ssize_t count = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -923,7 +923,7 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *a PyObject *string; Py_ssize_t count = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1027,7 +1027,7 @@ _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *groupindex; PyObject *indexgroup; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, argsbuf); if (!args) { goto exit; } @@ -1152,7 +1152,7 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; PyObject *template; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1211,7 +1211,7 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1274,7 +1274,7 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t na Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1461,4 +1461,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=e3592512bd214efd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c3e711f0b2f43d66 input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index b2efbdb6122271..0748d32291e3c5 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -52,7 +52,7 @@ _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int format = PY_SSL_ENCODING_PEM; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -86,4 +86,4 @@ _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored)) { return _ssl_Certificate_get_info_impl(self); } -/*[clinic end generated code: output=cbdcf54a8d29c126 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5b668226f933a677 input=a9049054013a1b77]*/ diff --git a/Modules/_testcapi/clinic/exceptions.c.h b/Modules/_testcapi/clinic/exceptions.c.h index 3e46b9db5c8313..a797444c1a72b9 100644 --- a/Modules/_testcapi/clinic/exceptions.c.h +++ b/Modules/_testcapi/clinic/exceptions.c.h @@ -104,7 +104,7 @@ _testcapi_make_exception_with_doc(PyObject *module, PyObject *const *args, Py_ss PyObject *base = NULL; PyObject *dict = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -456,4 +456,4 @@ _testcapi_unstable_exc_prep_reraise_star(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=7a5adf45325bdd9f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0b11ef105030a48e input=a9049054013a1b77]*/ diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index db5ee69fd855b9..73edd5c3b25553 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -61,7 +61,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons PyObject *input; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -147,7 +147,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons Py_buffer input = {NULL, NULL}; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -234,7 +234,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb PyObject *input; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -363,7 +363,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb Py_buffer input = {NULL, NULL}; int final = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -598,7 +598,7 @@ _multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, P PyObject *argsbuf[1]; PyObject *strobj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -642,7 +642,7 @@ _multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *se PyObject *argsbuf[1]; PyObject *lines; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -682,4 +682,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__, #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \ {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__}, -/*[clinic end generated code: output=d4b12769230c42bb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f09052c5a28cc6e6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 216e2d510948e1..d619a124ccead5 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -63,7 +63,7 @@ _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *loop = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -163,7 +163,7 @@ _asyncio_Future_set_result(FutureObj *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *result; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -210,7 +210,7 @@ _asyncio_Future_set_exception(FutureObj *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *exception; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -272,7 +272,7 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyTypeObject *cls, PyObject * PyObject *fn; PyObject *context = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -323,7 +323,7 @@ _asyncio_Future_remove_done_callback(FutureObj *self, PyTypeObject *cls, PyObjec PyObject *argsbuf[1]; PyObject *fn; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -384,7 +384,7 @@ _asyncio_Future_cancel(FutureObj *self, PyTypeObject *cls, PyObject *const *args Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *msg = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -531,7 +531,7 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *context = Py_None; int eager_start = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -653,7 +653,7 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *msg = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -776,7 +776,7 @@ _asyncio_Task_get_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *limit = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -844,7 +844,7 @@ _asyncio_Task_print_stack(TaskObj *self, PyTypeObject *cls, PyObject *const *arg PyObject *limit = Py_None; PyObject *file = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1064,7 +1064,7 @@ _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1121,7 +1121,7 @@ _asyncio__register_eager_task(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1178,7 +1178,7 @@ _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1235,7 +1235,7 @@ _asyncio__unregister_eager_task(PyObject *module, PyObject *const *args, Py_ssiz PyObject *argsbuf[1]; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1295,7 +1295,7 @@ _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1356,7 +1356,7 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1416,7 +1416,7 @@ _asyncio__swap_current_task(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *loop; PyObject *task; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1473,7 +1473,7 @@ _asyncio_current_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *loop = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1533,7 +1533,7 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *loop = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1547,4 +1547,4 @@ _asyncio_all_tasks(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py exit: return return_value; } -/*[clinic end generated code: output=2ec3af5a73914995 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ffe9b71bc65888b3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index 3d9597d4a3edf0..528602c84a9b23 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -69,7 +69,7 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *key = Py_None; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -176,7 +176,7 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t hi = -1; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -282,7 +282,7 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *key = Py_None; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -389,7 +389,7 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t hi = -1; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -434,4 +434,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=f30e300ff9c13401 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0a8d5a32dd0a3f04 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 02413e27ebc07b..de7b3993596446 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -170,7 +170,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -234,4 +234,4 @@ _bz2_BZ2Decompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=43bd1646494d5118 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8daa62f47cc4853d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index ea9e17ecf942a3..1c0f37442ab350 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -123,7 +123,7 @@ _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -223,7 +223,7 @@ _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2746,4 +2746,4 @@ _codecs_lookup_error(PyObject *module, PyObject *arg) #ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF #define _CODECS_CODE_PAGE_ENCODE_METHODDEF #endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */ -/*[clinic end generated code: output=1642a3b61c8d3de7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e50d5fdf65bd45fa input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index 6ce22f4f372507..fa0ff2133a05d2 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -497,7 +497,7 @@ deque_init(PyObject *deque, PyObject *args, PyObject *kwargs) PyObject *iterable = NULL; PyObject *maxlenobj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -629,4 +629,4 @@ tuplegetter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=cfb6b9597af0afce input=a9049054013a1b77]*/ +/*[clinic end generated code: output=64c32b16df7be07a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index 269031484a8252..2442bdcde5679f 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -74,7 +74,7 @@ _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; PyObject *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -131,7 +131,7 @@ _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; PyObject *name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -192,7 +192,7 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *new_limit = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -206,4 +206,4 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=520893573ec130ab input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9ec59717f5414d8b input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index 93f13b0a4ef28a..c8788c461f745c 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -185,7 +185,7 @@ _curses_panel_panel_move(PyCursesPanelObject *self, PyTypeObject *cls, PyObject int y; int x; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -255,7 +255,7 @@ _curses_panel_panel_replace(PyCursesPanelObject *self, PyTypeObject *cls, PyObje PyObject *argsbuf[1]; PyCursesWindowObject *win; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -303,7 +303,7 @@ _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyTypeObject *cls, Py PyObject *argsbuf[1]; PyObject *obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -421,4 +421,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _curses_panel_update_panels_impl(module); } -/*[clinic end generated code: output=175a4c3caeedd3de input=a9049054013a1b77]*/ +/*[clinic end generated code: output=18dc5571174c7189 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index bd22b512103736..f7e0aaf7b23649 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2714,7 +2714,7 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO const char *term = NULL; int fd = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -4318,4 +4318,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF #define _CURSES_USE_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=68fe1e92542d3ede input=a9049054013a1b77]*/ +/*[clinic end generated code: output=96887782374f070a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 60fecca4c37775..48499e0aaf7783 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -60,7 +60,7 @@ iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int week; int weekday; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 3, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -130,7 +130,7 @@ datetime_date_replace(PyDateTime_Date *self, PyObject *const *args, Py_ssize_t n int month = GET_MONTH(self); int day = GET_DAY(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); if (!args) { goto exit; } @@ -219,7 +219,7 @@ datetime_time_replace(PyDateTime_Time *self, PyObject *const *args, Py_ssize_t n PyObject *tzinfo = HASTZINFO(self) ? self->tzinfo : Py_None; int fold = TIME_GET_FOLD(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 5, 0, argsbuf); if (!args) { goto exit; } @@ -333,7 +333,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *tz = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -406,7 +406,7 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s PyObject *tzinfo = HASTZINFO(self) ? self->tzinfo : Py_None; int fold = DATE_GET_FOLD(self); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 8, 0, argsbuf); if (!args) { goto exit; } @@ -496,4 +496,4 @@ datetime_datetime_replace(PyDateTime_DateTime *self, PyObject *const *args, Py_s exit: return return_value; } -/*[clinic end generated code: output=a62af1bb85589bc4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c7a04b865b1e0890 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 6d989a0825296f..1a5a820d1f00b5 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -41,7 +41,7 @@ _elementtree_Element_append(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *argsbuf[1]; PyObject *subelement; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -198,7 +198,7 @@ _elementtree_Element___setstate__(ElementObject *self, PyTypeObject *cls, PyObje PyObject *argsbuf[1]; PyObject *state; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -241,7 +241,7 @@ _elementtree_Element_extend(ElementObject *self, PyTypeObject *cls, PyObject *co PyObject *argsbuf[1]; PyObject *elements; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -298,7 +298,7 @@ _elementtree_Element_find(ElementObject *self, PyTypeObject *cls, PyObject *cons PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -362,7 +362,7 @@ _elementtree_Element_findtext(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *default_value = Py_None; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -430,7 +430,7 @@ _elementtree_Element_findall(ElementObject *self, PyTypeObject *cls, PyObject *c PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -492,7 +492,7 @@ _elementtree_Element_iterfind(ElementObject *self, PyTypeObject *cls, PyObject * PyObject *path; PyObject *namespaces = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -554,7 +554,7 @@ _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *key; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -615,7 +615,7 @@ _elementtree_Element_iter(ElementObject *self, PyTypeObject *cls, PyObject *cons Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *tag = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -763,7 +763,7 @@ _elementtree_Element_makeelement(ElementObject *self, PyTypeObject *cls, PyObjec PyObject *tag; PyObject *attrib; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -883,7 +883,7 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar int insert_comments = 0; int insert_pis = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1114,7 +1114,7 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs PyObject *target = Py_None; const char *encoding = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1236,4 +1236,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=386bfc0b02ea9531 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bd28eba33d9c1f25 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_functoolsmodule.c.h b/Modules/clinic/_functoolsmodule.c.h index 5bdad0bc061574..e98984dc4d3a09 100644 --- a/Modules/clinic/_functoolsmodule.c.h +++ b/Modules/clinic/_functoolsmodule.c.h @@ -56,7 +56,7 @@ _functools_cmp_to_key(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *mycmp; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -114,4 +114,4 @@ _functools__lru_cache_wrapper_cache_clear(PyObject *self, PyObject *Py_UNUSED(ig return return_value; } -/*[clinic end generated code: output=913ff19f52a6c0c6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=755265bb6d5ea751 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index af24c6d3e5929a..1d85ab1c524082 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -118,7 +118,7 @@ EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *argsbuf[1]; Py_ssize_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -188,7 +188,7 @@ EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; Py_ssize_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -265,7 +265,7 @@ EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -341,7 +341,7 @@ _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -416,7 +416,7 @@ _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -491,7 +491,7 @@ _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -566,7 +566,7 @@ _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -641,7 +641,7 @@ _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -716,7 +716,7 @@ _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -793,7 +793,7 @@ _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -872,7 +872,7 @@ _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -951,7 +951,7 @@ _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1030,7 +1030,7 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1109,7 +1109,7 @@ _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1188,7 +1188,7 @@ _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *data_obj = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1270,7 +1270,7 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject long iterations; PyObject *dklen_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 5, 0, argsbuf); if (!args) { goto exit; } @@ -1373,7 +1373,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj long maxmem = 0; long dklen = 64; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1499,7 +1499,7 @@ _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nar Py_buffer msg = {NULL, NULL}; PyObject *digest; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1573,7 +1573,7 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *msg_obj = NULL; PyObject *digestmod = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1664,7 +1664,7 @@ _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; PyObject *msg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1824,4 +1824,4 @@ _hashlib_compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t narg #ifndef _HASHLIB_SCRYPT_METHODDEF #define _HASHLIB_SCRYPT_METHODDEF #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */ -/*[clinic end generated code: output=3fd09a3a1c01d6b3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fef43fd9f4dbea49 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index deb6d61cecabd3..51fab5eab3f7dc 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -128,7 +128,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -226,7 +226,7 @@ _lzma_LZMADecompressor(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *memlimit = Py_None; PyObject *filters = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -327,4 +327,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=c46aa2a65004e866 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e79c05ace76dc96 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 9e1b6ed75fb1de..32ac9521a2b5cf 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -57,7 +57,7 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *jump = Py_None; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -131,7 +131,7 @@ _opcode_is_valid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -194,7 +194,7 @@ _opcode_has_arg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -257,7 +257,7 @@ _opcode_has_const(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -320,7 +320,7 @@ _opcode_has_name(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -383,7 +383,7 @@ _opcode_has_jump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -451,7 +451,7 @@ _opcode_has_free(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -514,7 +514,7 @@ _opcode_has_local(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -577,7 +577,7 @@ _opcode_has_exc(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int opcode; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -732,7 +732,7 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *code; int offset; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -746,4 +746,4 @@ _opcode_get_executor(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=f71f2499af48a0ec input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3b4d4f32eedd636e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 164a0ba1ca2616..40f1309b6aa03c 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -64,7 +64,7 @@ _pickle_Pickler_dump(PicklerObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *argsbuf[1]; PyObject *obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -181,7 +181,7 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) int fix_imports = 1; PyObject *buffer_callback = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -298,7 +298,7 @@ _pickle_Unpickler_persistent_load(UnpicklerObject *self, PyTypeObject *cls, PyOb PyObject *argsbuf[1]; PyObject *pid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -377,7 +377,7 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyTypeObject *cls, PyObject PyObject *module_name; PyObject *global_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -487,7 +487,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *errors = "strict"; PyObject *buffers = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -679,7 +679,7 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int fix_imports = 1; PyObject *buffer_callback = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -782,7 +782,7 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int fix_imports = 1; PyObject *buffer_callback = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -891,7 +891,7 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject const char *errors = "strict"; PyObject *buffers = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1017,7 +1017,7 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec const char *errors = "strict"; PyObject *buffers = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1077,4 +1077,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=8a506d99b5471c17 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a9452cf1219f2e7a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index bcdcbbce906fdf..6f4c715c722965 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -89,7 +89,7 @@ _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_ int block = 1; PyObject *timeout = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -163,7 +163,7 @@ _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py PyObject *argsbuf[1]; PyObject *item; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -231,7 +231,7 @@ _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *con int block = 1; PyObject *timeout_obj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -349,4 +349,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=b5a7e8b51839eda4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=44a718f40072018a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index bf2e1d9806a704..e8d1342ed35e66 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -379,7 +379,7 @@ _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *cb_type = "tls-unique"; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -583,7 +583,7 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s PyObject *keyfile = Py_None; PyObject *password = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -654,7 +654,7 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args PyObject *capath = Py_None; PyObject *cadata = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); if (!args) { goto exit; } @@ -740,7 +740,7 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz PyObject *owner = Py_None; PyObject *session = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -833,7 +833,7 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t PyObject *owner = Py_None; PyObject *session = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); if (!args) { goto exit; } @@ -995,7 +995,7 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssiz Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int binary_form = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1057,7 +1057,7 @@ _ssl__SSLContext_set_psk_client_callback(PySSLContext *self, PyObject *const *ar PyObject *argsbuf[1]; PyObject *callback; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1115,7 +1115,7 @@ _ssl__SSLContext_set_psk_server_callback(PySSLContext *self, PyObject *const *ar PyObject *callback; const char *identity_hint = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1444,7 +1444,7 @@ _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject const char *txt; int name = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1555,7 +1555,7 @@ _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; const char *store_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1631,7 +1631,7 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *argsbuf[1]; const char *store_name; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1663,4 +1663,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=b5411cac645a849f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=28a22f2b09d631cb input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 85659a39a48e3f..1a07532bdd75ad 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -57,7 +57,7 @@ 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, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -159,7 +159,7 @@ 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, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -357,7 +357,7 @@ 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, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -436,4 +436,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=5c11cb40bebddc0a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=67bd299e5d72fee0 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index ea080ea7980c58..1f4e6f8b8f10ff 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -1479,7 +1479,7 @@ keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1535,7 +1535,7 @@ keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -1593,7 +1593,7 @@ keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1663,7 +1663,7 @@ keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1742,7 +1742,7 @@ keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1808,7 +1808,7 @@ posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1864,7 +1864,7 @@ posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -1922,7 +1922,7 @@ posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); if (!args) { goto exit; } @@ -1983,7 +1983,7 @@ posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -2054,7 +2054,7 @@ posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -2130,7 +2130,7 @@ posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf); if (!args) { goto exit; } @@ -2201,7 +2201,7 @@ posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2278,7 +2278,7 @@ posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf); if (!args) { goto exit; } @@ -2353,7 +2353,7 @@ posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssiz PyObject *d = Py_None; PyObject *e = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2436,7 +2436,7 @@ posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ PyObject *c = Py_None; PyObject *d = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2511,7 +2511,7 @@ keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *argsbuf[1]; PyObject *a; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, argsbuf); if (!args) { goto exit; } @@ -2659,7 +2659,7 @@ posonly_poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b; PyObject *__clinic_args = NULL; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -2725,7 +2725,7 @@ poskw_varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *a; PyObject *__clinic_args = NULL; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -2793,7 +2793,7 @@ poskw_varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *__clinic_args = NULL; int b = 0; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -2870,7 +2870,7 @@ poskw_varpos_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *b = Py_False; PyObject *c = Py_False; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -2947,7 +2947,7 @@ varpos_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *__clinic_args = NULL; PyObject *b = Py_False; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3018,7 +3018,7 @@ varpos_kwonly_req_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *b = Py_False; PyObject *c = Py_False; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, argsbuf); if (!fastargs) { goto exit; } @@ -3098,7 +3098,7 @@ gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *kw1 = Py_None; PyObject *kw2 = Py_None; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3179,7 +3179,7 @@ gh_32092_kw_pass(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *__clinic_args = NULL; PyObject *kw = Py_None; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3296,7 +3296,7 @@ null_or_tuple_for_varargs(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *constraints = NULL; int covariant = 0; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3367,7 +3367,7 @@ clone_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; const char *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3433,7 +3433,7 @@ clone_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; const char *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3502,7 +3502,7 @@ clone_with_conv_f1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py .name = "clone_with_conv_f1", }; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3565,7 +3565,7 @@ clone_with_conv_f2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py .name = "clone_with_conv_f2", }; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3649,7 +3649,7 @@ _testclinic_TestClass_get_defining_class_arg(PyObject *self, PyTypeObject *cls, PyObject *argsbuf[1]; PyObject *arg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3693,7 +3693,7 @@ _testclinic_TestClass_defclass_varpos(PyObject *self, PyTypeObject *cls, PyObjec PyObject * const *fastargs; PyObject *__clinic_args = NULL; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3747,7 +3747,7 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, PyObject *b; PyObject *__clinic_args = NULL; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -3765,4 +3765,4 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=e4dbf2d15659b41a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9c2c00c640588af7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index f22bc2403dc79b..0e374f100d6239 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -80,7 +80,7 @@ depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -163,7 +163,7 @@ depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyO goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -247,7 +247,7 @@ depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs) goto exit; } } - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -330,7 +330,7 @@ depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -474,7 +474,7 @@ depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *a = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -557,7 +557,7 @@ depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; PyObject *a = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -721,7 +721,7 @@ depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -800,7 +800,7 @@ depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -883,7 +883,7 @@ depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, argsbuf); if (!args) { goto exit; } @@ -966,7 +966,7 @@ depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1050,7 +1050,7 @@ depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1133,7 +1133,7 @@ depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 1, argsbuf); if (!args) { goto exit; } @@ -1217,7 +1217,7 @@ depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1301,7 +1301,7 @@ depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, argsbuf); if (!args) { goto exit; } @@ -1387,7 +1387,7 @@ depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 1, argsbuf); if (!args) { goto exit; } @@ -1563,7 +1563,7 @@ depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 7, 7, 1, argsbuf); if (!args) { goto exit; } @@ -1639,7 +1639,7 @@ depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *b; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1721,7 +1721,7 @@ depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b; PyObject *c; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1802,7 +1802,7 @@ depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *a; PyObject *b = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1889,7 +1889,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1982,7 +1982,7 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *b = Py_None; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2080,7 +2080,7 @@ depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *b; PyObject *c = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2259,7 +2259,7 @@ depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *g; PyObject *h; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 8, 8, 0, argsbuf); if (!args) { goto exit; } @@ -2369,7 +2369,7 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * goto exit; } } - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 1, argsbuf); if (!args) { goto exit; } @@ -2394,4 +2394,4 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=5007ff912ac9e436 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5dda27c80df7351e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testinternalcapi.c.h b/Modules/clinic/_testinternalcapi.c.h index 2622c8060ec8f9..dcca9ecf735723 100644 --- a/Modules/clinic/_testinternalcapi.c.h +++ b/Modules/clinic/_testinternalcapi.c.h @@ -52,7 +52,7 @@ _testinternalcapi_compiler_cleandoc(PyObject *module, PyObject *const *args, Py_ PyObject *argsbuf[1]; PyObject *doc; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -135,7 +135,7 @@ _testinternalcapi_compiler_codegen(PyObject *module, PyObject *const *args, Py_s int optimize; int compile_mode = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); if (!args) { goto exit; } @@ -206,7 +206,7 @@ _testinternalcapi_optimize_cfg(PyObject *module, PyObject *const *args, Py_ssize PyObject *consts; int nlocals; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -271,7 +271,7 @@ _testinternalcapi_assemble_code_object(PyObject *module, PyObject *const *args, PyObject *instructions; PyObject *metadata; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -346,7 +346,7 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *spam = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -360,4 +360,4 @@ gh_119213_getargs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO exit: return return_value; } -/*[clinic end generated code: output=f120642a05d04b48 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4d0770a1c20fbf40 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index 7f1f6fc405225e..452897b3fae99e 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -109,7 +109,7 @@ _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *se int n = 1; int twice = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -162,4 +162,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=2de726e06b68a08e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=59cb50dae2d11dc1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index d54264d75db1d2..b0c54fc809f4c1 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -793,7 +793,7 @@ _winapi_GetLongPathName(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *argsbuf[1]; LPCWSTR path = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -897,7 +897,7 @@ _winapi_GetShortPathName(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *argsbuf[1]; LPCWSTR path = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2004,7 +2004,7 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args PyObject *argsbuf[1]; PyObject *on_type_read; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2124,4 +2124,4 @@ _winapi_CopyFile2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO return return_value; } -/*[clinic end generated code: output=99af750bb10b5e32 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2304c62187a90140 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_zoneinfo.c.h b/Modules/clinic/_zoneinfo.c.h index f2961b12715c80..9905b6425e2f79 100644 --- a/Modules/clinic/_zoneinfo.c.h +++ b/Modules/clinic/_zoneinfo.c.h @@ -55,7 +55,7 @@ zoneinfo_ZoneInfo_from_file(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *file_obj; PyObject *key = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -116,7 +116,7 @@ zoneinfo_ZoneInfo_no_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *key; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -173,7 +173,7 @@ zoneinfo_ZoneInfo_clear_cache(PyTypeObject *type, PyTypeObject *cls, PyObject *c Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; PyObject *only_keys = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -221,7 +221,7 @@ zoneinfo_ZoneInfo_utcoffset(PyObject *self, PyTypeObject *cls, PyObject *const * PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -264,7 +264,7 @@ zoneinfo_ZoneInfo_dst(PyObject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -308,7 +308,7 @@ zoneinfo_ZoneInfo_tzname(PyObject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; PyObject *dt; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -353,7 +353,7 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con PyObject *key; unsigned char from_cache; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -372,4 +372,4 @@ zoneinfo_ZoneInfo__unpickle(PyTypeObject *type, PyTypeObject *cls, PyObject *con exit: return return_value; } -/*[clinic end generated code: output=c92c60d6c3241d6f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2a15f32fdd2ab6cd input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index 8e09bebdfae2dc..2ed7eaa6abf7af 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -194,7 +194,7 @@ array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *bb; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -349,7 +349,7 @@ array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args PyObject *f; Py_ssize_t n; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -404,7 +404,7 @@ array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; PyObject *f; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -650,7 +650,7 @@ array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const PyObject *argsbuf[1]; PyObject *value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -691,4 +691,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=bb7b89c568a8d9ea input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ecd63acd7924c223 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index f77adebd6023d3..1adca415dfee12 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -85,7 +85,7 @@ binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_buffer data = {NULL, NULL}; int backtick = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -161,7 +161,7 @@ binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_buffer data = {NULL, NULL}; int strict_mode = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -232,7 +232,7 @@ binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P Py_buffer data = {NULL, NULL}; int newline = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -412,7 +412,7 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -501,7 +501,7 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -646,7 +646,7 @@ binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj Py_buffer data = {NULL, NULL}; int header = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -724,7 +724,7 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int istext = 1; int header = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -767,4 +767,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=a8bc5138d77c4611 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=968767b663ed889d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index e3e05d4974bf6d..50745fd4f407a3 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -932,7 +932,7 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec double abs_tol = 0.0; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -982,4 +982,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=6e8e7fe487b07692 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=454309b21cfa9bf6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index 8bba2cce667027..bed4b82e0053af 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -125,7 +125,7 @@ gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int generation = NUM_GENERATIONS - 1; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -371,7 +371,7 @@ gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; Py_ssize_t generation = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -533,4 +533,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=13d662cc458a71f4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=84873dc5565cc70e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index d9b4c036880408..050c21460d79d7 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -71,7 +71,7 @@ batched_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t n; int strict = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -186,7 +186,7 @@ itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *it; PyObject *keyfunc = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -531,7 +531,7 @@ itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; Py_ssize_t r; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -602,7 +602,7 @@ itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyOb PyObject *iterable; Py_ssize_t r; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -673,7 +673,7 @@ itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; PyObject *robj = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -736,7 +736,7 @@ itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *binop = Py_None; PyObject *initial = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -809,7 +809,7 @@ itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *seq1; PyObject *seq2; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -908,7 +908,7 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *long_cnt = NULL; PyObject *long_step = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -928,4 +928,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=ca02baa405489154 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7b13be3075f2d6d3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 1b827f4533be44..81eec310ddb21d 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -672,7 +672,7 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject double abs_tol = 0.0; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -787,7 +787,7 @@ math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *iterable; PyObject *start = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -938,7 +938,7 @@ math_nextafter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje double y; PyObject *steps = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1011,4 +1011,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=549053f6aaaf3d4a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=755da3b1dbd9e45f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index f5e369177cbfd9..ee7fb3d7c613f2 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -121,7 +121,7 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -148,4 +148,4 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw exit: return return_value; } -/*[clinic end generated code: output=930c187ecc3e68d2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4dbca39332d3f52f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index a02bc0f9175b3a..8b285e4a8f0a72 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -484,7 +484,7 @@ _overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0; HANDLE event = INVALID_HANDLE_VALUE; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1239,4 +1239,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=3f6cd189f280532c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=958cbddbcc355f47 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 3c2385036414bd..4b9dbac9af031f 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -76,7 +76,7 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -157,7 +157,7 @@ os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("lstat", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -257,7 +257,7 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -411,7 +411,7 @@ os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("chdir", "path", 0, 0, 0, PATH_HAVE_FCHDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -476,7 +476,7 @@ os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -565,7 +565,7 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = CHMOD_DEFAULT_FOLLOW_SYMLINKS; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -658,7 +658,7 @@ os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int fd; int mode; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -728,7 +728,7 @@ os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("lchmod", "path", 0, 0, 0, 0); int mode; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -806,7 +806,7 @@ os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * unsigned long flags; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -887,7 +887,7 @@ os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("lchflags", "path", 0, 0, 0, 0); unsigned long flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -956,7 +956,7 @@ os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("chroot", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1020,7 +1020,7 @@ os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1104,7 +1104,7 @@ os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1196,7 +1196,7 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1286,7 +1286,7 @@ os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k uid_t uid; gid_t gid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1359,7 +1359,7 @@ os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k uid_t uid; gid_t gid; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1482,7 +1482,7 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dst_dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1585,7 +1585,7 @@ os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; path_t path = PATH_T_INITIALIZE_P("listdir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1701,7 +1701,7 @@ os_listmounts(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *argsbuf[1]; path_t volume = PATH_T_INITIALIZE_P("listmounts", "volume", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1765,7 +1765,7 @@ os__path_isdevdrive(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_path_isdevdrive", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1930,7 +1930,7 @@ os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_getvolumepathname", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1994,7 +1994,7 @@ os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_path_splitroot", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2137,7 +2137,7 @@ os__path_isdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje path_t path = PATH_T_INITIALIZE_P("_path_isdir", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2206,7 +2206,7 @@ os__path_isfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj path_t path = PATH_T_INITIALIZE_P("_path_isfile", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2275,7 +2275,7 @@ os__path_islink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj path_t path = PATH_T_INITIALIZE_P("_path_islink", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2344,7 +2344,7 @@ os__path_isjunction(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P path_t path = PATH_T_INITIALIZE_P("_path_isjunction", "path", 0, 0, 1, 1); int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2412,7 +2412,7 @@ os__path_splitroot_ex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE("_path_splitroot_ex", "path", 0, 1, 1, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2472,7 +2472,7 @@ os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE("_path_normpath", "path", 0, 1, 1, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -2543,7 +2543,7 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int mode = 511; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2658,7 +2658,7 @@ os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int which; int who; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2726,7 +2726,7 @@ os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int who; int priority; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -2805,7 +2805,7 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2896,7 +2896,7 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int src_dir_fd = DEFAULT_DIR_FD; int dst_dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -2983,7 +2983,7 @@ os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw path_t path = PATH_T_INITIALIZE_P("rmdir", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3053,7 +3053,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k const wchar_t *command = NULL; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3127,7 +3127,7 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *command = NULL; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3232,7 +3232,7 @@ os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("unlink", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3306,7 +3306,7 @@ os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k path_t path = PATH_T_INITIALIZE_P("remove", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3427,7 +3427,7 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int dir_fd = DEFAULT_DIR_FD; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -3519,7 +3519,7 @@ os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int status; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -3632,7 +3632,7 @@ os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argv; PyObject *env; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -3735,7 +3735,7 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *setsigdef = NULL; PyObject *scheduler = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -3885,7 +3885,7 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *setsigdef = NULL; PyObject *scheduler = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 3, 0, argsbuf); if (!args) { goto exit; } @@ -4121,7 +4121,7 @@ os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *after_in_child = NULL; PyObject *after_in_parent = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -4244,7 +4244,7 @@ os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; int policy; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -4306,7 +4306,7 @@ os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; int policy; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -4403,7 +4403,7 @@ os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *sched_priority; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -5731,7 +5731,7 @@ os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int options; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6068,7 +6068,7 @@ os_setns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw int fd; int nstype = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -6141,7 +6141,7 @@ os_unshare(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *argsbuf[1]; int flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6211,7 +6211,7 @@ os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("readlink", "path", 0, 0, 0, 0); int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6297,7 +6297,7 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * int target_is_directory = 0; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -6426,7 +6426,7 @@ os_timerfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO int clockid; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6510,7 +6510,7 @@ os_timerfd_settime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py double initial_double = 0.0; double interval_double = 0.0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6624,7 +6624,7 @@ os_timerfd_settime_ns(PyObject *module, PyObject *const *args, Py_ssize_t nargs, long long initial = 0; long long interval = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -6941,7 +6941,7 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int dir_fd = DEFAULT_DIR_FD; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -7029,7 +7029,7 @@ os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -7162,7 +7162,7 @@ os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn int inheritable = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -7622,7 +7622,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *trailers = NULL; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, argsbuf); if (!args) { goto exit; } @@ -7724,7 +7724,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *trailers = NULL; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 7, 0, argsbuf); if (!args) { goto exit; } @@ -7829,7 +7829,7 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *offobj; Py_ssize_t count; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 4, 0, argsbuf); if (!args) { goto exit; } @@ -7954,7 +7954,7 @@ os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -8307,7 +8307,7 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *offset_src = Py_None; PyObject *offset_dst = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 5, 0, argsbuf); if (!args) { goto exit; } @@ -8422,7 +8422,7 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *offset_dst = Py_None; unsigned int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, argsbuf); if (!args) { goto exit; } @@ -8527,7 +8527,7 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k int mode = 438; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -8628,7 +8628,7 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw dev_t device = 0; int dir_fd = DEFAULT_DIR_FD; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -8868,7 +8868,7 @@ os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("truncate", "path", 0, 0, 0, PATH_HAVE_FTRUNCATE); Py_off_t length; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -9260,7 +9260,7 @@ os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9327,7 +9327,7 @@ os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9394,7 +9394,7 @@ os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9461,7 +9461,7 @@ os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9528,7 +9528,7 @@ os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9595,7 +9595,7 @@ os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9662,7 +9662,7 @@ os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int status; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9766,7 +9766,7 @@ os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("statvfs", "path", 0, 0, 0, PATH_HAVE_FSTATVFS); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9830,7 +9830,7 @@ os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_getdiskusage", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -9946,7 +9946,7 @@ os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int name; long _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -10138,7 +10138,7 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t cwd = PATH_T_INITIALIZE_P("startfile", "cwd", 1, 0, 0, 0); int show_cmd = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, argsbuf); if (!args) { goto exit; } @@ -10277,7 +10277,7 @@ os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -10474,7 +10474,7 @@ os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t attribute = PATH_T_INITIALIZE_P("getxattr", "attribute", 0, 0, 0, 0); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -10563,7 +10563,7 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int flags = 0; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 4, 0, argsbuf); if (!args) { goto exit; } @@ -10669,7 +10669,7 @@ os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje path_t attribute = PATH_T_INITIALIZE_P("removexattr", "attribute", 0, 0, 0, 0); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -10754,7 +10754,7 @@ os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject path_t path = PATH_T_INITIALIZE_P("listxattr", "path", 1, 0, 0, 1); int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -10872,7 +10872,7 @@ os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *name = NULL; unsigned int flags = MFD_CLOEXEC; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -10946,7 +10946,7 @@ os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * unsigned int initval; int flags = EFD_CLOEXEC; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -11015,7 +11015,7 @@ os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -11078,7 +11078,7 @@ os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int fd; unsigned long long value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -11487,7 +11487,7 @@ os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int follow_symlinks = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11552,7 +11552,7 @@ os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11621,7 +11621,7 @@ os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *cons int follow_symlinks = 1; int _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -11730,7 +11730,7 @@ os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; path_t path = PATH_T_INITIALIZE_P("scandir", "path", 1, 0, 0, PATH_HAVE_FDOPENDIR); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -11798,7 +11798,7 @@ os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *argsbuf[1]; PyObject *path; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -11857,7 +11857,7 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject Py_ssize_t size; int flags = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -11942,7 +11942,7 @@ os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *argsbuf[1]; path_t path = PATH_T_INITIALIZE_P("_add_dll_directory", "path", 0, 0, 0, 0); - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -12010,7 +12010,7 @@ os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *argsbuf[1]; PyObject *cookie; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -12081,7 +12081,7 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *argsbuf[1]; PyObject *status_obj; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -12837,4 +12837,4 @@ os__create_environ(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #define OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF #endif /* !defined(OS__SUPPORTS_VIRTUAL_TERMINAL_METHODDEF) */ -/*[clinic end generated code: output=8dd4d597e70e7108 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2fafa0d2814948f8 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 0c18b870cbb39c..682d8481a2a2f4 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -91,7 +91,7 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const PyObject *data; int isfinal = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -143,7 +143,7 @@ pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *c PyObject *argsbuf[1]; PyObject *file; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -267,7 +267,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject const char *context; const char *encoding = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -384,7 +384,7 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObjec PyObject *argsbuf[1]; int flag = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -453,7 +453,7 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, const char *namespace_separator = NULL; PyObject *intern = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); if (!args) { goto exit; } @@ -545,4 +545,4 @@ pyexpat_ErrorString(PyObject *module, PyObject *arg) #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */ -/*[clinic end generated code: output=f5960f0528d2af18 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9f1e9a7192d29976 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index 04a987cdd4bac4..49c0e48d2e0eac 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -596,7 +596,7 @@ select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) int sizehint = -1; int flags = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -766,7 +766,7 @@ select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na int fd; unsigned int eventmask = EPOLLIN | EPOLLPRI | EPOLLOUT; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -843,7 +843,7 @@ select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t narg int fd; unsigned int eventmask; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -912,7 +912,7 @@ select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t PyObject *argsbuf[1]; int fd; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -986,7 +986,7 @@ select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *timeout_obj = Py_None; int maxevents = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1360,4 +1360,4 @@ select_kqueue_control(kqueue_queue_Object *self, PyObject *const *args, Py_ssize #ifndef SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ -/*[clinic end generated code: output=edfdade5afb19de4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f99427b75cbe6d44 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index 110df15ad448f9..b89c7e505c788e 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -121,7 +121,7 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -148,4 +148,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=9a5a3473dc1e813e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=af5a640df662066f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h index ec7ded20067096..cf4b88d52856b8 100644 --- a/Modules/clinic/sha2module.c.h +++ b/Modules/clinic/sha2module.c.h @@ -188,7 +188,7 @@ _sha2_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -262,7 +262,7 @@ _sha2_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -336,7 +336,7 @@ _sha2_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -410,7 +410,7 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *string = NULL; int usedforsecurity = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -437,4 +437,4 @@ _sha2_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject exit: return return_value; } -/*[clinic end generated code: output=7f1a0432c4f191d1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b46da764024b1764 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha3module.c.h b/Modules/clinic/sha3module.c.h index d85ab06ab448b6..738e9589503900 100644 --- a/Modules/clinic/sha3module.c.h +++ b/Modules/clinic/sha3module.c.h @@ -54,7 +54,7 @@ py_sha3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *data = NULL; int usedforsecurity = 1; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -194,4 +194,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=01eca8c0fc4ef1b5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a8e76a880d1421ec input=a9049054013a1b77]*/ diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 2969df1dea5245..1d3a143dfd8d39 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -332,7 +332,7 @@ signal_set_wakeup_fd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *fdobj; int warn_on_full_buffer = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -776,4 +776,4 @@ signal_pidfd_send_signal(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #define SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF #endif /* !defined(SIGNAL_PIDFD_SEND_SIGNAL_METHODDEF) */ -/*[clinic end generated code: output=46084b29ab9c637c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6d8e17a32cef668f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index b1d2b6d337727a..7b0a3f8d4b1cc6 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -77,7 +77,7 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) int proto = -1; PyObject *fdobj = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -286,4 +286,4 @@ _socket_socket_if_nametoindex(PySocketSockObject *self, PyObject *arg) #ifndef _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #define _SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF #endif /* !defined(_SOCKET_SOCKET_IF_NAMETOINDEX_METHODDEF) */ -/*[clinic end generated code: output=a888057b404f8d2d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6037e47b012911c5 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index 63f4d49cee0b31..77cf24ea5ba9ca 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -58,7 +58,7 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje long logopt = 0; long facility = LOG_USER; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf); if (!args) { goto exit; } @@ -262,4 +262,4 @@ syslog_LOG_UPTO(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=e26dcd1fe726a2f6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8d25899bd31969d3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index e40936783d6d46..7ff3edf5a557f8 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -63,7 +63,7 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int level = Z_DEFAULT_COMPRESSION; int wbits = MAX_WBITS; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -153,7 +153,7 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int wbits = MAX_WBITS; Py_ssize_t bufsize = DEF_BUF_SIZE; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -271,7 +271,7 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb int strategy = Z_DEFAULT_STRATEGY; Py_buffer zdict = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 6, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py int wbits = MAX_WBITS; PyObject *zdict = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -454,7 +454,7 @@ zlib_Compress_compress(compobject *self, PyTypeObject *cls, PyObject *const *arg PyObject *argsbuf[1]; Py_buffer data = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -530,7 +530,7 @@ zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -602,7 +602,7 @@ zlib_Compress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, PyObject *argsbuf[1]; int mode = Z_FINISH; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -705,7 +705,7 @@ zlib_Compress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const PyObject *argsbuf[1]; PyObject *memo; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -803,7 +803,7 @@ zlib_Decompress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *cons PyObject *argsbuf[1]; PyObject *memo; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -852,7 +852,7 @@ zlib_Decompress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args PyObject *argsbuf[1]; Py_ssize_t length = DEF_BUF_SIZE; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -938,7 +938,7 @@ zlib_ZlibDecompressor_decompress(ZlibDecompressor *self, PyObject *const *args, Py_buffer data = {NULL, NULL}; Py_ssize_t max_length = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1098,4 +1098,4 @@ zlib_crc32(PyObject *module, PyObject *const *args, Py_ssize_t nargs) #ifndef ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #define ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF #endif /* !defined(ZLIB_DECOMPRESS___DEEPCOPY___METHODDEF) */ -/*[clinic end generated code: output=7a532d89f6515797 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8bb840fb6af43dd4 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 58c68ab8c0e7fe..c748c53e1c0a75 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -50,7 +50,7 @@ bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -617,7 +617,7 @@ bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t n PyObject *table; PyObject *deletechars = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -804,7 +804,7 @@ bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -926,7 +926,7 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1303,7 +1303,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1409,7 +1409,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1522,7 +1522,7 @@ bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1616,4 +1616,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=d6770a8f30d5045f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5f861b02e3fa278b input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 493b7e92213be4..0b4b37501735c1 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -81,7 +81,7 @@ bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -247,7 +247,7 @@ bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -702,7 +702,7 @@ bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *table; PyObject *deletechars = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1063,7 +1063,7 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1156,7 +1156,7 @@ bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, P Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1269,7 +1269,7 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1334,7 +1334,7 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1384,4 +1384,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=2262747a40245e76 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d6801c6001e57f91 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index eb1cef211a8d47..68e2d7f528c061 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -223,7 +223,7 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *co_linetable = self->co_linetable; PyObject *co_exceptiontable = self->co_exceptiontable; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -451,7 +451,7 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n PyObject *argsbuf[1]; int oparg; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -464,4 +464,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=1890970a003cbd1b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d604263a3ca72a0f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 5f004360988665..58fd4e26871b4d 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -140,7 +140,7 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *r = NULL; PyObject *i = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -169,4 +169,4 @@ PyDoc_STRVAR(complex_from_number__doc__, #define COMPLEX_FROM_NUMBER_METHODDEF \ {"from_number", (PyCFunction)complex_from_number, METH_O|METH_CLASS, complex_from_number__doc__}, -/*[clinic end generated code: output=963680825c224a12 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=188438cc9ae167f7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 3a06427ab3c776..d79be80d3ec165 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -51,7 +51,7 @@ mappingproxy_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *mapping; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -141,7 +141,7 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *fdel = NULL; PyObject *doc = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -173,4 +173,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=74a4ad2f7bef2b0c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=050e331316a04207 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 55075f5104508c..09774a73c8145c 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -62,7 +62,7 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *iterable; PyObject *start = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -107,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=c8c45aca15d6d540 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5c48a9a482a52e91 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 593f4b1db6bbac..8f20bda26438cf 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -73,7 +73,7 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *closure = Py_None; PyObject *kwdefaults = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 6, 0, argsbuf); if (!fastargs) { goto exit; } @@ -115,4 +115,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=90bf8ef1757569ca input=a9049054013a1b77]*/ +/*[clinic end generated code: output=10947342188f38a9 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index c438feab433e9d..588e021fb71fd3 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -235,7 +235,7 @@ list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *keyfunc = Py_None; int reverse = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -439,4 +439,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=1a94d259d06b8847 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=854957a1d4a89bbd input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 1ce256a0860aa6..90375b9a082cca 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -48,7 +48,7 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *x = NULL; PyObject *obase = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -315,7 +315,7 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *byteorder = NULL; int is_signed = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -426,7 +426,7 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *byteorder = NULL; int is_signed = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -476,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored)) { return int_is_integer_impl(self); } -/*[clinic end generated code: output=7c25ba2c37f5ae49 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a53f5ba9a6c16737 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index 26dc82ce17da37..f199434dacb9e8 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -51,7 +51,7 @@ memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *object; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -107,7 +107,7 @@ memoryview__from_flags(PyTypeObject *type, PyObject *const *args, Py_ssize_t nar PyObject *object; int flags; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -187,7 +187,7 @@ memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t narg PyObject *format; PyObject *shape = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -294,7 +294,7 @@ memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t n Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; const char *order = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -390,7 +390,7 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *sep = NULL; int bytes_per_sep = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -413,4 +413,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=5e8841d6ba2137ad input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7e76a09106921ba2 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index baade99470e367..3c0bbe22d5ebab 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -55,7 +55,7 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) PyObject *name; PyObject *doc = Py_None; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -74,4 +74,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=b481af93ff176cb7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e8a71bfbed774c15 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index f7592823951e87..5ef5380656905a 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -54,7 +54,7 @@ OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs PyObject *seq; PyObject *value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -119,7 +119,7 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na PyObject *key; PyObject *default_value = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -185,7 +185,7 @@ OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *key; PyObject *default_value = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -248,7 +248,7 @@ OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int last = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -314,7 +314,7 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n PyObject *key; int last = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -332,4 +332,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=8a132fa582835ff3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=eff78d2a3f9379bd input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index 34fcbb04ff7c79..cec49ebccccb24 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -47,7 +47,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *arg; PyObject *dict = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -62,4 +62,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=0a357a8f8a803dc6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5bf39b3f06a34ce4 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h index 71dcf0eaa9ca05..3f439a78ded241 100644 --- a/Objects/clinic/typevarobject.c.h +++ b/Objects/clinic/typevarobject.c.h @@ -6,7 +6,7 @@ preserve # include "pycore_gc.h" // PyGC_Head # include "pycore_runtime.h" // _Py_ID() #endif -#include "pycore_modsupport.h" // _PyArg_UnpackKeywords() +#include "pycore_modsupport.h" // _PyArg_UnpackKeywordsWithVararg() PyDoc_STRVAR(typevar_new__doc__, "typevar(name, *constraints, bound=None, default=typing.NoDefault,\n" @@ -61,7 +61,7 @@ typevar_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int contravariant = 0; int infer_variance = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -236,7 +236,7 @@ paramspecargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *origin; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -290,7 +290,7 @@ paramspeckwargs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_ssize_t nargs = PyTuple_GET_SIZE(args); PyObject *origin; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -353,7 +353,7 @@ paramspec_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int contravariant = 0; int infer_variance = 0; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -524,7 +524,7 @@ typevartuple(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *name; PyObject *default_value = &_Py_NoDefaultStruct; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 0, argsbuf); if (!fastargs) { goto exit; } @@ -680,7 +680,7 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *value; PyObject *type_params = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); if (!fastargs) { goto exit; } @@ -700,4 +700,4 @@ typealias_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=682ae821936a44c1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=32b9e6ced80d3fb0 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index d5d955c97deaff..78e14b0021d006 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -246,7 +246,7 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject const char *encoding = NULL; const char *errors = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -338,7 +338,7 @@ unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int tabsize = 8; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -958,7 +958,7 @@ unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *new; Py_ssize_t count = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -1282,7 +1282,7 @@ unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1404,7 +1404,7 @@ unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *sep = Py_None; Py_ssize_t maxsplit = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1484,7 +1484,7 @@ unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int keepends = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1838,7 +1838,7 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) const char *encoding = NULL; const char *errors = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 3, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1888,4 +1888,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=8abe66fb123b96da input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9fee62bd337f809b input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 223773fe1c32c5..cef7a9496fa874 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -56,7 +56,7 @@ stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int tabsize = 8; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -321,4 +321,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=2f983f50ff6b1e99 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=06dd79019356b6bb input=a9049054013a1b77]*/ diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h index 1bb6726b396c44..fccf3d795d5340 100644 --- a/PC/clinic/_wmimodule.cpp.h +++ b/PC/clinic/_wmimodule.cpp.h @@ -55,7 +55,7 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *argsbuf[1]; PyObject *query; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -69,4 +69,4 @@ _wmi_exec_query(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj exit: return return_value; } -/*[clinic end generated code: output=25bdc78997031840 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ba04920d127f3ceb input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 07aa60f9151199..7e5545e113e718 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -351,7 +351,7 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py REGSAM access = KEY_WRITE; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -534,7 +534,7 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py REGSAM access = KEY_WOW64_64KEY; int reserved = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -966,7 +966,7 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje REGSAM access = KEY_READ; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -1083,7 +1083,7 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb REGSAM access = KEY_READ; HKEY _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf); if (!args) { goto exit; } @@ -1762,4 +1762,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) #ifndef WINREG_QUERYREFLECTIONKEY_METHODDEF #define WINREG_QUERYREFLECTIONKEY_METHODDEF #endif /* !defined(WINREG_QUERYREFLECTIONKEY_METHODDEF) */ -/*[clinic end generated code: output=896dbd1bccdedebb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1ee4098b2f143b6a input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index aa6441c4592fdf..730fa8ef2a2154 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -49,7 +49,7 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int extra_tokens; const char *encoding = NULL; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 1, 1, argsbuf); if (!fastargs) { goto exit; } @@ -80,4 +80,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6c4d4137d988ae0d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dcd6ec48f06a092e input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index d67562fb421086..98dc49db3059b1 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -74,7 +74,7 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *source = Py_None; PyTupleObject *skip_file_prefixes = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf); if (!args) { goto exit; } @@ -184,7 +184,7 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *module_globals = Py_None; PyObject *sourceobj = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 4, 8, 0, argsbuf); if (!args) { goto exit; } @@ -244,4 +244,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored)) { return warnings_filters_mutated_impl(module); } -/*[clinic end generated code: output=4f2020f0ede0871e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f2d4214c382717a6 input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index 6e3e05fa4c99be..b47279686cc2ed 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -74,7 +74,7 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *fromlist = NULL; int level = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 5, 0, argsbuf); if (!args) { goto exit; } @@ -299,7 +299,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj int optimize = -1; int feature_version = -1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 3, 6, 0, argsbuf); if (!args) { goto exit; } @@ -449,7 +449,7 @@ builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *globals = Py_None; PyObject *locals = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -528,7 +528,7 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *locals = Py_None; PyObject *closure = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf); if (!args) { goto exit; } @@ -866,7 +866,7 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *exp; PyObject *mod = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -943,7 +943,7 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *file = Py_None; int flush = 0; - fastargs = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 1, argsbuf); + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!fastargs) { goto exit; } @@ -1084,7 +1084,7 @@ builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *number; PyObject *ndigits = Py_None; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1150,7 +1150,7 @@ builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *iterable; PyObject *start = NULL; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -1235,4 +1235,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=a25d6dfbf3079304 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=76b27cf4164f257e input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 31cd7e0a7d0f17..5edeaef656ef62 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -223,7 +223,7 @@ _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *name; int withdata = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -594,7 +594,7 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb long key; Py_buffer source = {NULL, NULL}; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); if (!args) { goto exit; } @@ -623,4 +623,4 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb #ifndef _IMP_EXEC_DYNAMIC_METHODDEF #define _IMP_EXEC_DYNAMIC_METHODDEF #endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */ -/*[clinic end generated code: output=e801e47448df8e84 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dbd63707bd40b07c input=a9049054013a1b77]*/ diff --git a/Python/clinic/instruction_sequence.c.h b/Python/clinic/instruction_sequence.c.h index 616a061e3bbaab..66c2ccadfa03c9 100644 --- a/Python/clinic/instruction_sequence.c.h +++ b/Python/clinic/instruction_sequence.c.h @@ -82,7 +82,7 @@ InstructionSequenceType_use_label(_PyInstructionSequence *self, PyObject *const PyObject *argsbuf[1]; int label; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -148,7 +148,7 @@ InstructionSequenceType_addop(_PyInstructionSequence *self, PyObject *const *arg int end_lineno; int end_col_offset; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 6, 6, 0, argsbuf); if (!args) { goto exit; } @@ -255,7 +255,7 @@ InstructionSequenceType_add_nested(_PyInstructionSequence *self, PyObject *const PyObject *argsbuf[1]; PyObject *nested; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -301,4 +301,4 @@ InstructionSequenceType_get_instructions(_PyInstructionSequence *self, PyObject { return InstructionSequenceType_get_instructions_impl(self); } -/*[clinic end generated code: output=d27cfe58b6f3f332 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8809d7aa11d9b2bb input=a9049054013a1b77]*/ diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index 75be65f816bf9b..c19a3ed5050ed3 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -70,7 +70,7 @@ marshal_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject int version = Py_MARSHAL_VERSION; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf); if (!args) { goto exit; } @@ -157,7 +157,7 @@ marshal_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *file; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -234,7 +234,7 @@ marshal_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec int version = Py_MARSHAL_VERSION; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf); if (!args) { goto exit; } @@ -314,7 +314,7 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec Py_buffer bytes = {NULL, NULL}; int allow_code = 1; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -339,4 +339,4 @@ marshal_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec return return_value; } -/*[clinic end generated code: output=8f25dc60e1f525c8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1575b9a3ae48ad3d input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index 9316f8a2d30587..8277d286cf51ef 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -52,7 +52,7 @@ sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *argsbuf[1]; PyObject *hook; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -561,7 +561,7 @@ sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, PyObject *argsbuf[1]; int depth; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -862,7 +862,7 @@ sys_set_int_max_str_digits(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *argsbuf[1]; int maxdigits; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1013,7 +1013,7 @@ sys_getunicodeinternedsize(PyObject *module, PyObject *const *args, Py_ssize_t n int _only_immortal = 0; Py_ssize_t _return_value; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf); if (!args) { goto exit; } @@ -1479,7 +1479,7 @@ sys__getframemodulename(PyObject *module, PyObject *const *args, Py_ssize_t narg Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0; int depth = 0; - args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, 0, argsbuf); + args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 1, 0, argsbuf); if (!args) { goto exit; } @@ -1614,4 +1614,4 @@ sys__is_gil_enabled(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=fdec7ddc2508d65f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9cc9069aef1482bc input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index 6a6d40b3e0f5b3..fe53a2786d1ad6 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -55,7 +55,7 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) int tb_lasti; int tb_lineno; - fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, 0, argsbuf); + fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 4, 4, 0, argsbuf); if (!fastargs) { goto exit; } @@ -78,4 +78,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=a82471b667511d1d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=916a759875507c5a input=a9049054013a1b77]*/ diff --git a/Python/getargs.c b/Python/getargs.c index 115257996f7234..d7104e2bb806a0 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2308,10 +2308,8 @@ vgetargskeywordsfast(PyObject *args, PyObject *keywords, } -#undef _PyArg_UnpackKeywords - PyObject * const * -_PyArg_UnpackKeywords(PyObject *const *args, Py_ssize_t nargs, +_PyArg_UnpackKeywordsEx(PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs, PyObject *kwnames, struct _PyArg_Parser *parser, int minpos, int maxpos, int minkw, int varpos, diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index ee43f931146842..2c99600fa5bd36 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -662,11 +662,15 @@ def parse_general(self, clang: CLanguage) -> None: use_parser_code = False self.fastcall = False else: - self.codegen.add_include('pycore_modsupport.h', - '_PyArg_UnpackKeywords()') if not self.varpos: + self.codegen.add_include('pycore_modsupport.h', + '_PyArg_UnpackKeywords()') + unpack_func = '_PyArg_UnpackKeywords' nargs = "nargs" else: + self.codegen.add_include('pycore_modsupport.h', + '_PyArg_UnpackKeywordsWithVararg()') + unpack_func = '_PyArg_UnpackKeywordsWithVararg' nargs = f"Py_MIN(nargs, {self.max_pos})" if self.max_pos else "0" if self.fastcall: @@ -698,10 +702,9 @@ def parse_general(self, clang: CLanguage) -> None: self.declarations += "\nPy_ssize_t noptargs = %s + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - %d;" % (nargs, self.min_pos + self.min_kw_only) unpack_args = '_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL' unpack_args += (f', &_parser, {self.min_pos}, {self.max_pos}, ' - f'{self.min_kw_only}, ' - f'{int(self.varpos is not None)}, argsbuf') + f'{self.min_kw_only}, argsbuf') parser_code = [libclinic.normalize_snippet(f""" - {argsname} = _PyArg_UnpackKeywords({unpack_args}); + {argsname} = {unpack_func}({unpack_args}); if (!{argsname}) {{{{ goto exit; }}}} From a9396c4a4a7b7c9cc5a65d08d5e931fb94464eb9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 13 Aug 2024 11:34:07 +0300 Subject: [PATCH 07/14] Remove optimization for single var-positional parameter. --- Lib/test/test_clinic.py | 2 +- Modules/_testclinic.c | 8 +- Modules/clinic/_testclinic.c.h | 50 ++++++++- Modules/clinic/gcmodule.c.h | 51 +++++++++- Modules/gcmodule.c | 8 +- Objects/clinic/setobject.c.h | 147 +++++++++++++++++++++++++-- Objects/setobject.c | 26 ++--- Tools/clinic/libclinic/parse_args.py | 22 ---- 8 files changed, 257 insertions(+), 57 deletions(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 94e79222934c7a..686a1644995c04 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -2694,7 +2694,7 @@ def test_cli_force(self): # Verify by checking the checksum. checksum = ( "/*[clinic end generated code: " - "output=843576e3ffe85e2d input=9543a8d2da235301]*/\n" + "output=0acbef4794cb933e input=9543a8d2da235301]*/\n" ) with open(fn, encoding='utf-8') as f: generated = f.read() diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index 025e2fe8dabd80..5d0b3bd4177a6f 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -970,8 +970,8 @@ varpos [clinic start generated code]*/ static PyObject * -varpos(PyObject *module, PyObject *args) -/*[clinic end generated code: output=174bb88a5a80ed51 input=f87cd674145d394c]*/ +varpos_impl(PyObject *module, PyObject *args) +/*[clinic end generated code: output=7b0b9545872bdca4 input=f87cd674145d394c]*/ { return Py_NewRef(args); } @@ -1176,8 +1176,8 @@ Proof-of-concept of GH-99233 refcount error bug. [clinic start generated code]*/ static PyObject * -gh_99233_refcount(PyObject *module, PyObject *args) -/*[clinic end generated code: output=4a8facb62b9a98bb input=eecfdc2092d90dc3]*/ +gh_99233_refcount_impl(PyObject *module, PyObject *args) +/*[clinic end generated code: output=585855abfbca9a7f input=eecfdc2092d90dc3]*/ { Py_RETURN_NONE; } diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index 1f4e6f8b8f10ff..b2db377023f2e6 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -2528,7 +2528,29 @@ PyDoc_STRVAR(varpos__doc__, "\n"); #define VARPOS_METHODDEF \ - {"varpos", (PyCFunction)varpos, METH_VARARGS, varpos__doc__}, + {"varpos", _PyCFunction_CAST(varpos), METH_FASTCALL, varpos__doc__}, + +static PyObject * +varpos_impl(PyObject *module, PyObject *args); + +static PyObject * +varpos(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = varpos_impl(module, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(posonly_varpos__doc__, "posonly_varpos($module, a, b, /, *args)\n" @@ -3211,7 +3233,29 @@ PyDoc_STRVAR(gh_99233_refcount__doc__, "Proof-of-concept of GH-99233 refcount error bug."); #define GH_99233_REFCOUNT_METHODDEF \ - {"gh_99233_refcount", (PyCFunction)gh_99233_refcount, METH_VARARGS, gh_99233_refcount__doc__}, + {"gh_99233_refcount", _PyCFunction_CAST(gh_99233_refcount), METH_FASTCALL, gh_99233_refcount__doc__}, + +static PyObject * +gh_99233_refcount_impl(PyObject *module, PyObject *args); + +static PyObject * +gh_99233_refcount(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = gh_99233_refcount_impl(module, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(gh_99240_double_free__doc__, "gh_99240_double_free($module, a, b, /)\n" @@ -3765,4 +3809,4 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=9c2c00c640588af7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fa10ab215bdd6259 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index bed4b82e0053af..fe42131d8413c5 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -8,6 +8,7 @@ preserve #endif #include "pycore_abstract.h" // _Py_convert_optional_to_ssize_t() #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() +#include "pycore_tuple.h" // _PyTuple_FromArray() PyDoc_STRVAR(gc_enable__doc__, "enable($module, /)\n" @@ -309,7 +310,29 @@ PyDoc_STRVAR(gc_get_referrers__doc__, "Return the list of objects that directly refer to any of \'objs\'."); #define GC_GET_REFERRERS_METHODDEF \ - {"get_referrers", (PyCFunction)gc_get_referrers, METH_VARARGS, gc_get_referrers__doc__}, + {"get_referrers", _PyCFunction_CAST(gc_get_referrers), METH_FASTCALL, gc_get_referrers__doc__}, + +static PyObject * +gc_get_referrers_impl(PyObject *module, PyObject *args); + +static PyObject * +gc_get_referrers(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = gc_get_referrers_impl(module, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(gc_get_referents__doc__, "get_referents($module, /, *objs)\n" @@ -318,7 +341,29 @@ PyDoc_STRVAR(gc_get_referents__doc__, "Return the list of objects that are directly referred to by \'objs\'."); #define GC_GET_REFERENTS_METHODDEF \ - {"get_referents", (PyCFunction)gc_get_referents, METH_VARARGS, gc_get_referents__doc__}, + {"get_referents", _PyCFunction_CAST(gc_get_referents), METH_FASTCALL, gc_get_referents__doc__}, + +static PyObject * +gc_get_referents_impl(PyObject *module, PyObject *args); + +static PyObject * +gc_get_referents(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = gc_get_referents_impl(module, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(gc_get_objects__doc__, "get_objects($module, /, generation=None)\n" @@ -533,4 +578,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=84873dc5565cc70e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=29b60bfc31906600 input=a9049054013a1b77]*/ diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 4fbdf9052816f3..57e4aae9ed557e 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -221,8 +221,8 @@ Return the list of objects that directly refer to any of 'objs'. [clinic start generated code]*/ static PyObject * -gc_get_referrers(PyObject *module, PyObject *args) -/*[clinic end generated code: output=e11e352b7e0cdce0 input=bae96961b14a0922]*/ +gc_get_referrers_impl(PyObject *module, PyObject *args) +/*[clinic end generated code: output=296a09587f6a86b5 input=bae96961b14a0922]*/ { if (PySys_Audit("gc.get_referrers", "(O)", args) < 0) { return NULL; @@ -269,8 +269,8 @@ Return the list of objects that are directly referred to by 'objs'. [clinic start generated code]*/ static PyObject * -gc_get_referents(PyObject *module, PyObject *args) -/*[clinic end generated code: output=9efb544e74953e38 input=b3ceab0c34038cbf]*/ +gc_get_referents_impl(PyObject *module, PyObject *args) +/*[clinic end generated code: output=d47dc02cefd06fe8 input=b3ceab0c34038cbf]*/ { if (PySys_Audit("gc.get_referents", "(O)", args) < 0) { return NULL; diff --git a/Objects/clinic/setobject.c.h b/Objects/clinic/setobject.c.h index 7b55a67f7b81b0..b57b96f9d26f7e 100644 --- a/Objects/clinic/setobject.c.h +++ b/Objects/clinic/setobject.c.h @@ -3,6 +3,7 @@ preserve [clinic start generated code]*/ #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() +#include "pycore_tuple.h" // _PyTuple_FromArray() PyDoc_STRVAR(set_pop__doc__, "pop($self, /)\n" @@ -37,7 +38,29 @@ PyDoc_STRVAR(set_update__doc__, "Update the set, adding elements from all others."); #define SET_UPDATE_METHODDEF \ - {"update", (PyCFunction)set_update, METH_VARARGS, set_update__doc__}, + {"update", _PyCFunction_CAST(set_update), METH_FASTCALL, set_update__doc__}, + +static PyObject * +set_update_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_update(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_update_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_copy__doc__, "copy($self, /)\n" @@ -118,7 +141,29 @@ PyDoc_STRVAR(set_union__doc__, "Return a new set with elements from the set and all others."); #define SET_UNION_METHODDEF \ - {"union", (PyCFunction)set_union, METH_VARARGS, set_union__doc__}, + {"union", _PyCFunction_CAST(set_union), METH_FASTCALL, set_union__doc__}, + +static PyObject * +set_union_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_union(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_union_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_intersection_multi__doc__, "intersection($self, /, *others)\n" @@ -127,7 +172,29 @@ PyDoc_STRVAR(set_intersection_multi__doc__, "Return a new set with elements common to the set and all others."); #define SET_INTERSECTION_MULTI_METHODDEF \ - {"intersection", (PyCFunction)set_intersection_multi, METH_VARARGS, set_intersection_multi__doc__}, + {"intersection", _PyCFunction_CAST(set_intersection_multi), METH_FASTCALL, set_intersection_multi__doc__}, + +static PyObject * +set_intersection_multi_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_intersection_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_intersection_multi_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_intersection_update_multi__doc__, "intersection_update($self, /, *others)\n" @@ -136,7 +203,29 @@ PyDoc_STRVAR(set_intersection_update_multi__doc__, "Update the set, keeping only elements found in it and all others."); #define SET_INTERSECTION_UPDATE_MULTI_METHODDEF \ - {"intersection_update", (PyCFunction)set_intersection_update_multi, METH_VARARGS, set_intersection_update_multi__doc__}, + {"intersection_update", _PyCFunction_CAST(set_intersection_update_multi), METH_FASTCALL, set_intersection_update_multi__doc__}, + +static PyObject * +set_intersection_update_multi_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_intersection_update_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_intersection_update_multi_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_isdisjoint__doc__, "isdisjoint($self, other, /)\n" @@ -169,7 +258,29 @@ PyDoc_STRVAR(set_difference_update__doc__, "Update the set, removing elements found in others."); #define SET_DIFFERENCE_UPDATE_METHODDEF \ - {"difference_update", (PyCFunction)set_difference_update, METH_VARARGS, set_difference_update__doc__}, + {"difference_update", _PyCFunction_CAST(set_difference_update), METH_FASTCALL, set_difference_update__doc__}, + +static PyObject * +set_difference_update_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_difference_update(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_difference_update_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_difference_multi__doc__, "difference($self, /, *others)\n" @@ -178,7 +289,29 @@ PyDoc_STRVAR(set_difference_multi__doc__, "Return a new set with elements in the set that are not in the others."); #define SET_DIFFERENCE_MULTI_METHODDEF \ - {"difference", (PyCFunction)set_difference_multi, METH_VARARGS, set_difference_multi__doc__}, + {"difference", _PyCFunction_CAST(set_difference_multi), METH_FASTCALL, set_difference_multi__doc__}, + +static PyObject * +set_difference_multi_impl(PySetObject *so, PyObject *args); + +static PyObject * +set_difference_multi(PySetObject *so, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *__clinic_args = NULL; + + __clinic_args = _PyTuple_FromArray(args, nargs); + if (__clinic_args == NULL) { + goto exit; + } + return_value = set_difference_multi_impl(so, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} PyDoc_STRVAR(set_symmetric_difference_update__doc__, "symmetric_difference_update($self, other, /)\n" @@ -411,4 +544,4 @@ set___sizeof__(PySetObject *so, PyObject *Py_UNUSED(ignored)) return return_value; } -/*[clinic end generated code: output=730d916d496cb8b7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=83ffa2b5a786e53d input=a9049054013a1b77]*/ diff --git a/Objects/setobject.c b/Objects/setobject.c index cf3a41430393e6..c5f96d25585fa4 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1054,8 +1054,8 @@ Update the set, adding elements from all others. [clinic start generated code]*/ static PyObject * -set_update(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=b3516a6b8873ab3d input=df4fe486e38cd337]*/ +set_update_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=34f6371704974c8a input=df4fe486e38cd337]*/ { Py_ssize_t i; @@ -1283,8 +1283,8 @@ Return a new set with elements from the set and all others. [clinic start generated code]*/ static PyObject * -set_union(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=18a3fb9e0825f1e5 input=ddf088706e9577b2]*/ +set_union_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=2c83d05a446a1477 input=ddf088706e9577b2]*/ { PySetObject *result; PyObject *other; @@ -1432,8 +1432,8 @@ Return a new set with elements common to the set and all others. [clinic start generated code]*/ static PyObject * -set_intersection_multi(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=afd6705c675015e6 input=0d9f3805ccbba6a4]*/ +set_intersection_multi_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=2406ef3387adbe2f input=0d9f3805ccbba6a4]*/ { Py_ssize_t i; @@ -1479,12 +1479,12 @@ Update the set, keeping only elements found in it and all others. [clinic start generated code]*/ static PyObject * -set_intersection_update_multi(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=9a7a88d756f4a487 input=223c1e086aa669a9]*/ +set_intersection_update_multi_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=251c1f729063609d input=223c1e086aa669a9]*/ { PyObject *tmp; - tmp = set_intersection_multi(so, args); + tmp = set_intersection_multi_impl(so, args); if (tmp == NULL) return NULL; Py_BEGIN_CRITICAL_SECTION(so); @@ -1666,8 +1666,8 @@ Update the set, removing elements found in others. [clinic start generated code]*/ static PyObject * -set_difference_update(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=3772a59f66245bfe input=024e6baa6fbcbb3d]*/ +set_difference_update_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=28685b2fc63e41c4 input=024e6baa6fbcbb3d]*/ { Py_ssize_t i; @@ -1783,8 +1783,8 @@ Return a new set with elements in the set that are not in the others. [clinic start generated code]*/ static PyObject * -set_difference_multi(PySetObject *so, PyObject *args) -/*[clinic end generated code: output=fd1ef7ff9566b605 input=ba78ea5f099e58df]*/ +set_difference_multi_impl(PySetObject *so, PyObject *args) +/*[clinic end generated code: output=3130c3bb3cac873d input=ba78ea5f099e58df]*/ { Py_ssize_t i; PyObject *result, *other; diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 2c99600fa5bd36..650bed5f2391de 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -290,12 +290,6 @@ def use_meth_o(self) -> bool: and not self.requires_defining_class and not self.is_new_or_init()) - def use_meth_varargs(self) -> bool: - return (not self.parameters - and self.varpos is not None - and not self.requires_defining_class - and not self.is_new_or_init()) - def use_simple_return(self) -> bool: return (self.func.return_converter.type == 'PyObject *' and not self.func.critical_section) @@ -446,20 +440,6 @@ def parse_one_arg(self) -> None: parser_code = libclinic.normalize_snippet(parsearg, indent=4) self.parser_body(parser_code) - def parse_varpos_only(self) -> None: - self.flags = "METH_VARARGS" - if self.use_simple_return(): - # maps perfectly to METH_VARARGS, doesn't need a return converter. - # so we skip making a parse function - # and call directly into the impl function. - self.impl_prototype = '' - self.impl_definition = METH_O_PROTOTYPE - else: - # SLIGHT HACK - # use impl_parameters for the parser here! - self.parser_prototype = METH_O_PROTOTYPE - self.parser_body() - def parse_option_groups(self) -> None: # positional parameters with option groups # (we have to generate lots of PyArg_ParseTuple calls @@ -978,8 +958,6 @@ def parse_args(self, clang: CLanguage) -> dict[str, str]: self.parse_no_args() elif self.use_meth_o(): self.parse_one_arg() - elif self.use_meth_varargs(): - self.parse_varpos_only() elif self.has_option_groups(): self.parse_option_groups() elif (not self.requires_defining_class From 6d9ee489880669895a595dbd1e31f451e2687e38 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 20 Aug 2024 20:56:53 +0300 Subject: [PATCH 08/14] Fix compilation on Windows. --- Modules/clinic/_testclinic.c.h | 4 ++-- Tools/clinic/libclinic/parse_args.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index b2db377023f2e6..c6133a3a2e6410 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -3733,7 +3733,7 @@ _testclinic_TestClass_defclass_varpos(PyObject *self, PyTypeObject *cls, PyObjec .kwtuple = KWTUPLE, }; #undef KWTUPLE - PyObject *argsbuf[0]; + PyObject *argsbuf[1]; PyObject * const *fastargs; PyObject *__clinic_args = NULL; @@ -3809,4 +3809,4 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=fa10ab215bdd6259 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e4717fe7fdaf5cf3 input=a9049054013a1b77]*/ diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 650bed5f2391de..edf13e9f958421 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -657,7 +657,7 @@ def parse_general(self, clang: CLanguage) -> None: self.flags = "METH_FASTCALL|METH_KEYWORDS" self.parser_prototype = PARSER_PROTOTYPE_FASTCALL_KEYWORDS self.declarations = declare_parser(self.func, codegen=self.codegen) - self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters) + self.declarations += "\nPyObject *argsbuf[%s];" % (len(self.converters) or 1) if self.varpos: self.declarations += "\nPyObject * const *fastargs;" argsname = 'fastargs' @@ -675,7 +675,7 @@ def parse_general(self, clang: CLanguage) -> None: argsname = 'fastargs' argname_fmt = 'fastargs[%d]' self.declarations = declare_parser(self.func, codegen=self.codegen) - self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters) + self.declarations += "\nPyObject *argsbuf[%s];" % (len(self.converters) or 1) self.declarations += "\nPyObject * const *fastargs;" self.declarations += "\nPy_ssize_t nargs = PyTuple_GET_SIZE(args);" if has_optional_kw: From b6c4c3a211f8b15f50cd8055376b8c25751aa66f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 17:36:06 +0200 Subject: [PATCH 09/14] Remove debugging remnant. --- Tools/clinic/libclinic/parse_args.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 577e3e4782a78b..34adb6bc25d0a8 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -249,7 +249,6 @@ def __init__(self, func: Function, codegen: CodeGen) -> None: for i, p in enumerate(self.parameters): if p.is_vararg(): self.varpos = p - #print('varpos', id(p), p) del self.parameters[i] break From cb835fece45a3471bbeb95ae9b082b188bbd854c Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 18:39:08 +0200 Subject: [PATCH 10/14] Add tests for no-fastcall. --- Lib/test/test_clinic.py | 35 ++++++++ Modules/_testclinic.c | 88 +++++++++++++++++- Modules/clinic/_testclinic.c.h | 159 ++++++++++++++++++++++++++++++++- 3 files changed, 279 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 686a1644995c04..38e5f7501df3de 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -3384,6 +3384,12 @@ def test_varpos(self): self.assertEqual(fn(), ()) self.assertEqual(fn(1, 2), (1, 2)) + def test_varpos_no_fastcall(self): + # fn(*args), no fastcall + fn = ac_tester.TestClass.varpos_no_fastcall + self.assertEqual(fn(), ()) + self.assertEqual(fn(1, 2), (1, 2)) + def test_posonly_varpos(self): # fn(a, b, /, *args) fn = ac_tester.posonly_varpos @@ -3393,6 +3399,15 @@ def test_posonly_varpos(self): self.assertEqual(fn(1, 2), (1, 2, ())) self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_varpos_no_fastcall(self): + # fn(a, b, /, *args), no fastcall + fn = ac_tester.TestClass.posonly_varpos_no_fastcall + self.assertRaises(TypeError, fn) + self.assertRaises(TypeError, fn, 1) + self.assertRaises(TypeError, fn, 1, b=2) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_req_opt_varpos(self): # fn(a, b=False, /, *args) fn = ac_tester.posonly_req_opt_varpos @@ -3402,6 +3417,15 @@ def test_posonly_req_opt_varpos(self): self.assertEqual(fn(1, 2), (1, 2, ())) self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_req_opt_varpos_no_fastcall(self): + # fn(a, b=False, /, *args), no fastcall + fn = ac_tester.TestClass.posonly_req_opt_varpos_no_fastcall + self.assertRaises(TypeError, fn) + self.assertRaises(TypeError, fn, a=1) + self.assertEqual(fn(1), (1, False, ())) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + def test_posonly_poskw_varpos(self): # fn(a, /, b, *args) fn = ac_tester.posonly_poskw_varpos @@ -3413,6 +3437,17 @@ def test_posonly_poskw_varpos(self): errmsg = re.escape("given by name ('b') and position (2)") self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) + def test_posonly_poskw_varpos_no_fastcall(self): + # fn(a, /, b, *args), no fastcall + fn = ac_tester.TestClass.posonly_poskw_varpos_no_fastcall + self.assertRaises(TypeError, fn) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, b=2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + self.assertRaises(TypeError, fn, b=4) + errmsg = re.escape("given by name ('b') and position (2)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) + def test_poskw_varpos(self): # fn(a, *args) fn = ac_tester.poskw_varpos diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index 5d0b3bd4177a6f..f379d637609571 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -1287,9 +1287,9 @@ clone_with_conv_f2_impl(PyObject *module, custom_t path) /*[clinic input] -class _testclinic.TestClass "PyObject *" "PyObject" +class _testclinic.TestClass "PyObject *" "&PyBaseObject_Type" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=668a591c65bec947]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=c991635bb3c91f1a]*/ /*[clinic input] _testclinic.TestClass.get_defining_class @@ -1352,11 +1352,95 @@ _testclinic_TestClass_defclass_posonly_varpos_impl(PyObject *self, return pack_arguments_newref(4, cls, a, b, args); } +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as varpos_no_fastcall + + *args: object + +[clinic start generated code]*/ + +static PyObject * +varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args) +/*[clinic end generated code: output=04e94f2898bb2dde input=b0447ebab3e81001]*/ +{ + return Py_NewRef(args); +} + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_varpos_no_fastcall + + a: object + b: object + / + *args: object + +[clinic start generated code]*/ + +static PyObject * +posonly_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, PyObject *b, + PyObject *args) +/*[clinic end generated code: output=b0a0425719f69f5a input=d2ec37a06b3c2389]*/ +{ + return pack_arguments_newref(3, a, b, args); +} + + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_req_opt_varpos_no_fastcall + + a: object + b: object = False + / + *args: object + +[clinic start generated code]*/ + +static PyObject * +posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject *args) +/*[clinic end generated code: output=3c44915b1a554e2d input=e9e74686a5e6a06d]*/ +{ + return pack_arguments_newref(3, a, b, args); +} + + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_poskw_varpos_no_fastcall + + a: object + / + b: object + *args: object + +[clinic start generated code]*/ + +static PyObject * +posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject *args) +/*[clinic end generated code: output=6ad74bed4bdc7f96 input=fa931c38184213aa]*/ +{ + return pack_arguments_newref(3, a, b, args); +} + static struct PyMethodDef test_class_methods[] = { _TESTCLINIC_TESTCLASS_GET_DEFINING_CLASS_METHODDEF _TESTCLINIC_TESTCLASS_GET_DEFINING_CLASS_ARG_METHODDEF _TESTCLINIC_TESTCLASS_DEFCLASS_VARPOS_METHODDEF _TESTCLINIC_TESTCLASS_DEFCLASS_POSONLY_VARPOS_METHODDEF + + {"varpos_no_fastcall", _PyCFunction_CAST(varpos_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_varpos_no_fastcall", _PyCFunction_CAST(posonly_varpos_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_req_opt_varpos_no_fastcall", _PyCFunction_CAST(posonly_req_opt_varpos_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_poskw_varpos_no_fastcall", _PyCFunction_CAST(posonly_poskw_varpos_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {NULL, NULL} }; diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index c6133a3a2e6410..97b0786ebb41b8 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -3809,4 +3809,161 @@ _testclinic_TestClass_defclass_posonly_varpos(PyObject *self, PyTypeObject *cls, return return_value; } -/*[clinic end generated code: output=e4717fe7fdaf5cf3 input=a9049054013a1b77]*/ + +static PyObject * +varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args); + +static PyObject * +varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject *__clinic_args = NULL; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + __clinic_args = Py_NewRef(args); + return_value = varpos_no_fastcall_impl(type, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} + +static PyObject * +posonly_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, PyObject *b, + PyObject *args); + +static PyObject * +posonly_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject *a; + PyObject *b; + PyObject *__clinic_args = NULL; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) { + goto exit; + } + a = PyTuple_GET_ITEM(args, 0); + b = PyTuple_GET_ITEM(args, 1); + __clinic_args = PyTuple_GetSlice(args, 2, PY_SSIZE_T_MAX); + if (!__clinic_args) { + goto exit; + } + return_value = posonly_varpos_no_fastcall_impl(type, a, b, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} + +static PyObject * +posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject *args); + +static PyObject * +posonly_req_opt_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject *a; + PyObject *b = Py_False; + PyObject *__clinic_args = NULL; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) { + goto exit; + } + a = PyTuple_GET_ITEM(args, 0); + if (PyTuple_GET_SIZE(args) < 2) { + goto skip_optional; + } + b = PyTuple_GET_ITEM(args, 1); +skip_optional: + __clinic_args = PyTuple_GetSlice(args, 2, PY_SSIZE_T_MAX); + if (!__clinic_args) { + goto exit; + } + return_value = posonly_req_opt_varpos_no_fastcall_impl(type, a, b, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} + +static PyObject * +posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject *args); + +static PyObject * +posonly_poskw_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + + #define NUM_KEYWORDS 1 + static struct { + PyGC_Head _this_is_not_used; + PyObject_VAR_HEAD + PyObject *ob_item[NUM_KEYWORDS]; + } _kwtuple = { + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_item = { _Py_LATIN1_CHR('b'), }, + }; + #undef NUM_KEYWORDS + #define KWTUPLE (&_kwtuple.ob_base.ob_base) + + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE + + static const char * const _keywords[] = {"", "b", NULL}; + static _PyArg_Parser _parser = { + .keywords = _keywords, + .fname = "TestClass", + .kwtuple = KWTUPLE, + }; + #undef KWTUPLE + PyObject *argsbuf[2]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + PyObject *a; + PyObject *b; + PyObject *__clinic_args = NULL; + + fastargs = _PyArg_UnpackKeywordsWithVararg(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + b = fastargs[1]; + __clinic_args = PyTuple_GetSlice(args, 2, PY_SSIZE_T_MAX); + if (!__clinic_args) { + goto exit; + } + return_value = posonly_poskw_varpos_no_fastcall_impl(type, a, b, __clinic_args); + +exit: + /* Cleanup for args */ + Py_XDECREF(__clinic_args); + + return return_value; +} +/*[clinic end generated code: output=60ab26511f9eeac1 input=a9049054013a1b77]*/ From 951fa05c420db06eac561911446aa799bbbd4bfd Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 19:30:24 +0200 Subject: [PATCH 11/14] Add tests for the array converter. --- Lib/test/test_clinic.py | 125 +++++------ Modules/_testclinic.c | 193 ++++++++++++++++ Modules/clinic/_testclinic.c.h | 314 ++++++++++++++++++++++++++- Tools/clinic/libclinic/parse_args.py | 11 +- 4 files changed, 569 insertions(+), 74 deletions(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 38e5f7501df3de..a4317a3ad468d8 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -33,6 +33,15 @@ from libclinic.cli import parse_file, Clinic +def repeat_fn(*functions): + def wrapper(test): + def wrapped(self): + for fn in functions: + with self.subTest(fn=fn): + test(self, fn) + return wrapped + return wrapper + def _make_clinic(*, filename='clinic_tests', limited_capi=False): clang = CLanguage(filename) c = Clinic(clang, filename=filename, limited_capi=limited_capi) @@ -3378,75 +3387,53 @@ def test_keyword_only_parameter(self): ac_tester.keyword_only_parameter(1) self.assertEqual(ac_tester.keyword_only_parameter(a=1), (1,)) - def test_varpos(self): - # fn(*args) - fn = ac_tester.varpos - self.assertEqual(fn(), ()) - self.assertEqual(fn(1, 2), (1, 2)) - - def test_varpos_no_fastcall(self): - # fn(*args), no fastcall - fn = ac_tester.TestClass.varpos_no_fastcall - self.assertEqual(fn(), ()) - self.assertEqual(fn(1, 2), (1, 2)) - - def test_posonly_varpos(self): - # fn(a, b, /, *args) - fn = ac_tester.posonly_varpos - self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, 1) - self.assertRaises(TypeError, fn, 1, b=2) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - - def test_posonly_varpos_no_fastcall(self): - # fn(a, b, /, *args), no fastcall - fn = ac_tester.TestClass.posonly_varpos_no_fastcall - self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, 1) - self.assertRaises(TypeError, fn, 1, b=2) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - - def test_posonly_req_opt_varpos(self): - # fn(a, b=False, /, *args) - fn = ac_tester.posonly_req_opt_varpos - self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, a=1) - self.assertEqual(fn(1), (1, False, ())) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - - def test_posonly_req_opt_varpos_no_fastcall(self): - # fn(a, b=False, /, *args), no fastcall - fn = ac_tester.TestClass.posonly_req_opt_varpos_no_fastcall - self.assertRaises(TypeError, fn) - self.assertRaises(TypeError, fn, a=1) - self.assertEqual(fn(1), (1, False, ())) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - - def test_posonly_poskw_varpos(self): - # fn(a, /, b, *args) - fn = ac_tester.posonly_poskw_varpos - self.assertRaises(TypeError, fn) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, b=2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - self.assertRaises(TypeError, fn, b=4) - errmsg = re.escape("given by name ('b') and position (2)") - self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) - - def test_posonly_poskw_varpos_no_fastcall(self): - # fn(a, /, b, *args), no fastcall - fn = ac_tester.TestClass.posonly_poskw_varpos_no_fastcall - self.assertRaises(TypeError, fn) - self.assertEqual(fn(1, 2), (1, 2, ())) - self.assertEqual(fn(1, b=2), (1, 2, ())) - self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) - self.assertRaises(TypeError, fn, b=4) - errmsg = re.escape("given by name ('b') and position (2)") - self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) + if ac_tester is not None: + @repeat_fn(ac_tester.varpos, + ac_tester.varpos_array, + ac_tester.TestClass.varpos_no_fastcall, + ac_tester.TestClass.varpos_array_no_fastcall) + def test_varpos(self, fn): + # fn(*args) + self.assertEqual(fn(), ()) + self.assertEqual(fn(1, 2), (1, 2)) + + @repeat_fn(ac_tester.posonly_varpos, + ac_tester.posonly_varpos_array, + ac_tester.TestClass.posonly_varpos_no_fastcall, + ac_tester.TestClass.posonly_varpos_array_no_fastcall) + def test_posonly_varpos(self, fn): + # fn(a, b, /, *args) + self.assertRaises(TypeError, fn) + self.assertRaises(TypeError, fn, 1) + self.assertRaises(TypeError, fn, 1, b=2) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + + @repeat_fn(ac_tester.posonly_req_opt_varpos, + ac_tester.posonly_req_opt_varpos_array, + ac_tester.TestClass.posonly_req_opt_varpos_no_fastcall, + ac_tester.TestClass.posonly_req_opt_varpos_array_no_fastcall) + def test_posonly_req_opt_varpos(self, fn): + # fn(a, b=False, /, *args) + self.assertRaises(TypeError, fn) + self.assertRaises(TypeError, fn, a=1) + self.assertEqual(fn(1), (1, False, ())) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + + @repeat_fn(ac_tester.posonly_poskw_varpos, + ac_tester.posonly_poskw_varpos_array, + ac_tester.TestClass.posonly_poskw_varpos_no_fastcall, + ac_tester.TestClass.posonly_poskw_varpos_array_no_fastcall) + def test_posonly_poskw_varpos(self, fn): + # fn(a, /, b, *args) + self.assertRaises(TypeError, fn) + self.assertEqual(fn(1, 2), (1, 2, ())) + self.assertEqual(fn(1, b=2), (1, 2, ())) + self.assertEqual(fn(1, 2, 3, 4), (1, 2, (3, 4))) + self.assertRaises(TypeError, fn, b=4) + errmsg = re.escape("given by name ('b') and position (2)") + self.assertRaisesRegex(TypeError, errmsg, fn, 1, 2, 3, b=4) def test_poskw_varpos(self): # fn(a, *args) diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index f379d637609571..320c8ddf214dcd 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -58,6 +58,21 @@ pack_arguments_newref(int argc, ...) return tuple; } +static PyObject * +pack_arguments_2pos_varpos(PyObject *a, PyObject *b, + PyObject * const *args, Py_ssize_t args_length) +/*[clinic end generated code: output=267032f41bd039cc input=86ee3064b7853e86]*/ +{ + PyObject *tuple = _PyTuple_FromArray(args, args_length); + if (tuple == NULL) { + return NULL; + } + PyObject *result = pack_arguments_newref(3, a, b, tuple); + Py_DECREF(tuple); + return result; +} + + /* Pack arguments to a tuple. * `wrapper` is function which converts primitive type to PyObject. * `arg_type` is type that arguments should be converted to before wrapped. */ @@ -1123,6 +1138,81 @@ varpos_kwonly_req_opt_impl(PyObject *module, PyObject *args, PyObject *a, } +/*[clinic input] +varpos_array + + *args: array + +[clinic start generated code]*/ + +static PyObject * +varpos_array_impl(PyObject *module, PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=a25f42f39c9b13ad input=97b8bdcf87e019c7]*/ +{ + return _PyTuple_FromArray(args, args_length); +} + + +/*[clinic input] +posonly_varpos_array + + a: object + b: object + / + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, Py_ssize_t args_length) +/*[clinic end generated code: output=267032f41bd039cc input=86ee3064b7853e86]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + + +/*[clinic input] +posonly_req_opt_varpos_array + + a: object + b: object = False + / + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_req_opt_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=f2f93c77ead93699 input=b01d7728164fd93e]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + + +/*[clinic input] +posonly_poskw_varpos_array + + a: object + / + b: object + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_poskw_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=155811a8b2d65a12 input=5fb08cdc6afb9d7c]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + + /*[clinic input] gh_32092_oob @@ -1352,6 +1442,7 @@ _testclinic_TestClass_defclass_posonly_varpos_impl(PyObject *self, return pack_arguments_newref(4, cls, a, b, args); } + /*[clinic input] @classmethod _testclinic.TestClass.__new__ as varpos_no_fastcall @@ -1367,6 +1458,7 @@ varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args) return Py_NewRef(args); } + /*[clinic input] @classmethod _testclinic.TestClass.__new__ as posonly_varpos_no_fastcall @@ -1426,6 +1518,88 @@ posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, return pack_arguments_newref(3, a, b, args); } + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as varpos_array_no_fastcall + + *args: array + +[clinic start generated code]*/ + +static PyObject * +varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=f99d984346c60d42 input=368d8eea6de48c12]*/ +{ + return _PyTuple_FromArray(args, args_length); +} + + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_varpos_array_no_fastcall + + a: object + b: object + / + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=1eec4da1fb5b5978 input=7330c8d819a23548]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_req_opt_varpos_array_no_fastcall + + a: object + b: object = False + / + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type, + PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=88041c2176135218 input=7f5fd34ee5f9e0bf]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + + +/*[clinic input] +@classmethod +_testclinic.TestClass.__new__ as posonly_poskw_varpos_array_no_fastcall + + a: object + / + b: object + *args: array + +[clinic start generated code]*/ + +static PyObject * +posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, + PyObject * const *args, + Py_ssize_t args_length) +/*[clinic end generated code: output=70eda18c3667681e input=2b0fcd7bd9bb865c]*/ +{ + return pack_arguments_2pos_varpos(a, b, args, args_length); +} + static struct PyMethodDef test_class_methods[] = { _TESTCLINIC_TESTCLASS_GET_DEFINING_CLASS_METHODDEF _TESTCLINIC_TESTCLASS_GET_DEFINING_CLASS_ARG_METHODDEF @@ -1441,6 +1615,19 @@ static struct PyMethodDef test_class_methods[] = { {"posonly_poskw_varpos_no_fastcall", _PyCFunction_CAST(posonly_poskw_varpos_no_fastcall), METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"varpos_array_no_fastcall", + _PyCFunction_CAST(varpos_array_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_varpos_array_no_fastcall", + _PyCFunction_CAST(posonly_varpos_array_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_req_opt_varpos_array_no_fastcall", + _PyCFunction_CAST(posonly_req_opt_varpos_array_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {"posonly_poskw_varpos_array_no_fastcall", + _PyCFunction_CAST(posonly_poskw_varpos_array_no_fastcall), + METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""}, + {NULL, NULL} }; @@ -2106,6 +2293,12 @@ static PyMethodDef tester_methods[] = { POSKW_VARPOS_KWONLY_OPT2_METHODDEF VARPOS_KWONLY_OPT_METHODDEF VARPOS_KWONLY_REQ_OPT_METHODDEF + + VARPOS_ARRAY_METHODDEF + POSONLY_VARPOS_ARRAY_METHODDEF + POSONLY_REQ_OPT_VARPOS_ARRAY_METHODDEF + POSONLY_POSKW_VARPOS_ARRAY_METHODDEF + GH_32092_OOB_METHODDEF GH_32092_KW_PASS_METHODDEF GH_99233_REFCOUNT_METHODDEF diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index 97b0786ebb41b8..641a5e303e68c0 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -3069,6 +3069,168 @@ varpos_kwonly_req_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, return return_value; } +PyDoc_STRVAR(varpos_array__doc__, +"varpos_array($module, /, *args)\n" +"--\n" +"\n"); + +#define VARPOS_ARRAY_METHODDEF \ + {"varpos_array", _PyCFunction_CAST(varpos_array), METH_FASTCALL, varpos_array__doc__}, + +static PyObject * +varpos_array_impl(PyObject *module, PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + __clinic_args = args; + args_length = nargs; + return_value = varpos_array_impl(module, __clinic_args, args_length); + + return return_value; +} + +PyDoc_STRVAR(posonly_varpos_array__doc__, +"posonly_varpos_array($module, a, b, /, *args)\n" +"--\n" +"\n"); + +#define POSONLY_VARPOS_ARRAY_METHODDEF \ + {"posonly_varpos_array", _PyCFunction_CAST(posonly_varpos_array), METH_FASTCALL, posonly_varpos_array__doc__}, + +static PyObject * +posonly_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, Py_ssize_t args_length); + +static PyObject * +posonly_varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *a; + PyObject *b; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + if (!_PyArg_CheckPositional("posonly_varpos_array", nargs, 2, PY_SSIZE_T_MAX)) { + goto exit; + } + a = args[0]; + b = args[1]; + __clinic_args = args + 2; + args_length = nargs - 2; + return_value = posonly_varpos_array_impl(module, a, b, __clinic_args, args_length); + +exit: + return return_value; +} + +PyDoc_STRVAR(posonly_req_opt_varpos_array__doc__, +"posonly_req_opt_varpos_array($module, a, b=False, /, *args)\n" +"--\n" +"\n"); + +#define POSONLY_REQ_OPT_VARPOS_ARRAY_METHODDEF \ + {"posonly_req_opt_varpos_array", _PyCFunction_CAST(posonly_req_opt_varpos_array), METH_FASTCALL, posonly_req_opt_varpos_array__doc__}, + +static PyObject * +posonly_req_opt_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +posonly_req_opt_varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + PyObject *return_value = NULL; + PyObject *a; + PyObject *b = Py_False; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + if (!_PyArg_CheckPositional("posonly_req_opt_varpos_array", nargs, 1, PY_SSIZE_T_MAX)) { + goto exit; + } + a = args[0]; + if (nargs < 2) { + goto skip_optional; + } + b = args[1]; +skip_optional: + __clinic_args = args + Py_MIN(nargs, 2); + args_length = Py_MAX(0, nargs - 2); + return_value = posonly_req_opt_varpos_array_impl(module, a, b, __clinic_args, args_length); + +exit: + return return_value; +} + +PyDoc_STRVAR(posonly_poskw_varpos_array__doc__, +"posonly_poskw_varpos_array($module, a, /, b, *args)\n" +"--\n" +"\n"); + +#define POSONLY_POSKW_VARPOS_ARRAY_METHODDEF \ + {"posonly_poskw_varpos_array", _PyCFunction_CAST(posonly_poskw_varpos_array), METH_FASTCALL|METH_KEYWORDS, posonly_poskw_varpos_array__doc__}, + +static PyObject * +posonly_poskw_varpos_array_impl(PyObject *module, PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +posonly_poskw_varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) +{ + PyObject *return_value = NULL; + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + + #define NUM_KEYWORDS 1 + static struct { + PyGC_Head _this_is_not_used; + PyObject_VAR_HEAD + PyObject *ob_item[NUM_KEYWORDS]; + } _kwtuple = { + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_item = { _Py_LATIN1_CHR('b'), }, + }; + #undef NUM_KEYWORDS + #define KWTUPLE (&_kwtuple.ob_base.ob_base) + + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE + + static const char * const _keywords[] = {"", "b", NULL}; + static _PyArg_Parser _parser = { + .keywords = _keywords, + .fname = "posonly_poskw_varpos_array", + .kwtuple = KWTUPLE, + }; + #undef KWTUPLE + PyObject *argsbuf[2]; + PyObject * const *fastargs; + PyObject *a; + PyObject *b; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + fastargs = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + b = fastargs[1]; + __clinic_args = args + Py_MIN(nargs, 2); + args_length = Py_MAX(0, nargs - 2); + return_value = posonly_poskw_varpos_array_impl(module, a, b, __clinic_args, args_length); + +exit: + return return_value; +} + PyDoc_STRVAR(gh_32092_oob__doc__, "gh_32092_oob($module, /, pos1, pos2, *varargs, kw1=None, kw2=None)\n" "--\n" @@ -3966,4 +4128,154 @@ posonly_poskw_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *k return return_value; } -/*[clinic end generated code: output=60ab26511f9eeac1 input=a9049054013a1b77]*/ + +static PyObject * +varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + __clinic_args = _PyTuple_ITEMS(args); + args_length = PyTuple_GET_SIZE(args); + return_value = varpos_array_no_fastcall_impl(type, __clinic_args, args_length); + +exit: + return return_value; +} + +static PyObject * +posonly_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +posonly_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject *a; + PyObject *b; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) { + goto exit; + } + a = PyTuple_GET_ITEM(args, 0); + b = PyTuple_GET_ITEM(args, 1); + __clinic_args = _PyTuple_ITEMS(args) + 2; + args_length = PyTuple_GET_SIZE(args) - 2; + return_value = posonly_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length); + +exit: + return return_value; +} + +static PyObject * +posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type, + PyObject *a, PyObject *b, + PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +posonly_req_opt_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + PyTypeObject *base_tp = &PyBaseObject_Type; + PyObject *a; + PyObject *b = Py_False; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + if ((type == base_tp || type->tp_init == base_tp->tp_init) && + !_PyArg_NoKeywords("TestClass", kwargs)) { + goto exit; + } + if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) { + goto exit; + } + a = PyTuple_GET_ITEM(args, 0); + if (PyTuple_GET_SIZE(args) < 2) { + goto skip_optional; + } + b = PyTuple_GET_ITEM(args, 1); +skip_optional: + __clinic_args = _PyTuple_ITEMS(args) + Py_MIN(PyTuple_GET_SIZE(args), 2); + args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2); + return_value = posonly_req_opt_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length); + +exit: + return return_value; +} + +static PyObject * +posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a, + PyObject *b, + PyObject * const *args, + Py_ssize_t args_length); + +static PyObject * +posonly_poskw_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs) +{ + PyObject *return_value = NULL; + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + + #define NUM_KEYWORDS 1 + static struct { + PyGC_Head _this_is_not_used; + PyObject_VAR_HEAD + PyObject *ob_item[NUM_KEYWORDS]; + } _kwtuple = { + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_item = { _Py_LATIN1_CHR('b'), }, + }; + #undef NUM_KEYWORDS + #define KWTUPLE (&_kwtuple.ob_base.ob_base) + + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE + + static const char * const _keywords[] = {"", "b", NULL}; + static _PyArg_Parser _parser = { + .keywords = _keywords, + .fname = "TestClass", + .kwtuple = KWTUPLE, + }; + #undef KWTUPLE + PyObject *argsbuf[2]; + PyObject * const *fastargs; + Py_ssize_t nargs = PyTuple_GET_SIZE(args); + PyObject *a; + PyObject *b; + PyObject * const *__clinic_args; + Py_ssize_t args_length; + + fastargs = _PyArg_UnpackKeywordsWithVararg(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 2, 0, argsbuf); + if (!fastargs) { + goto exit; + } + a = fastargs[0]; + b = fastargs[1]; + __clinic_args = _PyTuple_ITEMS(args) + Py_MIN(PyTuple_GET_SIZE(args), 2); + args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2); + return_value = posonly_poskw_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length); + +exit: + return return_value; +} +/*[clinic end generated code: output=d6902bae9f418590 input=a9049054013a1b77]*/ diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index 34adb6bc25d0a8..ef53b2aca5b431 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -454,15 +454,18 @@ def _parse_vararg(self) -> str: assert self.varpos is not None paramname = self.varpos.converter.parser_name if self.varpos.converter.length: + if not self.fastcall: + self.codegen.add_include('pycore_tuple.h', + '_PyTuple_ITEMS()') start = 'args' if self.fastcall else '_PyTuple_ITEMS(args)' - size = 'nargs' + size = 'nargs' if self.fastcall else 'PyTuple_GET_SIZE(args)' if self.max_pos: if min(self.pos_only, self.min_pos) < self.max_pos: - start = f'{start} + Py_MIN(nargs, {self.max_pos})' - size = f'Py_MAX(0, nargs - {self.max_pos})' + start = f'{start} + Py_MIN({size}, {self.max_pos})' + size = f'Py_MAX(0, {size} - {self.max_pos})' else: start = f'{start} + {self.max_pos}' - size = f'nargs - {self.max_pos}' + size = f'{size} - {self.max_pos}' return f""" {paramname} = {start}; {self.varpos.converter.length_name} = {size}; From 9080ed5aa055accc73f2e090c1c9957c7bd61679 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 19:58:34 +0200 Subject: [PATCH 12/14] Remove unused import. --- Tools/clinic/libclinic/clanguage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/clinic/libclinic/clanguage.py b/Tools/clinic/libclinic/clanguage.py index 6f39f9b8d1ea4c..32d2c045b06bca 100644 --- a/Tools/clinic/libclinic/clanguage.py +++ b/Tools/clinic/libclinic/clanguage.py @@ -15,7 +15,7 @@ Module, Class, Function, Parameter, permute_optional_groups, GETTER, SETTER, METHOD_INIT) -from libclinic.converters import defining_class_converter, self_converter +from libclinic.converters import self_converter from libclinic.parse_args import ParseArgsCodeGen if TYPE_CHECKING: from libclinic.app import Clinic From e38d94ed7a1852ddf1b9d640a7653c6e7bb26a09 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 21:30:06 +0200 Subject: [PATCH 13/14] Polishing. --- Modules/clinic/_testclinic.c.h | 10 +++++----- Modules/gcmodule.c | 4 +--- Tools/clinic/libclinic/converter.py | 2 +- Tools/clinic/libclinic/converters.py | 6 ------ Tools/clinic/libclinic/parse_args.py | 2 +- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index 641a5e303e68c0..0f5ae5ec869753 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -3160,7 +3160,7 @@ posonly_req_opt_varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t } b = args[1]; skip_optional: - __clinic_args = args + Py_MIN(nargs, 2); + __clinic_args = nargs > 2 ? args + 2 : args; args_length = Py_MAX(0, nargs - 2); return_value = posonly_req_opt_varpos_array_impl(module, a, b, __clinic_args, args_length); @@ -3223,7 +3223,7 @@ posonly_poskw_varpos_array(PyObject *module, PyObject *const *args, Py_ssize_t n } a = fastargs[0]; b = fastargs[1]; - __clinic_args = args + Py_MIN(nargs, 2); + __clinic_args = nargs > 2 ? args + 2 : args; args_length = Py_MAX(0, nargs - 2); return_value = posonly_poskw_varpos_array_impl(module, a, b, __clinic_args, args_length); @@ -4214,7 +4214,7 @@ posonly_req_opt_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyO } b = PyTuple_GET_ITEM(args, 1); skip_optional: - __clinic_args = _PyTuple_ITEMS(args) + Py_MIN(PyTuple_GET_SIZE(args), 2); + __clinic_args = PyTuple_GET_SIZE(args) > 2 ? _PyTuple_ITEMS(args) + 2 : _PyTuple_ITEMS(args); args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2); return_value = posonly_req_opt_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length); @@ -4271,11 +4271,11 @@ posonly_poskw_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObj } a = fastargs[0]; b = fastargs[1]; - __clinic_args = _PyTuple_ITEMS(args) + Py_MIN(PyTuple_GET_SIZE(args), 2); + __clinic_args = PyTuple_GET_SIZE(args) > 2 ? _PyTuple_ITEMS(args) + 2 : _PyTuple_ITEMS(args); args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2); return_value = posonly_poskw_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length); exit: return return_value; } -/*[clinic end generated code: output=d6902bae9f418590 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ed3408af146a746c input=a9049054013a1b77]*/ diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index c7a80a86d2a2ce..ad13496b06deaf 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -230,9 +230,7 @@ gc_get_referrers_impl(PyObject *module, PyObject *objs) } PyInterpreterState *interp = _PyInterpreterState_GET(); - PyObject *result = _PyGC_GetReferrers(interp, objs); - - return result; + return _PyGC_GetReferrers(interp, objs); } /* Append obj to list; return true if error (out of memory), false if OK. */ diff --git a/Tools/clinic/libclinic/converter.py b/Tools/clinic/libclinic/converter.py index 8ef0bf0f6490e7..2c93dda3541030 100644 --- a/Tools/clinic/libclinic/converter.py +++ b/Tools/clinic/libclinic/converter.py @@ -312,7 +312,7 @@ def render(self, parameter: Parameter, data: CRenderData) -> None: def length_name(self) -> str: """Computes the name of the associated "length" variable.""" assert self.length is not None - return self.parser_name.removeprefix(libclinic.CLINIC_PREFIX) + "_length" + return self.name + "_length" # Why is this one broken out separately? # For "positional-only" function parsing, diff --git a/Tools/clinic/libclinic/converters.py b/Tools/clinic/libclinic/converters.py index 98571cb8f4b17b..2d103c941cbf23 100644 --- a/Tools/clinic/libclinic/converters.py +++ b/Tools/clinic/libclinic/converters.py @@ -1237,9 +1237,6 @@ class varpos_tuple_converter(CConverter): format_unit = '' c_default = 'NULL' - def converter_init(self) -> None: - pass - def cleanup(self) -> str: return f"""Py_XDECREF({self.parser_name});\n""" @@ -1252,9 +1249,6 @@ class varpos_array_converter(CConverter): length = True c_ignored_default = '' - def converter_init(self) -> None: - pass - def parse_arg(self, argname: str, displayname: str, *, limited_capi: bool) -> str | None: raise AssertionError('should never be called') diff --git a/Tools/clinic/libclinic/parse_args.py b/Tools/clinic/libclinic/parse_args.py index ef53b2aca5b431..2ce4e7512148d2 100644 --- a/Tools/clinic/libclinic/parse_args.py +++ b/Tools/clinic/libclinic/parse_args.py @@ -461,7 +461,7 @@ def _parse_vararg(self) -> str: size = 'nargs' if self.fastcall else 'PyTuple_GET_SIZE(args)' if self.max_pos: if min(self.pos_only, self.min_pos) < self.max_pos: - start = f'{start} + Py_MIN({size}, {self.max_pos})' + start = f'{size} > {self.max_pos} ? {start} + {self.max_pos} : {start}' size = f'Py_MAX(0, {size} - {self.max_pos})' else: start = f'{start} + {self.max_pos}' From 1c476017ea5a9ec0adde2f5f0a6d864dbd253c9b Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 22:05:53 +0200 Subject: [PATCH 14/14] Increase limits for check-c-globals. --- Tools/c-analyzer/c_parser/parser/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/c-analyzer/c_parser/parser/__init__.py b/Tools/c-analyzer/c_parser/parser/__init__.py index 4227e938d7f8da..ff4f303c4a2bec 100644 --- a/Tools/c-analyzer/c_parser/parser/__init__.py +++ b/Tools/c-analyzer/c_parser/parser/__init__.py @@ -164,7 +164,7 @@ def _parse(srclines, anon_name, **srckwargs): # We use defaults that cover most files. Files with bigger declarations # are covered elsewhere (MAX_SIZES in cpython/_parser.py). -def _iter_source(lines, *, maxtext=10_000, maxlines=200, showtext=False): +def _iter_source(lines, *, maxtext=11_000, maxlines=200, showtext=False): maxtext = maxtext if maxtext and maxtext > 0 else None maxlines = maxlines if maxlines and maxlines > 0 else None filestack = []