From cee430fc1045bc74abaee174a0e52f0b47447723 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 11 Aug 2022 23:16:42 +0200 Subject: [PATCH 1/6] Proof of concept Deduce num_keywords from f.parameters --- Tools/clinic/clinic.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 88f779e64a0dae..4fdf917a71929a 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -535,7 +535,15 @@ def normalize_snippet(s, *, indent=0): return s -def declare_parser(*, hasformat=False): +def declare_parser(f, *, hasformat=False): + def num_keywords(f): + params = f.parameters.values() + kwds = [ + p for p in params + if not p.is_positional_only() and not p.is_vararg() + ] + return len(kwds) + """ Generates the code template for a static local PyArg_Parser variable, with an initializer. For core code (incl. builtin modules) the @@ -549,7 +557,7 @@ def declare_parser(*, hasformat=False): fname = '.fname = "{name}",' format_ = '' declarations = """ - #define NUM_KEYWORDS {num_keywords} + #define NUM_KEYWORDS %d #if NUM_KEYWORDS == 0 # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) @@ -584,7 +592,7 @@ def declare_parser(*, hasformat=False): .kwtuple = KWTUPLE, }}; #undef KWTUPLE - """ % (format_ or fname) + """ % (num_keywords(f), format_ or fname) return normalize_snippet(declarations) @@ -1020,7 +1028,7 @@ def parser_body(prototype, *fields, declarations=''): flags = "METH_FASTCALL|METH_KEYWORDS" parser_prototype = parser_prototype_fastcall_keywords argname_fmt = 'args[%d]' - declarations = declare_parser() + declarations = declare_parser(f) declarations += "\nPyObject *argsbuf[%s];" % len(converters) if has_optional_kw: pre_buffer = "0" if vararg != NO_VARARG else "nargs" @@ -1036,7 +1044,7 @@ def parser_body(prototype, *fields, declarations=''): flags = "METH_VARARGS|METH_KEYWORDS" parser_prototype = parser_prototype_keyword argname_fmt = 'fastargs[%d]' - declarations = declare_parser() + declarations = declare_parser(f) declarations += "\nPyObject *argsbuf[%s];" % len(converters) declarations += "\nPyObject * const *fastargs;" declarations += "\nPy_ssize_t nargs = PyTuple_GET_SIZE(args);" @@ -1116,7 +1124,7 @@ def parser_body(prototype, *fields, declarations=''): if add_label: parser_code.append("%s:" % add_label) else: - declarations = declare_parser(hasformat=True) + declarations = declare_parser(f, hasformat=True) if not new_or_init: parser_code = [normalize_snippet(""" if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser{parse_arguments_comma} From bda509a5f9fdcf49ba9a3a4a41bf5040f645c660 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Thu, 11 Aug 2022 23:24:36 +0200 Subject: [PATCH 2/6] Calculate num_keywords during template generation --- Modules/_blake2/clinic/blake2b_impl.c.h | 28 +- Modules/_blake2/clinic/blake2s_impl.c.h | 28 +- Modules/_io/clinic/_iomodule.c.h | 54 +- Modules/_io/clinic/bufferedio.c.h | 80 +- Modules/_io/clinic/bytesio.c.h | 28 +- Modules/_io/clinic/fileio.c.h | 28 +- Modules/_io/clinic/stringio.c.h | 28 +- Modules/_io/clinic/textio.c.h | 106 +- Modules/_io/clinic/winconsoleio.c.h | 28 +- .../_multiprocessing/clinic/posixshmem.c.h | 54 +- Modules/_multiprocessing/clinic/semaphore.c.h | 80 +- Modules/_sha3/clinic/sha3module.c.h | 28 +- Modules/_sqlite/clinic/connection.c.h | 352 +-- Modules/_sqlite/clinic/cursor.c.h | 28 +- Modules/_sqlite/clinic/module.c.h | 28 +- Modules/_sre/clinic/sre.c.h | 340 +-- Modules/_ssl/clinic/cert.c.h | 28 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 170 +- Modules/clinic/_asynciomodule.c.h | 314 +-- Modules/clinic/_bisectmodule.c.h | 106 +- Modules/clinic/_bz2module.c.h | 28 +- Modules/clinic/_codecsmodule.c.h | 54 +- Modules/clinic/_csv.c.h | 80 +- Modules/clinic/_curses_panel.c.h | 98 +- Modules/clinic/_cursesmodule.c.h | 28 +- Modules/clinic/_datetimemodule.c.h | 54 +- Modules/clinic/_dbmmodule.c.h | 66 +- Modules/clinic/_elementtree.c.h | 210 +- Modules/clinic/_gdbmmodule.c.h | 34 +- Modules/clinic/_hashopenssl.c.h | 522 +--- Modules/clinic/_lzmamodule.c.h | 54 +- Modules/clinic/_opcode.c.h | 28 +- Modules/clinic/_pickle.c.h | 158 +- Modules/clinic/_queuemodule.c.h | 80 +- Modules/clinic/_ssl.c.h | 236 +- Modules/clinic/_struct.c.h | 80 +- Modules/clinic/_testmultiphase.c.h | 28 +- Modules/clinic/_winapi.c.h | 158 +- Modules/clinic/arraymodule.c.h | 130 +- Modules/clinic/binascii.c.h | 184 +- Modules/clinic/cmathmodule.c.h | 28 +- Modules/clinic/gcmodule.c.h | 54 +- Modules/clinic/grpmodule.c.h | 54 +- Modules/clinic/itertoolsmodule.c.h | 184 +- Modules/clinic/mathmodule.c.h | 54 +- Modules/clinic/md5module.c.h | 28 +- Modules/clinic/overlapped.c.h | 28 +- Modules/clinic/posixmodule.c.h | 2264 +++++------------ Modules/clinic/pyexpat.c.h | 156 +- Modules/clinic/selectmodule.c.h | 132 +- Modules/clinic/sha1module.c.h | 28 +- Modules/clinic/sha256module.c.h | 54 +- Modules/clinic/sha512module.c.h | 54 +- Modules/clinic/socketmodule.c.h | 28 +- Modules/clinic/zlibmodule.c.h | 292 +-- Objects/clinic/bytearrayobject.c.h | 184 +- Objects/clinic/bytesobject.c.h | 184 +- Objects/clinic/codeobject.c.h | 54 +- Objects/clinic/complexobject.c.h | 28 +- Objects/clinic/descrobject.c.h | 54 +- Objects/clinic/enumobject.c.h | 28 +- Objects/clinic/funcobject.c.h | 28 +- Objects/clinic/listobject.c.h | 28 +- Objects/clinic/longobject.c.h | 80 +- Objects/clinic/memoryobject.c.h | 106 +- Objects/clinic/moduleobject.c.h | 28 +- Objects/clinic/odictobject.c.h | 132 +- Objects/clinic/structseq.c.h | 28 +- Objects/clinic/unicodeobject.c.h | 158 +- Objects/stringlib/clinic/transmogrify.h.h | 28 +- PC/clinic/_testconsole.c.h | 54 +- PC/clinic/winreg.c.h | 132 +- PC/clinic/winsound.c.h | 80 +- Python/clinic/Python-tokenize.c.h | 28 +- Python/clinic/_warnings.c.h | 54 +- Python/clinic/bltinmodule.c.h | 184 +- Python/clinic/import.c.h | 54 +- Python/clinic/sysmodule.c.h | 54 +- Python/clinic/traceback.c.h | 28 +- Tools/clinic/clinic.py | 85 +- 80 files changed, 2556 insertions(+), 7029 deletions(-) diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 7e07f60036b769..4d107aa72fc56d 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -28,33 +28,21 @@ static PyObject * py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 12 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[12]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 12) .ob_item = { &_Py_ID(digest_size), &_Py_ID(key), &_Py_ID(salt), &_Py_ID(person), &_Py_ID(fanout), &_Py_ID(depth), &_Py_ID(leaf_size), &_Py_ID(node_offset), &_Py_ID(node_depth), &_Py_ID(inner_size), &_Py_ID(last_node), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "digest_size", "key", "salt", "person", "fanout", "depth", "leaf_size", "node_offset", "node_depth", "inner_size", "last_node", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -286,4 +274,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=6daedbc1dba8c284 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f9cbb310c99ccf18 input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index ee746d417d4830..5fe7abf1d1d1ee 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -28,33 +28,21 @@ static PyObject * py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 12 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[12]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 12) .ob_item = { &_Py_ID(digest_size), &_Py_ID(key), &_Py_ID(salt), &_Py_ID(person), &_Py_ID(fanout), &_Py_ID(depth), &_Py_ID(leaf_size), &_Py_ID(node_offset), &_Py_ID(node_depth), &_Py_ID(inner_size), &_Py_ID(last_node), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "digest_size", "key", "salt", "person", "fanout", "depth", "leaf_size", "node_offset", "node_depth", "inner_size", "last_node", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -286,4 +274,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=1b0381231f840d4d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dcb873c061ed772c input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 470b0cb08e9c11..2e9654bb200ca7 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -139,33 +139,21 @@ static PyObject * _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 8 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[8]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(buffering), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(closefd), &_Py_ID(opener), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL}; static _PyArg_Parser _parser = { @@ -372,33 +360,21 @@ static PyObject * _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -427,4 +403,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=ea13625ef5c1c5ef input=a9049054013a1b77]*/ +/*[clinic end generated code: output=58de61ccdf9ac533 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index bfd07e49b733a2..1ccb91a48370ae 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -408,33 +408,21 @@ static int _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"raw", "buffer_size", NULL}; static _PyArg_Parser _parser = { @@ -495,33 +483,21 @@ static int _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"raw", "buffer_size", NULL}; static _PyArg_Parser _parser = { @@ -675,33 +651,21 @@ static int _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"raw", "buffer_size", NULL}; static _PyArg_Parser _parser = { @@ -743,4 +707,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=40ab0d3319282df2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1ec10ce06920c007 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index 27e0f313682ba7..006ffa99a18825 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -489,33 +489,21 @@ static int _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(initial_bytes), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"initial_bytes", NULL}; static _PyArg_Parser _parser = { @@ -544,4 +532,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=a43adab5280d645c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4d9e7301462263e3 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index 1695385c86e45c..ac6233cfcd6ac9 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -55,33 +55,21 @@ static int _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(closefd), &_Py_ID(opener), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "mode", "closefd", "opener", NULL}; static _PyArg_Parser _parser = { @@ -476,4 +464,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=fa61bf880de0de90 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bfa0d5eca7181dbd input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index d853cf4312a5ac..4a9119c826e61e 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -261,33 +261,21 @@ static int _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(initial_value), &_Py_ID(newline), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"initial_value", "newline", NULL}; static _PyArg_Parser _parser = { @@ -377,4 +365,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored)) { return _io_StringIO_seekable_impl(self); } -/*[clinic end generated code: output=b1bde306e2928b19 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4f15862a62730297 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index c9b25124dcb4fb..855a07992cb8c3 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -30,33 +30,21 @@ static int _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(decoder), &_Py_ID(translate), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"decoder", "translate", "errors", NULL}; static _PyArg_Parser _parser = { @@ -109,33 +97,21 @@ static PyObject * _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"input", "final", NULL}; static _PyArg_Parser _parser = { @@ -254,33 +230,21 @@ static int _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 6 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[6]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) .ob_item = { &_Py_ID(buffer), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(line_buffering), &_Py_ID(write_through), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"buffer", "encoding", "errors", "newline", "line_buffering", "write_through", NULL}; static _PyArg_Parser _parser = { @@ -402,33 +366,21 @@ static PyObject * _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(line_buffering), &_Py_ID(write_through), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"encoding", "errors", "newline", "line_buffering", "write_through", NULL}; static _PyArg_Parser _parser = { @@ -809,4 +761,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored)) { return _io_TextIOWrapper_close_impl(self); } -/*[clinic end generated code: output=29563d0807382d7a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3a1b1fb6cf4b8241 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 5808a60b6a8e04..81b5eae538ba67 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -54,33 +54,21 @@ static int _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(closefd), &_Py_ID(opener), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "mode", "closefd", "opener", NULL}; static _PyArg_Parser _parser = { @@ -417,4 +405,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=440125d1e2745fff input=a9049054013a1b77]*/ +/*[clinic end generated code: output=22471fc8bfe93894 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index 9894af4c561a1a..621dd6a08d70e0 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -27,33 +27,21 @@ static PyObject * _posixshmem_shm_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(mode), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "flags", "mode", NULL}; static _PyArg_Parser _parser = { @@ -127,33 +115,21 @@ static PyObject * _posixshmem_shm_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -192,4 +168,4 @@ _posixshmem_shm_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs #ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF #define _POSIXSHMEM_SHM_UNLINK_METHODDEF #endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */ -/*[clinic end generated code: output=4c889c75d55353a6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2763fabf9d642d88 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index 28c9d4a8fb2f65..d10574bcdf9eed 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -27,33 +27,21 @@ static PyObject * _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"block", "timeout", NULL}; static _PyArg_Parser _parser = { @@ -134,33 +122,21 @@ static PyObject * _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"block", "timeout", NULL}; static _PyArg_Parser _parser = { @@ -232,33 +208,21 @@ static PyObject * _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(kind), &_Py_ID(value), &_Py_ID(maxvalue), &_Py_ID(name), &_Py_ID(unlink), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"kind", "value", "maxvalue", "name", "unlink", NULL}; static _PyArg_Parser _parser = { @@ -572,4 +536,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=7eaf752dcfef6204 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c29c04e27b12263b input=a9049054013a1b77]*/ diff --git a/Modules/_sha3/clinic/sha3module.c.h b/Modules/_sha3/clinic/sha3module.c.h index b53a244a230c85..d3023a19829164 100644 --- a/Modules/_sha3/clinic/sha3module.c.h +++ b/Modules/_sha3/clinic/sha3module.c.h @@ -21,33 +21,21 @@ static PyObject * py_sha3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -203,4 +191,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=f601d854411f9bea input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1fc87ca41d6a1a4d input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 066675d4963036..9fd6501deb4d1c 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -19,33 +19,21 @@ static int pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 8 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[8]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) .ob_item = { &_Py_ID(database), &_Py_ID(timeout), &_Py_ID(detect_types), &_Py_ID(isolation_level), &_Py_ID(check_same_thread), &_Py_ID(factory), &_Py_ID(cached_statements), &_Py_ID(uri), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"database", "timeout", "detect_types", "isolation_level", "check_same_thread", "factory", "cached_statements", "uri", NULL}; static _PyArg_Parser _parser = { @@ -158,33 +146,21 @@ static PyObject * pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(factory), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"factory", NULL}; static _PyArg_Parser _parser = { @@ -240,33 +216,21 @@ static PyObject * blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(readonly), &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "", "readonly", "name", NULL}; static _PyArg_Parser _parser = { @@ -428,33 +392,21 @@ static PyObject * pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(name), &_Py_ID(narg), &_Py_ID(func), &_Py_ID(deterministic), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "narg", "func", "deterministic", NULL}; static _PyArg_Parser _parser = { @@ -535,33 +487,11 @@ static PyObject * create_window_function(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", "", NULL}; static _PyArg_Parser _parser = { @@ -624,33 +554,21 @@ static PyObject * pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(name), &_Py_ID(n_arg), &_Py_ID(aggregate_class), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "n_arg", "aggregate_class", NULL}; static _PyArg_Parser _parser = { @@ -710,33 +628,21 @@ static PyObject * pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(authorizer_callback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"authorizer_callback", NULL}; static _PyArg_Parser _parser = { @@ -777,33 +683,21 @@ static PyObject * pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(progress_handler), &_Py_ID(n), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"progress_handler", "n", NULL}; static _PyArg_Parser _parser = { @@ -849,33 +743,21 @@ static PyObject * pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(trace_callback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"trace_callback", NULL}; static _PyArg_Parser _parser = { @@ -1118,33 +1000,21 @@ static PyObject * pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(target), &_Py_ID(pages), &_Py_ID(progress), &_Py_ID(name), &_Py_ID(sleep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"target", "pages", "progress", "name", "sleep", NULL}; static _PyArg_Parser _parser = { @@ -1242,33 +1112,11 @@ static PyObject * pysqlite_connection_create_collation(pysqlite_Connection *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -1331,33 +1179,21 @@ static PyObject * serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", NULL}; static _PyArg_Parser _parser = { @@ -1430,33 +1266,21 @@ static PyObject * deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "name", NULL}; static _PyArg_Parser _parser = { @@ -1672,4 +1496,4 @@ getlimit(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=e6873a956553d806 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bef98f463226dd88 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index d01abb856794c4..5e30831e943ff8 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -192,33 +192,21 @@ static PyObject * pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(size), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"size", NULL}; static _PyArg_Parser _parser = { @@ -328,4 +316,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=13c24313ce3a0fec input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0dc75868f6018ed5 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index 0137918a48ad96..ff7e8fa84dfa5d 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -24,33 +24,21 @@ static PyObject * pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(statement), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"statement", NULL}; static _PyArg_Parser _parser = { @@ -221,4 +209,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=4b5c237e3cf49908 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2f54640446a11961 input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index dc5c6c132151fd..aff8212f2e4065 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -181,33 +181,21 @@ static PyObject * _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -284,33 +272,21 @@ static PyObject * _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -389,33 +365,21 @@ static PyObject * _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -491,33 +455,21 @@ static PyObject * _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -596,33 +548,21 @@ static PyObject * _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -698,33 +638,21 @@ static PyObject * _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "pos", "endpos", NULL}; static _PyArg_Parser _parser = { @@ -800,33 +728,21 @@ static PyObject * _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -884,33 +800,21 @@ static PyObject * _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(repl), &_Py_ID(string), &_Py_ID(count), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"repl", "string", "count", NULL}; static _PyArg_Parser _parser = { @@ -971,33 +875,21 @@ static PyObject * _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(repl), &_Py_ID(string), &_Py_ID(count), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"repl", "string", "count", NULL}; static _PyArg_Parser _parser = { @@ -1083,33 +975,21 @@ static PyObject * _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 6 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[6]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) .ob_item = { &_Py_ID(pattern), &_Py_ID(flags), &_Py_ID(code), &_Py_ID(groups), &_Py_ID(groupindex), &_Py_ID(indexgroup), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"pattern", "flags", "code", "groups", "groupindex", "indexgroup", NULL}; static _PyArg_Parser _parser = { @@ -1184,33 +1064,21 @@ static PyObject * _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(template), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"template", NULL}; static _PyArg_Parser _parser = { @@ -1252,33 +1120,21 @@ static PyObject * _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(default), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"default", NULL}; static _PyArg_Parser _parser = { @@ -1325,33 +1181,21 @@ static PyObject * _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(default), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"default", NULL}; static _PyArg_Parser _parser = { @@ -1551,4 +1395,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=d686111c67a7d0aa input=a9049054013a1b77]*/ +/*[clinic end generated code: output=60eb672f4d3ae36e input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index e90aa137503a78..008c86a53cd842 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -23,33 +23,21 @@ static PyObject * _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(format), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"format", NULL}; static _PyArg_Parser _parser = { @@ -96,4 +84,4 @@ _ssl_Certificate_get_info(PySSLCertificate *self, PyObject *Py_UNUSED(ignored)) { return _ssl_Certificate_get_info_impl(self); } -/*[clinic end generated code: output=39d0c03e76b5f361 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=89ddd7c395575a6c input=a9049054013a1b77]*/ diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index d251bdba1d5d4f..f3790bab682cc1 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -31,33 +31,21 @@ static PyObject * _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(input), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"input", "errors", NULL}; static _PyArg_Parser _parser = { @@ -127,33 +115,21 @@ static PyObject * _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(input), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"input", "errors", NULL}; static _PyArg_Parser _parser = { @@ -228,33 +204,21 @@ static PyObject * _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"input", "final", NULL}; static _PyArg_Parser _parser = { @@ -367,33 +331,21 @@ static PyObject * _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"input", "final", NULL}; static _PyArg_Parser _parser = { @@ -630,33 +582,11 @@ static PyObject * _multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -696,33 +626,11 @@ static PyObject * _multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -774,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=1e596a9dfd1c97cd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fbe916d63ebbed1f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 7428fc20dc279e..ddc89c266288b6 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -32,33 +32,21 @@ static int _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(loop), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"loop", NULL}; static _PyArg_Parser _parser = { @@ -178,33 +166,21 @@ static PyObject * _asyncio_Future_add_done_callback(FutureObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(context), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "context", NULL}; static _PyArg_Parser _parser = { @@ -265,33 +241,21 @@ static PyObject * _asyncio_Future_cancel(FutureObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(msg), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"msg", NULL}; static _PyArg_Parser _parser = { @@ -411,33 +375,21 @@ static int _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(coro), &_Py_ID(loop), &_Py_ID(name), &_Py_ID(context), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"coro", "loop", "name", "context", NULL}; static _PyArg_Parser _parser = { @@ -539,33 +491,21 @@ static PyObject * _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(msg), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"msg", NULL}; static _PyArg_Parser _parser = { @@ -671,33 +611,21 @@ static PyObject * _asyncio_Task_get_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(limit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"limit", NULL}; static _PyArg_Parser _parser = { @@ -748,33 +676,21 @@ static PyObject * _asyncio_Task_print_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(limit), &_Py_ID(file), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"limit", "file", NULL}; static _PyArg_Parser _parser = { @@ -940,33 +856,21 @@ static PyObject * _asyncio__get_event_loop(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(stacklevel), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"stacklevel", NULL}; static _PyArg_Parser _parser = { @@ -1035,33 +939,21 @@ static PyObject * _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(task), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"task", NULL}; static _PyArg_Parser _parser = { @@ -1102,33 +994,21 @@ static PyObject * _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(task), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"task", NULL}; static _PyArg_Parser _parser = { @@ -1171,33 +1051,21 @@ static PyObject * _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(loop), &_Py_ID(task), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"loop", "task", NULL}; static _PyArg_Parser _parser = { @@ -1242,33 +1110,21 @@ static PyObject * _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(loop), &_Py_ID(task), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"loop", "task", NULL}; static _PyArg_Parser _parser = { @@ -1292,4 +1148,4 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=f923801842642bd9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e0fae10a70fef650 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index 667ed478eea4f6..0b65b476c7703f 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -32,33 +32,21 @@ static PyObject * _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "x", "lo", "hi", "key", NULL}; static _PyArg_Parser _parser = { @@ -148,33 +136,21 @@ static PyObject * _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "x", "lo", "hi", "key", NULL}; static _PyArg_Parser _parser = { @@ -261,33 +237,21 @@ static PyObject * _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "x", "lo", "hi", "key", NULL}; static _PyArg_Parser _parser = { @@ -377,33 +341,21 @@ static PyObject * _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "x", "lo", "hi", "key", NULL}; static _PyArg_Parser _parser = { @@ -465,4 +417,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=8028ae01b2fd14b6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9d0f2c2fa8b26356 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 178cae88f38e40..829b5bf1df95c3 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -101,33 +101,21 @@ static PyObject * _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(data), &_Py_ID(max_length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "max_length", NULL}; static _PyArg_Parser _parser = { @@ -178,4 +166,4 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py return return_value; } -/*[clinic end generated code: output=fe780ceebc3d3826 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=cf3f67c6fec47e8e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index be8b11a47c5392..e71e6d716a3814 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -92,33 +92,21 @@ static PyObject * _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(obj), &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"obj", "encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -202,33 +190,21 @@ static PyObject * _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(obj), &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"obj", "encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -2889,4 +2865,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=58003a0c706e89c2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b1a18e7f4a6b9980 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index c035c44ebdee77..70a05812f4f137 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -46,33 +46,21 @@ static PyObject * _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", NULL}; static _PyArg_Parser _parser = { @@ -113,33 +101,21 @@ static PyObject * _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", NULL}; static _PyArg_Parser _parser = { @@ -183,33 +159,21 @@ static PyObject * _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(new_limit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"new_limit", NULL}; static _PyArg_Parser _parser = { @@ -236,4 +200,4 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=46fe87be9980e02e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=34c738de1fa21f31 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index c5e9c2e5675d22..bb6cc90f0438c0 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -169,33 +169,11 @@ static PyObject * _curses_panel_panel_move(PyCursesPanelObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -262,33 +240,11 @@ static PyObject * _curses_panel_panel_replace(PyCursesPanelObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -332,33 +288,11 @@ static PyObject * _curses_panel_panel_set_userptr(PyCursesPanelObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -488,4 +422,4 @@ _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _curses_panel_update_panels_impl(module); } -/*[clinic end generated code: output=b4bbea7cfaaf3982 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8d0533681891523c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 715b9c35d2d4e2..a07ec40b8ef3f1 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2684,33 +2684,21 @@ static PyObject * _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(term), &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"term", "fd", NULL}; static _PyArg_Parser _parser = { @@ -4323,4 +4311,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=048542c478241231 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0dbd85118ec15c64 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 955e5fe8eafe92..57fb82e02c536c 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -28,33 +28,21 @@ static PyObject * iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(year), &_Py_ID(week), &_Py_ID(weekday), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"year", "week", "weekday", NULL}; static _PyArg_Parser _parser = { @@ -113,33 +101,21 @@ static PyObject * datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(tz), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"tz", NULL}; static _PyArg_Parser _parser = { @@ -166,4 +142,4 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg exit: return return_value; } -/*[clinic end generated code: output=faf7b2ab25ab94b9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d4ba846588df856d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h index e368378e6b8799..172dc4b9d5793e 100644 --- a/Modules/clinic/_dbmmodule.c.h +++ b/Modules/clinic/_dbmmodule.c.h @@ -65,33 +65,11 @@ static PyObject * _dbm_dbm_get(dbmobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -133,33 +111,11 @@ static PyObject * _dbm_dbm_setdefault(dbmobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -244,4 +200,4 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=a2232bc0c1994f03 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=28dcf736654137c2 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 9afe2af7593acd..e45e85750a47a0 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -174,33 +174,21 @@ static PyObject * _elementtree_Element_find(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "namespaces", NULL}; static _PyArg_Parser _parser = { @@ -247,33 +235,21 @@ static PyObject * _elementtree_Element_findtext(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(default), &_Py_ID(namespaces), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "default", "namespaces", NULL}; static _PyArg_Parser _parser = { @@ -326,33 +302,21 @@ static PyObject * _elementtree_Element_findall(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "namespaces", NULL}; static _PyArg_Parser _parser = { @@ -398,33 +362,21 @@ static PyObject * _elementtree_Element_iterfind(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "namespaces", NULL}; static _PyArg_Parser _parser = { @@ -470,33 +422,21 @@ static PyObject * _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "default", NULL}; static _PyArg_Parser _parser = { @@ -541,33 +481,21 @@ static PyObject * _elementtree_Element_iter(ElementObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(tag), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"tag", NULL}; static _PyArg_Parser _parser = { @@ -794,33 +722,21 @@ static int _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(element_factory), &_Py_ID(comment_factory), &_Py_ID(pi_factory), &_Py_ID(insert_comments), &_Py_ID(insert_pis), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"element_factory", "comment_factory", "pi_factory", "insert_comments", "insert_pis", NULL}; static _PyArg_Parser _parser = { @@ -1038,33 +954,21 @@ static int _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(target), &_Py_ID(encoding), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"target", "encoding", NULL}; static _PyArg_Parser _parser = { @@ -1185,4 +1089,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=62ed1bab17b4297a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6aaeefc69fa77d9c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h index ca1bfde1d2d674..5c6aeeee7789f7 100644 --- a/Modules/clinic/_gdbmmodule.c.h +++ b/Modules/clinic/_gdbmmodule.c.h @@ -168,33 +168,11 @@ static PyObject * _gdbm_gdbm_nextkey(gdbmobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -344,4 +322,4 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=72d3e46432e2d324 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c6e721d82335adb3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 67532787e996dd..785777058f8c4a 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -89,33 +89,21 @@ static PyObject * EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"length", NULL}; static _PyArg_Parser _parser = { @@ -169,33 +157,21 @@ static PyObject * EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"length", NULL}; static _PyArg_Parser _parser = { @@ -253,33 +229,21 @@ static PyObject * EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(name), &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -340,33 +304,21 @@ static PyObject * _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -425,33 +377,21 @@ static PyObject * _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -510,33 +450,21 @@ static PyObject * _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -595,33 +523,21 @@ static PyObject * _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -680,33 +596,21 @@ static PyObject * _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -765,33 +669,21 @@ static PyObject * _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -852,33 +744,21 @@ static PyObject * _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -941,33 +821,21 @@ static PyObject * _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -1030,33 +898,21 @@ static PyObject * _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -1119,33 +975,21 @@ static PyObject * _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -1208,33 +1052,21 @@ static PyObject * _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -1297,33 +1129,21 @@ static PyObject * _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -1386,33 +1206,21 @@ static PyObject * pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(hash_name), &_Py_ID(password), &_Py_ID(salt), &_Py_ID(iterations), &_Py_ID(dklen), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"hash_name", "password", "salt", "iterations", "dklen", NULL}; static _PyArg_Parser _parser = { @@ -1505,33 +1313,21 @@ static PyObject * _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(password), &_Py_ID(salt), &_Py_ID(n), &_Py_ID(r), &_Py_ID(p), &_Py_ID(maxmem), &_Py_ID(dklen), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"password", "salt", "n", "r", "p", "maxmem", "dklen", NULL}; static _PyArg_Parser _parser = { @@ -1654,33 +1450,21 @@ static PyObject * _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digest), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "msg", "digest", NULL}; static _PyArg_Parser _parser = { @@ -1745,33 +1529,21 @@ static PyObject * _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digestmod), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "msg", "digestmod", NULL}; static _PyArg_Parser _parser = { @@ -1853,33 +1625,21 @@ static PyObject * _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(msg), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"msg", NULL}; static _PyArg_Parser _parser = { @@ -2051,4 +1811,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=8c1bb9faad2b6b57 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=50b27b4c8a9d8995 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 8fce25686afde2..202286340a1052 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -101,33 +101,21 @@ static PyObject * _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(data), &_Py_ID(max_length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "max_length", NULL}; static _PyArg_Parser _parser = { @@ -210,33 +198,21 @@ static int _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(format), &_Py_ID(memlimit), &_Py_ID(filters), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"format", "memlimit", "filters", NULL}; static _PyArg_Parser _parser = { @@ -358,4 +334,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=2713a1ba282060d3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=39acc74d6985803d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 1844d7000529ed..52cf74283f64a0 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -25,33 +25,21 @@ static PyObject * _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(jump), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "jump", NULL}; static _PyArg_Parser _parser = { @@ -113,4 +101,4 @@ _opcode_get_specialization_stats(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _opcode_get_specialization_stats_impl(module); } -/*[clinic end generated code: output=99bf9024ab436fa3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c750638a652227d3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index a9bb84377df842..3ffe6559defc0a 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -112,33 +112,21 @@ static int _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(file), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "protocol", "fix_imports", "buffer_callback", NULL}; static _PyArg_Parser _parser = { @@ -365,33 +353,21 @@ static int _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(file), &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "fix_imports", "encoding", "errors", "buffers", NULL}; static _PyArg_Parser _parser = { @@ -569,33 +545,21 @@ static PyObject * _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(obj), &_Py_ID(file), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"obj", "file", "protocol", "fix_imports", "buffer_callback", NULL}; static _PyArg_Parser _parser = { @@ -683,33 +647,21 @@ static PyObject * _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(obj), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"obj", "protocol", "fix_imports", "buffer_callback", NULL}; static _PyArg_Parser _parser = { @@ -801,33 +753,21 @@ static PyObject * _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(file), &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "fix_imports", "encoding", "errors", "buffers", NULL}; static _PyArg_Parser _parser = { @@ -937,33 +877,21 @@ static PyObject * _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "fix_imports", "encoding", "errors", "buffers", NULL}; static _PyArg_Parser _parser = { @@ -1040,4 +968,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=fecab7d905b02139 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b6c91d0bb93fe9d7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index c2f0d6ed86bd4e..9c7defcc6410d0 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -58,33 +58,21 @@ static PyObject * _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(item), &_Py_ID(block), &_Py_ID(timeout), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"item", "block", "timeout", NULL}; static _PyArg_Parser _parser = { @@ -143,33 +131,21 @@ static PyObject * _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(item), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"item", NULL}; static _PyArg_Parser _parser = { @@ -217,33 +193,21 @@ static PyObject * _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"block", "timeout", NULL}; static _PyArg_Parser _parser = { @@ -362,4 +326,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=def30d57235bc720 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=009d2b2985c53be1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 819c7ee878ffd1..d73dfb65a1644f 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -354,33 +354,21 @@ static PyObject * _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(cb_type), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"cb_type", NULL}; static _PyArg_Parser _parser = { @@ -570,33 +558,21 @@ static PyObject * _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(certfile), &_Py_ID(keyfile), &_Py_ID(password), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"certfile", "keyfile", "password", NULL}; static _PyArg_Parser _parser = { @@ -651,33 +627,21 @@ static PyObject * _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(cafile), &_Py_ID(capath), &_Py_ID(cadata), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"cafile", "capath", "cadata", NULL}; static _PyArg_Parser _parser = { @@ -745,33 +709,21 @@ static PyObject * _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(sock), &_Py_ID(server_side), &_Py_ID(server_hostname), &_Py_ID(owner), &_Py_ID(session), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sock", "server_side", "server_hostname", "owner", "session", NULL}; static _PyArg_Parser _parser = { @@ -847,33 +799,21 @@ static PyObject * _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 6 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[6]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) .ob_item = { &_Py_ID(incoming), &_Py_ID(outgoing), &_Py_ID(server_side), &_Py_ID(server_hostname), &_Py_ID(owner), &_Py_ID(session), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"incoming", "outgoing", "server_side", "server_hostname", "owner", "session", NULL}; static _PyArg_Parser _parser = { @@ -1024,33 +964,21 @@ static PyObject * _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(binary_form), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"binary_form", NULL}; static _PyArg_Parser _parser = { @@ -1354,33 +1282,21 @@ static PyObject * _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(txt), &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"txt", "name", NULL}; static _PyArg_Parser _parser = { @@ -1477,33 +1393,21 @@ static PyObject * _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(store_name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"store_name", NULL}; static _PyArg_Parser _parser = { @@ -1563,33 +1467,21 @@ static PyObject * _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(store_name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"store_name", NULL}; static _PyArg_Parser _parser = { @@ -1633,4 +1525,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=243724694a274b72 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=52d2d1aeb0031666 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index c7fa663f78616c..cc2683abff340f 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -26,33 +26,21 @@ static int Struct___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(format), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"format", NULL}; static _PyArg_Parser _parser = { @@ -142,33 +130,21 @@ static PyObject * Struct_unpack_from(PyStructObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(buffer), &_Py_ID(offset), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"buffer", "offset", NULL}; static _PyArg_Parser _parser = { @@ -357,33 +333,21 @@ static PyObject * unpack_from(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(buffer), &_Py_ID(offset), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "buffer", "offset", NULL}; static _PyArg_Parser _parser = { @@ -481,4 +445,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=f968221cff7bc5b3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8c9dbbba919a0fc3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index 2add29fe8a6d86..d433488ad0d287 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -79,33 +79,21 @@ static PyObject * _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(n), &_Py_ID(twice), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"n", "twice", NULL}; static _PyArg_Parser _parser = { @@ -172,4 +160,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=34ad05704fd7f815 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fcd8c6cff407aca8 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index 07cd442a96d5a1..1b3bed2698b226 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -112,33 +112,21 @@ static PyObject * _winapi_ConnectNamedPipe(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(handle), &_Py_ID(overlapped), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"handle", "overlapped", NULL}; static _PyArg_Parser _parser = { @@ -875,33 +863,21 @@ static PyObject * _winapi_LCMapStringEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(locale), &_Py_ID(flags), &_Py_ID(src), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"locale", "flags", "src", NULL}; static _PyArg_Parser _parser = { @@ -945,33 +921,21 @@ static PyObject * _winapi_ReadFile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(handle), &_Py_ID(size), &_Py_ID(overlapped), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"handle", "size", "overlapped", NULL}; static _PyArg_Parser _parser = { @@ -1203,33 +1167,21 @@ static PyObject * _winapi_WriteFile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(handle), &_Py_ID(buffer), &_Py_ID(overlapped), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"handle", "buffer", "overlapped", NULL}; static _PyArg_Parser _parser = { @@ -1285,33 +1237,21 @@ static PyObject * _winapi_GetFileType(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(handle), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"handle", NULL}; static _PyArg_Parser _parser = { @@ -1357,33 +1297,21 @@ static PyObject * _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(on_type_read), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"on_type_read", NULL}; static _PyArg_Parser _parser = { @@ -1405,4 +1333,4 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=5febc912fc8ff4ec input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c71b900b526c27a2 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index b9ce96f3f7e966..e68c3920072dbb 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -160,33 +160,11 @@ static PyObject * array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -336,33 +314,11 @@ static PyObject * array_array_fromfile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -414,33 +370,11 @@ static PyObject * array_array_tofile(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -689,33 +623,11 @@ static PyObject * array_array___reduce_ex__(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -768,4 +680,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=6cdb18b06fc993e0 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=69bc1451f7bda234 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 5afae34e8a2d87..f631d9e70b5c4c 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -55,33 +55,21 @@ static PyObject * binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(backtick), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "backtick", NULL}; static _PyArg_Parser _parser = { @@ -145,33 +133,21 @@ static PyObject * binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(strict_mode), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "strict_mode", NULL}; static _PyArg_Parser _parser = { @@ -226,33 +202,21 @@ static PyObject * binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(newline), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "newline", NULL}; static _PyArg_Parser _parser = { @@ -427,33 +391,21 @@ static PyObject * binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(data), &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "sep", "bytes_per_sep", NULL}; static _PyArg_Parser _parser = { @@ -530,33 +482,21 @@ static PyObject * binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(data), &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "sep", "bytes_per_sep", NULL}; static _PyArg_Parser _parser = { @@ -690,33 +630,21 @@ static PyObject * binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(data), &_Py_ID(header), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "header", NULL}; static _PyArg_Parser _parser = { @@ -776,33 +704,21 @@ static PyObject * binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(data), &_Py_ID(quotetabs), &_Py_ID(istext), &_Py_ID(header), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "quotetabs", "istext", "header", NULL}; static _PyArg_Parser _parser = { @@ -865,4 +781,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=83eb1173ff9f6393 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b0b6a0a2b582f36c input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index 6aa3d571711e5f..3ce0758ab495ce 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -899,33 +899,21 @@ static PyObject * cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(rel_tol), &_Py_ID(abs_tol), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", "rel_tol", "abs_tol", NULL}; static _PyArg_Parser _parser = { @@ -992,4 +980,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=d87babbf69f095b8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=42ea3c546a0600f9 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index af04398ac7a03e..c594040a36be03 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -94,33 +94,21 @@ static PyObject * gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(generation), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"generation", NULL}; static _PyArg_Parser _parser = { @@ -281,33 +269,21 @@ static PyObject * gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(generation), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"generation", NULL}; static _PyArg_Parser _parser = { @@ -444,4 +420,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=8c73502d349c8726 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bbf986401df8b6ad input=a9049054013a1b77]*/ diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h index 58dd2e22512a60..23620b17617390 100644 --- a/Modules/clinic/grpmodule.c.h +++ b/Modules/clinic/grpmodule.c.h @@ -26,33 +26,21 @@ static PyObject * grp_getgrgid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(id), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"id", NULL}; static _PyArg_Parser _parser = { @@ -93,33 +81,21 @@ static PyObject * grp_getgrnam(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", NULL}; static _PyArg_Parser _parser = { @@ -169,4 +145,4 @@ grp_getgrall(PyObject *module, PyObject *Py_UNUSED(ignored)) { return grp_getgrall_impl(module); } -/*[clinic end generated code: output=82d55ad1c7c612d2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7e0c715b1629caa6 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index b62c04acd6a7e8..31143f8a2f9204 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -60,33 +60,21 @@ static PyObject * itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(key), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "key", NULL}; static _PyArg_Parser _parser = { @@ -416,33 +404,21 @@ static PyObject * itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "r", NULL}; static _PyArg_Parser _parser = { @@ -497,33 +473,21 @@ static PyObject * itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "r", NULL}; static _PyArg_Parser _parser = { @@ -577,33 +541,21 @@ static PyObject * itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "r", NULL}; static _PyArg_Parser _parser = { @@ -649,33 +601,21 @@ static PyObject * itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(iterable), &_Py_ID(func), &_Py_ID(initial), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "func", "initial", NULL}; static _PyArg_Parser _parser = { @@ -734,33 +674,21 @@ static PyObject * itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(data), &_Py_ID(selectors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"data", "selectors", NULL}; static _PyArg_Parser _parser = { @@ -842,33 +770,21 @@ static PyObject * itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(start), &_Py_ID(step), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"start", "step", NULL}; static _PyArg_Parser _parser = { @@ -904,4 +820,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=66bc6a70f05e9bc7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6a11508348ff8bc9 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 3b4e0cc54b0c55..40486c6d62ae69 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -584,33 +584,21 @@ static PyObject * math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(rel_tol), &_Py_ID(abs_tol), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", "rel_tol", "abs_tol", NULL}; static _PyArg_Parser _parser = { @@ -712,33 +700,21 @@ static PyObject * math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(start), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "start", NULL}; static _PyArg_Parser _parser = { @@ -937,4 +913,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=9f9605edaac98c6c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=da661dd349ceb809 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index 9dd8fd50eb274b..5f08049654af8a 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -91,33 +91,21 @@ static PyObject * _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -158,4 +146,4 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw exit: return return_value; } -/*[clinic end generated code: output=4e0701fc285576d9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d1cdfd4e89a935da input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 71ad7a6f08584c..45e082052f12fc 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -452,33 +452,21 @@ static PyObject * _overlapped_Overlapped(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(event), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"event", NULL}; static _PyArg_Parser _parser = { @@ -1264,4 +1252,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=8a85a2b9616bf8f1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=96a8586837f7210b input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index da5beb5ab05cce..02c9b010fd61f1 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -43,33 +43,21 @@ static PyObject * os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -135,33 +123,21 @@ static PyObject * os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -241,33 +217,21 @@ static PyObject * os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), &_Py_ID(effective_ids), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -411,33 +375,21 @@ static PyObject * os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -486,33 +438,21 @@ static PyObject * os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -576,33 +516,21 @@ static PyObject * os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", "dir_fd", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -674,33 +602,21 @@ static PyObject * os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(fd), &_Py_ID(mode), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "mode", NULL}; static _PyArg_Parser _parser = { @@ -754,33 +670,21 @@ static PyObject * os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(mode), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", NULL}; static _PyArg_Parser _parser = { @@ -840,33 +744,21 @@ static PyObject * os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "flags", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -933,33 +825,21 @@ static PyObject * os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "flags", NULL}; static _PyArg_Parser _parser = { @@ -1013,33 +893,21 @@ static PyObject * os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -1087,33 +955,21 @@ static PyObject * os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -1180,33 +1036,21 @@ static PyObject * os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -1276,33 +1120,21 @@ static PyObject * os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(path), &_Py_ID(uid), &_Py_ID(gid), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "uid", "gid", "dir_fd", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -1379,33 +1211,21 @@ static PyObject * os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(fd), &_Py_ID(uid), &_Py_ID(gid), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "uid", "gid", NULL}; static _PyArg_Parser _parser = { @@ -1462,33 +1282,21 @@ static PyObject * os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(uid), &_Py_ID(gid), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "uid", "gid", NULL}; static _PyArg_Parser _parser = { @@ -1592,33 +1400,21 @@ static PyObject * os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -1709,33 +1505,21 @@ static PyObject * os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -1853,33 +1637,21 @@ static PyObject * os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -1927,33 +1699,21 @@ static PyObject * os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -1999,33 +1759,21 @@ static PyObject * os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -2071,33 +1819,21 @@ static PyObject * os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -2198,33 +1934,21 @@ static PyObject * os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(which), &_Py_ID(who), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"which", "who", NULL}; static _PyArg_Parser _parser = { @@ -2275,33 +1999,21 @@ static PyObject * os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(which), &_Py_ID(who), &_Py_ID(priority), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"which", "who", "priority", NULL}; static _PyArg_Parser _parser = { @@ -2362,33 +2074,21 @@ static PyObject * os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -2463,33 +2163,21 @@ static PyObject * os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -2562,33 +2250,21 @@ static PyObject * os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -2643,33 +2319,21 @@ static PyObject * os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(command), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"command", NULL}; static _PyArg_Parser _parser = { @@ -2727,33 +2391,21 @@ static PyObject * os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(command), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"command", NULL}; static _PyArg_Parser _parser = { @@ -2841,33 +2493,21 @@ static PyObject * os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -2925,33 +2565,21 @@ static PyObject * os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -3053,33 +2681,21 @@ static PyObject * os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(path), &_Py_ID(times), &_Py_ID(ns), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "times", "ns", "dir_fd", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -3160,33 +2776,21 @@ static PyObject * os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -3281,33 +2885,21 @@ static PyObject * os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(argv), &_Py_ID(env), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "argv", "env", NULL}; static _PyArg_Parser _parser = { @@ -3386,33 +2978,21 @@ static PyObject * os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(file_actions), &_Py_ID(setpgroup), &_Py_ID(resetids), &_Py_ID(setsid), &_Py_ID(setsigmask), &_Py_ID(setsigdef), &_Py_ID(scheduler), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "", "file_actions", "setpgroup", "resetids", "setsid", "setsigmask", "setsigdef", "scheduler", NULL}; static _PyArg_Parser _parser = { @@ -3546,33 +3126,21 @@ static PyObject * os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(file_actions), &_Py_ID(setpgroup), &_Py_ID(resetids), &_Py_ID(setsid), &_Py_ID(setsigmask), &_Py_ID(setsigdef), &_Py_ID(scheduler), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "", "file_actions", "setpgroup", "resetids", "setsid", "setsigmask", "setsigdef", "scheduler", NULL}; static _PyArg_Parser _parser = { @@ -3799,33 +3367,21 @@ static PyObject * os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(before), &_Py_ID(after_in_child), &_Py_ID(after_in_parent), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"before", "after_in_child", "after_in_parent", NULL}; static _PyArg_Parser _parser = { @@ -3935,33 +3491,21 @@ static PyObject * os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(policy), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"policy", NULL}; static _PyArg_Parser _parser = { @@ -4007,33 +3551,21 @@ static PyObject * os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(policy), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"policy", NULL}; static _PyArg_Parser _parser = { @@ -4112,33 +3644,21 @@ static PyObject * os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(sched_priority), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sched_priority", NULL}; static _PyArg_Parser _parser = { @@ -4814,33 +4334,21 @@ static PyObject * os_getpgid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(pid), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"pid", NULL}; static _PyArg_Parser _parser = { @@ -5308,33 +4816,21 @@ static PyObject * os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(options), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"options", NULL}; static _PyArg_Parser _parser = { @@ -5383,33 +4879,21 @@ static PyObject * os_wait4(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(pid), &_Py_ID(options), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"pid", "options", NULL}; static _PyArg_Parser _parser = { @@ -5600,33 +5084,21 @@ static PyObject * os_pidfd_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(pid), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"pid", "flags", NULL}; static _PyArg_Parser _parser = { @@ -5674,33 +5146,21 @@ static PyObject * os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -5768,33 +5228,21 @@ static PyObject * os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(target_is_directory), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "target_is_directory", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -6051,33 +5499,21 @@ static PyObject * os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "flags", "mode", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -6154,33 +5590,21 @@ static PyObject * os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -6293,33 +5717,21 @@ static PyObject * os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(fd), &_Py_ID(fd2), &_Py_ID(inheritable), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "fd2", "inheritable", NULL}; static _PyArg_Parser _parser = { @@ -6755,33 +6167,21 @@ static PyObject * os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), &_Py_ID(headers), &_Py_ID(trailers), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"out_fd", "in_fd", "offset", "count", "headers", "trailers", "flags", NULL}; static _PyArg_Parser _parser = { @@ -6867,33 +6267,21 @@ static PyObject * os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), &_Py_ID(headers), &_Py_ID(trailers), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"out_fd", "in_fd", "offset", "count", "headers", "trailers", "flags", NULL}; static _PyArg_Parser _parser = { @@ -6986,33 +6374,21 @@ static PyObject * os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"out_fd", "in_fd", "offset", "count", NULL}; static _PyArg_Parser _parser = { @@ -7124,33 +6500,21 @@ static PyObject * os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -7486,33 +6850,21 @@ static PyObject * os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(count), &_Py_ID(offset_src), &_Py_ID(offset_dst), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "count", "offset_src", "offset_dst", NULL}; static _PyArg_Parser _parser = { @@ -7610,33 +6962,21 @@ static PyObject * os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 6 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[6]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(count), &_Py_ID(offset_src), &_Py_ID(offset_dst), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"src", "dst", "count", "offset_src", "offset_dst", "flags", NULL}; static _PyArg_Parser _parser = { @@ -7728,33 +7068,21 @@ static PyObject * os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -7838,33 +7166,21 @@ static PyObject * os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(device), &_Py_ID(dir_fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "mode", "device", "dir_fd", NULL}; static _PyArg_Parser _parser = { @@ -8103,33 +7419,21 @@ static PyObject * os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "length", NULL}; static _PyArg_Parser _parser = { @@ -8514,33 +7818,21 @@ static PyObject * os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8591,33 +7883,21 @@ static PyObject * os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8668,33 +7948,21 @@ static PyObject * os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8745,33 +8013,21 @@ static PyObject * os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8822,33 +8078,21 @@ static PyObject * os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8899,33 +8143,21 @@ static PyObject * os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -8976,33 +8208,21 @@ static PyObject * os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -9091,33 +8311,21 @@ static PyObject * os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -9165,33 +8373,21 @@ static PyObject * os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -9288,33 +8484,21 @@ static PyObject * os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(name), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "name", NULL}; static _PyArg_Parser _parser = { @@ -9487,33 +8671,21 @@ static PyObject * os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(filepath), &_Py_ID(operation), &_Py_ID(arguments), &_Py_ID(cwd), &_Py_ID(show_cmd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"filepath", "operation", "arguments", "cwd", "show_cmd", NULL}; static _PyArg_Parser _parser = { @@ -9641,33 +8813,21 @@ static PyObject * os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -9845,33 +9005,21 @@ static PyObject * os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "attribute", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -9942,33 +9090,21 @@ static PyObject * os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(value), &_Py_ID(flags), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "attribute", "value", "flags", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -10064,33 +9200,21 @@ static PyObject * os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "attribute", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -10160,33 +9284,21 @@ static PyObject * os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(path), &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", "follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -10288,33 +9400,21 @@ static PyObject * os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(name), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "flags", NULL}; static _PyArg_Parser _parser = { @@ -10372,33 +9472,21 @@ static PyObject * os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(initval), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"initval", "flags", NULL}; static _PyArg_Parser _parser = { @@ -10453,33 +9541,21 @@ static PyObject * os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -10524,33 +9600,21 @@ static PyObject * os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(fd), &_Py_ID(value), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "value", NULL}; static _PyArg_Parser _parser = { @@ -10924,33 +9988,21 @@ static PyObject * os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -10998,33 +10050,21 @@ static PyObject * os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -11077,33 +10117,21 @@ static PyObject * os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(follow_symlinks), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"follow_symlinks", NULL}; static _PyArg_Parser _parser = { @@ -11197,33 +10225,21 @@ static PyObject * os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -11276,33 +10292,21 @@ static PyObject * os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -11343,33 +10347,21 @@ static PyObject * os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(size), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"size", "flags", NULL}; static _PyArg_Parser _parser = { @@ -11440,33 +10432,21 @@ static PyObject * os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(path), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"path", NULL}; static _PyArg_Parser _parser = { @@ -11518,33 +10498,21 @@ static PyObject * os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(cookie), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"cookie", NULL}; static _PyArg_Parser _parser = { @@ -11599,33 +10567,21 @@ static PyObject * os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(status), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"status", NULL}; static _PyArg_Parser _parser = { @@ -12237,4 +11193,4 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na #ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF #define OS_WAITSTATUS_TO_EXITCODE_METHODDEF #endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */ -/*[clinic end generated code: output=de9700c5cedd6f55 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1098a7cfade9ccf3 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index e8947aad79690d..8a94808b1ee32c 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -27,33 +27,11 @@ static PyObject * pyexpat_xmlparser_Parse(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -102,33 +80,11 @@ static PyObject * pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -247,33 +203,11 @@ static PyObject * pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", "", NULL}; static _PyArg_Parser _parser = { @@ -387,33 +321,11 @@ static PyObject * pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -463,33 +375,21 @@ static PyObject * pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(encoding), &_Py_ID(namespace_separator), &_Py_ID(intern), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"encoding", "namespace_separator", "intern", NULL}; static _PyArg_Parser _parser = { @@ -596,4 +496,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=94c16fdc27f36fae input=a9049054013a1b77]*/ +/*[clinic end generated code: output=965b72d4db77696e input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index 14c4d13c215271..8c50a92e0af04f 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -528,33 +528,21 @@ static PyObject * select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sizehint), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sizehint", "flags", NULL}; static _PyArg_Parser _parser = { @@ -704,33 +692,21 @@ static PyObject * select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(fd), &_Py_ID(eventmask), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "eventmask", NULL}; static _PyArg_Parser _parser = { @@ -791,33 +767,21 @@ static PyObject * select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(fd), &_Py_ID(eventmask), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", "eventmask", NULL}; static _PyArg_Parser _parser = { @@ -870,33 +834,21 @@ static PyObject * select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(fd), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fd", NULL}; static _PyArg_Parser _parser = { @@ -951,33 +903,21 @@ static PyObject * select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(timeout), &_Py_ID(maxevents), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"timeout", "maxevents", NULL}; static _PyArg_Parser _parser = { @@ -1360,4 +1300,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=54df930a8e55d87e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fd0e09b87b5224e5 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index cb1354ad2a0675..90b104ca4f278b 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -91,33 +91,21 @@ static PyObject * _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -158,4 +146,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=cefc4e5d2d92698a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0b960b6c804e0e74 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h index a55008d2a9a59a..d842b2c00838fb 100644 --- a/Modules/clinic/sha256module.c.h +++ b/Modules/clinic/sha256module.c.h @@ -91,33 +91,21 @@ static PyObject * _sha256_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -175,33 +163,21 @@ static PyObject * _sha256_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -242,4 +218,4 @@ _sha256_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje exit: return return_value; } -/*[clinic end generated code: output=15651dcd37e35962 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14d3d2fc52748f00 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h index 958de317dee6bb..cc1db6c81a5291 100644 --- a/Modules/clinic/sha512module.c.h +++ b/Modules/clinic/sha512module.c.h @@ -91,33 +91,21 @@ static PyObject * _sha512_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -175,33 +163,21 @@ static PyObject * _sha512_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"string", "usedforsecurity", NULL}; static _PyArg_Parser _parser = { @@ -242,4 +218,4 @@ _sha512_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje exit: return return_value; } -/*[clinic end generated code: output=dff35c49c5d07fae input=a9049054013a1b77]*/ +/*[clinic end generated code: output=157933e88662a202 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 9c5a9647713824..17c80acd506b36 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -16,33 +16,21 @@ static int sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(family), &_Py_ID(type), &_Py_ID(proto), &_Py_ID(fileno), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"family", "type", "proto", "fileno", NULL}; static _PyArg_Parser _parser = { @@ -101,4 +89,4 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=a2c5f7be40570213 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=81d4e46affca18d9 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 8ceaf28073b38f..1bb4c010c49cdd 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -31,33 +31,21 @@ static PyObject * zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(level), &_Py_ID(wbits), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "level", "wbits", NULL}; static _PyArg_Parser _parser = { @@ -135,33 +123,21 @@ static PyObject * zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(wbits), &_Py_ID(bufsize), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "wbits", "bufsize", NULL}; static _PyArg_Parser _parser = { @@ -264,33 +240,21 @@ static PyObject * zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 6 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[6]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) .ob_item = { &_Py_ID(level), &_Py_ID(method), &_Py_ID(wbits), &_Py_ID(memLevel), &_Py_ID(strategy), &_Py_ID(zdict), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"level", "method", "wbits", "memLevel", "strategy", "zdict", NULL}; static _PyArg_Parser _parser = { @@ -401,33 +365,21 @@ static PyObject * zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(wbits), &_Py_ID(zdict), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"wbits", "zdict", NULL}; static _PyArg_Parser _parser = { @@ -489,33 +441,11 @@ static PyObject * zlib_Compress_compress(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -577,33 +507,21 @@ static PyObject * zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(max_length), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "max_length", NULL}; static _PyArg_Parser _parser = { @@ -677,33 +595,11 @@ static PyObject * zlib_Compress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -802,33 +698,11 @@ static PyObject * zlib_Compress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -922,33 +796,11 @@ static PyObject * zlib_Decompress___deepcopy__(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -993,33 +845,11 @@ static PyObject * zlib_Decompress_flush(compobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 0 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = { }, - }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif static const char * const _keywords[] = {"", NULL}; static _PyArg_Parser _parser = { @@ -1191,4 +1021,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=ea8865903fb98344 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9f81d7e0a2b5ce9f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index a2b8108b1b7d3c..0cd4ffabfafae8 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -16,33 +16,21 @@ static int bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(source), &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"source", "encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -249,33 +237,21 @@ static PyObject * bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(delete), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "delete", NULL}; static _PyArg_Parser _parser = { @@ -462,33 +438,21 @@ static PyObject * bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -594,33 +558,21 @@ static PyObject * bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -981,33 +933,21 @@ static PyObject * bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -1098,33 +1038,21 @@ static PyObject * bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(keepends), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"keepends", NULL}; static _PyArg_Parser _parser = { @@ -1223,33 +1151,21 @@ static PyObject * bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "bytes_per_sep", NULL}; static _PyArg_Parser _parser = { @@ -1357,4 +1273,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=d3a4d0ae9fb8c738 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=849a319750e5be5c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 595566b124a540..95b49b72ea0256 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -50,33 +50,21 @@ static PyObject * bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -234,33 +222,21 @@ static PyObject * bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -446,33 +422,21 @@ static PyObject * bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(delete), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "delete", NULL}; static _PyArg_Parser _parser = { @@ -739,33 +703,21 @@ static PyObject * bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -843,33 +795,21 @@ static PyObject * bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(keepends), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"keepends", NULL}; static _PyArg_Parser _parser = { @@ -968,33 +908,21 @@ static PyObject * bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "bytes_per_sep", NULL}; static _PyArg_Parser _parser = { @@ -1040,33 +968,21 @@ static PyObject * bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(source), &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"source", "encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -1133,4 +1049,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=2e2262ea3fb16bd3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=85531f9e2dc5148e input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index 34a6fe950e9d8a..b2068d2ee5a5ff 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -192,33 +192,21 @@ static PyObject * code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 18 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[18]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 18) .ob_item = { &_Py_ID(co_argcount), &_Py_ID(co_posonlyargcount), &_Py_ID(co_kwonlyargcount), &_Py_ID(co_nlocals), &_Py_ID(co_stacksize), &_Py_ID(co_flags), &_Py_ID(co_firstlineno), &_Py_ID(co_code), &_Py_ID(co_consts), &_Py_ID(co_names), &_Py_ID(co_varnames), &_Py_ID(co_freevars), &_Py_ID(co_cellvars), &_Py_ID(co_filename), &_Py_ID(co_name), &_Py_ID(co_qualname), &_Py_ID(co_linetable), &_Py_ID(co_exceptiontable), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"co_argcount", "co_posonlyargcount", "co_kwonlyargcount", "co_nlocals", "co_stacksize", "co_flags", "co_firstlineno", "co_code", "co_consts", "co_names", "co_varnames", "co_freevars", "co_cellvars", "co_filename", "co_name", "co_qualname", "co_linetable", "co_exceptiontable", NULL}; static _PyArg_Parser _parser = { @@ -457,33 +445,21 @@ static PyObject * code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(oparg), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"oparg", NULL}; static _PyArg_Parser _parser = { @@ -508,4 +484,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=5dec2deb4a909b1b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5f97acf4a317a786 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 6c5ca3b4db599f..5eec880940ecdb 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -108,33 +108,21 @@ static PyObject * complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(real), &_Py_ID(imag), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"real", "imag", NULL}; static _PyArg_Parser _parser = { @@ -170,4 +158,4 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=cbd44b1d2428d4d8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0b9f12050d70c462 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 145eba5ef33cb3..142848379cf58a 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -15,33 +15,21 @@ static PyObject * mappingproxy_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(mapping), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"mapping", NULL}; static _PyArg_Parser _parser = { @@ -111,33 +99,21 @@ static int property_init(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(fget), &_Py_ID(fset), &_Py_ID(fdel), &_Py_ID(doc), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"fget", "fset", "fdel", "doc", NULL}; static _PyArg_Parser _parser = { @@ -187,4 +163,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=8079991d1579d46d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0a16d3f1f58901fd input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 62b1c901caa583..3fbf439910e114 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -30,33 +30,21 @@ static PyObject * enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(start), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "start", NULL}; static _PyArg_Parser _parser = { @@ -117,4 +105,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=ee3984d523ead60e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=da7b5b91a6f1b371 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 4580b3b3f95919..2d06a0a76cbed8 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -33,33 +33,21 @@ static PyObject * func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(code), &_Py_ID(globals), &_Py_ID(name), &_Py_ID(argdefs), &_Py_ID(closure), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"code", "globals", "name", "argdefs", "closure", NULL}; static _PyArg_Parser _parser = { @@ -114,4 +102,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=d1e30fc268fadb6f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6a8b851396d4f8e1 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 13922f0ff09c3f..1219e2964dce98 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -172,33 +172,21 @@ static PyObject * list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(reverse), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "reverse", NULL}; static _PyArg_Parser _parser = { @@ -392,4 +380,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=45d61f54b3ab33ff input=a9049054013a1b77]*/ +/*[clinic end generated code: output=db59fe39806487d5 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 08138c85f102d1..21973346e73448 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -15,33 +15,21 @@ static PyObject * long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(base), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "base", NULL}; static _PyArg_Parser _parser = { @@ -296,33 +284,21 @@ static PyObject * int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(length), &_Py_ID(byteorder), &_Py_ID(signed), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"length", "byteorder", "signed", NULL}; static _PyArg_Parser _parser = { @@ -420,33 +396,21 @@ static PyObject * int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(bytes), &_Py_ID(byteorder), &_Py_ID(signed), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"bytes", "byteorder", "signed", NULL}; static _PyArg_Parser _parser = { @@ -496,4 +460,4 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb exit: return return_value; } -/*[clinic end generated code: output=8c99dba22fab5787 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c0f4be6b9c4a9718 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index dd21cf6f1cef93..0b19e0dd69fe5a 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -21,33 +21,21 @@ static PyObject * memoryview(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(object), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"object", NULL}; static _PyArg_Parser _parser = { @@ -107,33 +95,21 @@ static PyObject * memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(format), &_Py_ID(shape), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"format", "shape", NULL}; static _PyArg_Parser _parser = { @@ -228,33 +204,21 @@ static PyObject * memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(order), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"order", NULL}; static _PyArg_Parser _parser = { @@ -333,33 +297,21 @@ static PyObject * memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "bytes_per_sep", NULL}; static _PyArg_Parser _parser = { @@ -396,4 +348,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=9617628ea080c887 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=db15d56c1d6980c7 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index 1208d6cf294321..a3cd5f05e4d727 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -23,33 +23,21 @@ static int module___init__(PyObject *self, PyObject *args, PyObject *kwargs) { int return_value = -1; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(name), &_Py_ID(doc), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "doc", NULL}; static _PyArg_Parser _parser = { @@ -87,4 +75,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=44f58e856e7f3821 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bda1c2523136cae5 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index 3485ca72e5302b..a9acc877196f45 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -24,33 +24,21 @@ static PyObject * OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(iterable), &_Py_ID(value), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"iterable", "value", NULL}; static _PyArg_Parser _parser = { @@ -99,33 +87,21 @@ static PyObject * OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "default", NULL}; static _PyArg_Parser _parser = { @@ -175,33 +151,21 @@ static PyObject * OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "default", NULL}; static _PyArg_Parser _parser = { @@ -249,33 +213,21 @@ static PyObject * OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(last), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"last", NULL}; static _PyArg_Parser _parser = { @@ -324,33 +276,21 @@ static PyObject * OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(last), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "last", NULL}; static _PyArg_Parser _parser = { @@ -382,4 +322,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=39e6c9c21a594053 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b5f283ccb30d58cd input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index b35afa6e069d3f..e7c8b8b4f0f24c 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -15,33 +15,21 @@ static PyObject * structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sequence), &_Py_ID(dict), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sequence", "dict", NULL}; static _PyArg_Parser _parser = { @@ -72,4 +60,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=04b155379fef0f60 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=877766d79425a53b input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 959e3bbc988f6f..9252dd015e907f 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -160,33 +160,21 @@ static PyObject * unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -263,33 +251,21 @@ static PyObject * unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(tabsize), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"tabsize", NULL}; static _PyArg_Parser _parser = { @@ -974,33 +950,21 @@ static PyObject * unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -1106,33 +1070,21 @@ static PyObject * unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "maxsplit", NULL}; static _PyArg_Parser _parser = { @@ -1197,33 +1149,21 @@ static PyObject * unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(keepends), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"keepends", NULL}; static _PyArg_Parser _parser = { @@ -1464,33 +1404,21 @@ static PyObject * unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(object), &_Py_ID(encoding), &_Py_ID(errors), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"object", "encoding", "errors", NULL}; static _PyArg_Parser _parser = { @@ -1557,4 +1485,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=7688af9eecfc6bfd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=03ac50defdc6a9c1 input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 7de659a70b0384..2ce7ebb14af82e 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -26,33 +26,21 @@ static PyObject * stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(tabsize), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"tabsize", NULL}; static _PyArg_Parser _parser = { @@ -288,4 +276,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=a4fa1e513dd6a2f3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e8860c16bac89939 input=a9049054013a1b77]*/ diff --git a/PC/clinic/_testconsole.c.h b/PC/clinic/_testconsole.c.h index 7250150232b9f6..d51b4f204f0aa9 100644 --- a/PC/clinic/_testconsole.c.h +++ b/PC/clinic/_testconsole.c.h @@ -27,33 +27,21 @@ static PyObject * _testconsole_write_input(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(file), &_Py_ID(s), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", "s", NULL}; static _PyArg_Parser _parser = { @@ -102,33 +90,21 @@ static PyObject * _testconsole_read_output(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(file), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"file", NULL}; static _PyArg_Parser _parser = { @@ -160,4 +136,4 @@ _testconsole_read_output(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef _TESTCONSOLE_READ_OUTPUT_METHODDEF #define _TESTCONSOLE_READ_OUTPUT_METHODDEF #endif /* !defined(_TESTCONSOLE_READ_OUTPUT_METHODDEF) */ -/*[clinic end generated code: output=73b7768a87e295a9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=715f638690f09ae5 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 2cf50ef5ce3467..6a1079245a4afb 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -93,33 +93,21 @@ static PyObject * winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(exc_type), &_Py_ID(exc_value), &_Py_ID(traceback), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"exc_type", "exc_value", "traceback", NULL}; static _PyArg_Parser _parser = { @@ -325,33 +313,21 @@ static PyObject * winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; static _PyArg_Parser _parser = { @@ -512,33 +488,21 @@ static PyObject * winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(access), &_Py_ID(reserved), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "sub_key", "access", "reserved", NULL}; static _PyArg_Parser _parser = { @@ -926,33 +890,21 @@ static PyObject * winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; static _PyArg_Parser _parser = { @@ -1049,33 +1001,21 @@ static PyObject * winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "sub_key", "reserved", "access", NULL}; static _PyArg_Parser _parser = { @@ -1629,4 +1569,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=dc148c077a03843e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=69741cf92c8679e9 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index c4814104fd309c..2ac3db547a6718 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -29,33 +29,21 @@ static PyObject * winsound_PlaySound(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(sound), &_Py_ID(flags), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sound", "flags", NULL}; static _PyArg_Parser _parser = { @@ -105,33 +93,21 @@ static PyObject * winsound_Beep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(frequency), &_Py_ID(duration), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"frequency", "duration", NULL}; static _PyArg_Parser _parser = { @@ -180,33 +156,21 @@ static PyObject * winsound_MessageBeep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(type), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"type", NULL}; static _PyArg_Parser _parser = { @@ -236,4 +200,4 @@ winsound_MessageBeep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=bdca8518ca517fd8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8f2b830992e924ba input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index 61bf2915515337..09fb9e12b5e2c6 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -15,33 +15,21 @@ static PyObject * tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(source), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"source", NULL}; static _PyArg_Parser _parser = { @@ -77,4 +65,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=5664c98597aec79e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f4ad6c00049b8fbd input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index 7944412dfdb0f3..cbf6d911d23008 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -25,33 +25,21 @@ static PyObject * warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(message), &_Py_ID(category), &_Py_ID(stacklevel), &_Py_ID(source), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"message", "category", "stacklevel", "source", NULL}; static _PyArg_Parser _parser = { @@ -127,33 +115,21 @@ static PyObject * warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 8 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[8]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) .ob_item = { &_Py_ID(message), &_Py_ID(category), &_Py_ID(filename), &_Py_ID(lineno), &_Py_ID(module), &_Py_ID(registry), &_Py_ID(module_globals), &_Py_ID(source), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"message", "category", "filename", "lineno", "module", "registry", "module_globals", "source", NULL}; static _PyArg_Parser _parser = { @@ -219,4 +195,4 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=264258fa6b1b0c36 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=587aba8230c8a221 input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index 76f9fcab80c340..9e99b3c0cd41d6 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -40,33 +40,21 @@ static PyObject * builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 5 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[5]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) .ob_item = { &_Py_ID(name), &_Py_ID(globals), &_Py_ID(locals), &_Py_ID(fromlist), &_Py_ID(level), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"name", "globals", "locals", "fromlist", "level", NULL}; static _PyArg_Parser _parser = { @@ -292,33 +280,21 @@ static PyObject * builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 7 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[7]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) .ob_item = { &_Py_ID(source), &_Py_ID(filename), &_Py_ID(mode), &_Py_ID(flags), &_Py_ID(dont_inherit), &_Py_ID(optimize), &_Py_ID(_feature_version), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", "_feature_version", NULL}; static _PyArg_Parser _parser = { @@ -504,33 +480,21 @@ static PyObject * builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(closure), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "", "closure", NULL}; static _PyArg_Parser _parser = { @@ -848,33 +812,21 @@ static PyObject * builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(base), &_Py_ID(exp), &_Py_ID(mod), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"base", "exp", "mod", NULL}; static _PyArg_Parser _parser = { @@ -932,33 +884,21 @@ static PyObject * builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(sep), &_Py_ID(end), &_Py_ID(file), &_Py_ID(flush), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"sep", "end", "file", "flush", NULL}; static _PyArg_Parser _parser = { @@ -1081,33 +1021,21 @@ static PyObject * builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(number), &_Py_ID(ndigits), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"number", "ndigits", NULL}; static _PyArg_Parser _parser = { @@ -1157,33 +1085,21 @@ static PyObject * builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(start), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "start", NULL}; static _PyArg_Parser _parser = { @@ -1282,4 +1198,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=4590e66a40312a9f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=86126812a48f432e input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 69eebde6d6b3e4..5575ca17e412b1 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -199,33 +199,21 @@ static PyObject * _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(withdata), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "withdata", NULL}; static _PyArg_Parser _parser = { @@ -565,33 +553,21 @@ static PyObject * _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(key), &_Py_ID(source), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"key", "source", NULL}; static _PyArg_Parser _parser = { @@ -637,4 +613,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=7d75c10a93f2f26c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=fd65dd97485d679d input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index e1021bbbd78808..9501958ba44e05 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -24,33 +24,21 @@ static PyObject * sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(hook), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"hook", NULL}; static _PyArg_Parser _parser = { @@ -464,33 +452,21 @@ static PyObject * sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(depth), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"depth", NULL}; static _PyArg_Parser _parser = { @@ -1190,4 +1166,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=b8b125686bc745a6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f1a7d3e4d16cafc5 input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index 5de11021b497ea..bd5db806194e33 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -22,33 +22,21 @@ static PyObject * tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(tb_next), &_Py_ID(tb_frame), &_Py_ID(tb_lasti), &_Py_ID(tb_lineno), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"tb_next", "tb_frame", "tb_lasti", "tb_lineno", NULL}; static _PyArg_Parser _parser = { @@ -88,4 +76,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=130ba2a638849c70 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=99884fd1eb717db9 input=a9049054013a1b77]*/ diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 4fdf917a71929a..b9abb67ed2d0e5 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -536,13 +536,13 @@ def normalize_snippet(s, *, indent=0): def declare_parser(f, *, hasformat=False): - def num_keywords(f): + def keywords(f): params = f.parameters.values() kwds = [ p for p in params if not p.is_positional_only() and not p.is_vararg() ] - return len(kwds) + return kwds """ Generates the code template for a static local PyArg_Parser variable, @@ -556,43 +556,49 @@ def num_keywords(f): else: fname = '.fname = "{name}",' format_ = '' - declarations = """ - #define NUM_KEYWORDS %d - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - - 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 = {{ {keywords_py} }}, - }}; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) - - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS - - static const char * const _keywords[] = {{{keywords_c} NULL}}; - static _PyArg_Parser _parser = {{ - .keywords = _keywords, - %s - .kwtuple = KWTUPLE, - }}; - #undef KWTUPLE - """ % (num_keywords(f), format_ or fname) + num_keywords = len(keywords(f)) + if num_keywords == 0: + declarations = """ + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) + #else + # define KWTUPLE NULL + #endif + + static const char * const _keywords[] = {{{keywords_c} NULL}}; + static _PyArg_Parser _parser = {{ + .keywords = _keywords, + %s + .kwtuple = KWTUPLE, + }}; + #undef KWTUPLE + """ % (format_ or fname) + else: + declarations = """ + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + + static struct {{ + PyGC_Head _this_is_not_used; + PyObject_VAR_HEAD + PyObject *ob_item[%d]; + }} _kwtuple = {{ + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, %d) + .ob_item = {{ {keywords_py} }}, + }}; + #define KWTUPLE (&_kwtuple.ob_base.ob_base) + + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE + + static const char * const _keywords[] = {{{keywords_c} NULL}}; + static _PyArg_Parser _parser = {{ + .keywords = _keywords, + %s + .kwtuple = KWTUPLE, + }}; + #undef KWTUPLE + """ % (num_keywords, num_keywords, format_ or fname) return normalize_snippet(declarations) @@ -1450,7 +1456,6 @@ def render_function(self, clinic, f): template_dict['keywords_c'] = ' '.join('"' + k + '",' for k in data.keywords) keywords = [k for k in data.keywords if k] - template_dict['num_keywords'] = len(keywords) template_dict['keywords_py'] = ' '.join('&_Py_ID(' + k + '),' for k in keywords) template_dict['format_units'] = ''.join(data.format_units) From 793c5aa3d92b8343771b7efe934da63f177e94a3 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 12 Aug 2022 00:14:05 +0200 Subject: [PATCH 3/6] Regen clinic.test --- Lib/test/clinic.test | 672 +++++++++++++------------------------------ 1 file changed, 192 insertions(+), 480 deletions(-) diff --git a/Lib/test/clinic.test b/Lib/test/clinic.test index 7169a3b0d17349..cad4ede6e2614f 100644 --- a/Lib/test/clinic.test +++ b/Lib/test/clinic.test @@ -1930,33 +1930,21 @@ static PyObject * test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", NULL}; static _PyArg_Parser _parser = { @@ -1983,7 +1971,7 @@ exit: static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=81a23d66426e594e input=0d3484844749c05b]*/ +/*[clinic end generated code: output=6de50281e91e828c input=0d3484844749c05b]*/ /*[clinic input] @@ -2010,33 +1998,21 @@ static PyObject * test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", NULL}; static _PyArg_Parser _parser = { @@ -2063,7 +2039,7 @@ exit: static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=26470df56608cccd input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=0a18a89ba428545b input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2091,33 +2067,21 @@ static PyObject * test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", "c", NULL}; static _PyArg_Parser _parser = { @@ -2157,7 +2121,7 @@ exit: static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=3408978bedb2d3f9 input=eda7964f784f4607]*/ +/*[clinic end generated code: output=c538adacd823a93d input=eda7964f784f4607]*/ /*[clinic input] @@ -2187,33 +2151,21 @@ static PyObject * test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -2264,7 +2216,7 @@ exit: static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=becd35b9038b2a64 input=209387a4815e5082]*/ +/*[clinic end generated code: output=3da1346544572e42 input=209387a4815e5082]*/ /*[clinic input] @@ -2293,33 +2245,21 @@ static PyObject * test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", "c", NULL}; static _PyArg_Parser _parser = { @@ -2359,7 +2299,7 @@ exit: static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=f853e626095f43bc input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=49e377f61d78f7bc input=18393cc64fa000f4]*/ /*[clinic input] @@ -2386,33 +2326,21 @@ static PyObject * test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(b), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", NULL}; static _PyArg_Parser _parser = { @@ -2439,7 +2367,7 @@ exit: static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=3b097475f4929159 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=cc2f5b714ff57b73 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2467,33 +2395,21 @@ static PyObject * test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "c", NULL}; static _PyArg_Parser _parser = { @@ -2520,7 +2436,7 @@ exit: static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=ef7fa0f9e58a0335 input=9042f2818f664839]*/ +/*[clinic end generated code: output=ac58b4ad827f7104 input=9042f2818f664839]*/ /*[clinic input] @@ -2550,33 +2466,21 @@ static PyObject * test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", NULL}; static _PyArg_Parser _parser = { @@ -2606,7 +2510,7 @@ exit: static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=0b6617a6d5a560c8 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=2c8227fd292a3df2 input=29546ebdca492fea]*/ /*[clinic input] @@ -2636,33 +2540,21 @@ static PyObject * test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -2704,7 +2596,7 @@ exit: static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=ad36c238a8627f8d input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=7db2c23076c0ce35 input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2733,33 +2625,21 @@ static PyObject * test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", NULL}; static _PyArg_Parser _parser = { @@ -2799,7 +2679,7 @@ exit: static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=7abd948bad976638 input=1581299d21d16f14]*/ +/*[clinic end generated code: output=8b60ded08e257bc3 input=1581299d21d16f14]*/ /*[clinic input] @@ -2829,33 +2709,21 @@ static PyObject * test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -2902,7 +2770,7 @@ exit: static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=e702747150ad367d input=408798ec3d42949f]*/ +/*[clinic end generated code: output=89bf981b3e4fd792 input=408798ec3d42949f]*/ /*[clinic input] @@ -2933,33 +2801,21 @@ static PyObject * test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -3001,7 +2857,7 @@ exit: static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=79deca12adfac6a3 input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=ee7404155f38124b input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -3031,33 +2887,21 @@ static PyObject * test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", NULL}; static _PyArg_Parser _parser = { @@ -3097,7 +2941,7 @@ exit: static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=997d180f3d1c69c5 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=95228b79fe883900 input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -3128,33 +2972,21 @@ static PyObject * test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -3201,7 +3033,7 @@ exit: static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=0c9000c9f87ab430 input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=46729a9015020a1c input=1e557dc979d120fd]*/ /*[clinic input] @@ -3234,33 +3066,21 @@ static PyObject * test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL}; static _PyArg_Parser _parser = { @@ -3305,7 +3125,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=6a5eaed3c057fda5 input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=654caa27871b90f3 input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3336,33 +3156,21 @@ static PyObject * test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 3 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[3]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", NULL}; static _PyArg_Parser _parser = { @@ -3404,7 +3212,7 @@ exit: static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=033e6cfc772d4fc2 input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=8bf5c4e1bd7e51b0 input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3438,33 +3246,21 @@ static PyObject * test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL}; static _PyArg_Parser _parser = { @@ -3518,7 +3314,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=5d3e7607d3d814e7 input=d0883d45876f186c]*/ +/*[clinic end generated code: output=c5f8107b8587178e input=d0883d45876f186c]*/ /*[clinic input] @@ -3552,33 +3348,21 @@ static PyObject * test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL}; static _PyArg_Parser _parser = { @@ -3637,7 +3421,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=ed0301cc659624fe input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=b6173d24de23d57a input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3673,33 +3457,21 @@ static PyObject * test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 4 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[4]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) .ob_item = { &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), &_Py_ID(f), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"", "", "c", "d", "e", "f", NULL}; static _PyArg_Parser _parser = { @@ -3766,7 +3538,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=352bbf976ebdd729 input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=24307613feedda4f input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3792,33 +3564,21 @@ static PyObject * test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(co_lnotab), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"co_lnotab", NULL}; static _PyArg_Parser _parser = { @@ -3852,7 +3612,7 @@ exit: static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=a1c32e78f625dce1 input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=3c50cf76e22da926 input=303df5046c7e37a3]*/ /*[clinic input] @@ -4030,33 +3790,21 @@ static PyObject * test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(a), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", NULL}; static _PyArg_Parser _parser = { @@ -4085,7 +3833,7 @@ exit: static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=ac4d536e5b76c9fa input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=f8ac700ba8665934 input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -4113,33 +3861,21 @@ static PyObject * test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"a", "b", NULL}; static _PyArg_Parser _parser = { @@ -4178,7 +3914,7 @@ exit: static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=f0c70f7e2e1c0523 input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=295db5304354c293 input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -4206,33 +3942,21 @@ static PyObject * test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 2 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[2]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"b", "c", NULL}; static _PyArg_Parser _parser = { @@ -4276,7 +4000,7 @@ exit: static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=0a918b65f7b076f9 input=fa56a709a035666e]*/ +/*[clinic end generated code: output=f4327658411a0ea6 input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4299,33 +4023,21 @@ static PyObject * test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { PyObject *return_value = NULL; - #define NUM_KEYWORDS 1 - #if NUM_KEYWORDS == 0 - - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty) - # else - # define KWTUPLE NULL - # endif - - #else // NUM_KEYWORDS != 0 - # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[NUM_KEYWORDS]; + PyObject *ob_item[1]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) .ob_item = { &_Py_ID(module), }, }; - # define KWTUPLE (&_kwtuple.ob_base.ob_base) + #define KWTUPLE (&_kwtuple.ob_base.ob_base) - # else // !Py_BUILD_CORE - # define KWTUPLE NULL - # endif // !Py_BUILD_CORE - #endif // NUM_KEYWORDS != 0 - #undef NUM_KEYWORDS + #else // !Py_BUILD_CORE + # define KWTUPLE NULL + #endif // !Py_BUILD_CORE static const char * const _keywords[] = {"module", NULL}; static _PyArg_Parser _parser = { @@ -4350,4 +4062,4 @@ exit: static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=28b032fb28df75cd input=afefe259667f13ba]*/ +/*[clinic end generated code: output=6fa6cbc5dec09562 input=afefe259667f13ba]*/ From 568a49cec1fbe6930f778a1a9dae01d150be5cc7 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 12 Aug 2022 01:32:39 +0200 Subject: [PATCH 4/6] Address review --- Tools/clinic/clinic.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index b9abb67ed2d0e5..008db5bc0b2846 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -536,6 +536,12 @@ def normalize_snippet(s, *, indent=0): def declare_parser(f, *, hasformat=False): + """ + Generates the code template for a static local PyArg_Parser variable, + with an initializer. For core code (incl. builtin modules) the + kwtuple field is also statically initialized. Otherwise + it is initialized at runtime. + """ def keywords(f): params = f.parameters.values() kwds = [ @@ -544,18 +550,13 @@ def keywords(f): ] return kwds - """ - Generates the code template for a static local PyArg_Parser variable, - with an initializer. For core code (incl. builtin modules) the - kwtuple field is also statically initialized. Otherwise - it is initialized at runtime. - """ if hasformat: fname = '' format_ = '.format = "{format_units}:{name}",' else: fname = '.fname = "{name}",' format_ = '' + num_keywords = len(keywords(f)) if num_keywords == 0: declarations = """ @@ -564,15 +565,7 @@ def keywords(f): #else # define KWTUPLE NULL #endif - - static const char * const _keywords[] = {{{keywords_c} NULL}}; - static _PyArg_Parser _parser = {{ - .keywords = _keywords, - %s - .kwtuple = KWTUPLE, - }}; - #undef KWTUPLE - """ % (format_ or fname) + """ else: declarations = """ #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) @@ -590,7 +583,9 @@ def keywords(f): #else // !Py_BUILD_CORE # define KWTUPLE NULL #endif // !Py_BUILD_CORE + """ % (num_keywords, num_keywords) + declarations += """ static const char * const _keywords[] = {{{keywords_c} NULL}}; static _PyArg_Parser _parser = {{ .keywords = _keywords, @@ -598,7 +593,7 @@ def keywords(f): .kwtuple = KWTUPLE, }}; #undef KWTUPLE - """ % (num_keywords, num_keywords, format_ or fname) + """ % (format_ or fname) return normalize_snippet(declarations) From f1d533c63724dd3e6b4105c95247eb0e31b39488 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 12 Aug 2022 19:25:37 +0200 Subject: [PATCH 5/6] Update Tools/clinic/clinic.py Co-authored-by: Eric Snow --- Tools/clinic/clinic.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 008db5bc0b2846..b808a2a518c8e4 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -570,20 +570,22 @@ def keywords(f): declarations = """ #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS %d static struct {{ PyGC_Head _this_is_not_used; PyObject_VAR_HEAD PyObject *ob_item[%d]; }} _kwtuple = {{ - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, %d) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = {{ {keywords_py} }}, }}; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE # define KWTUPLE NULL #endif // !Py_BUILD_CORE - """ % (num_keywords, num_keywords) + """ % (num_keywords) declarations += """ static const char * const _keywords[] = {{{keywords_c} NULL}}; From 8915c0550f8b0776545267f7bc9444b87e419786 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 12 Aug 2022 19:36:12 +0200 Subject: [PATCH 6/6] Address last round of reviews - inline len(keywords) - use NUM_KEYWORDS constant for improved readability in generated code --- Lib/test/clinic.test | 192 ++++--- Modules/_blake2/clinic/blake2b_impl.c.h | 8 +- Modules/_blake2/clinic/blake2s_impl.c.h | 8 +- Modules/_io/clinic/_iomodule.c.h | 14 +- Modules/_io/clinic/bufferedio.c.h | 20 +- Modules/_io/clinic/bytesio.c.h | 8 +- Modules/_io/clinic/fileio.c.h | 8 +- Modules/_io/clinic/stringio.c.h | 8 +- Modules/_io/clinic/textio.c.h | 26 +- Modules/_io/clinic/winconsoleio.c.h | 8 +- .../_multiprocessing/clinic/posixshmem.c.h | 14 +- Modules/_multiprocessing/clinic/semaphore.c.h | 20 +- Modules/_sha3/clinic/sha3module.c.h | 8 +- Modules/_sqlite/clinic/connection.c.h | 68 ++- Modules/_sqlite/clinic/cursor.c.h | 8 +- Modules/_sqlite/clinic/module.c.h | 8 +- Modules/_sre/clinic/sre.c.h | 80 ++- Modules/_ssl/clinic/cert.c.h | 8 +- Modules/cjkcodecs/clinic/multibytecodec.c.h | 26 +- Modules/clinic/_asynciomodule.c.h | 74 ++- Modules/clinic/_bisectmodule.c.h | 26 +- Modules/clinic/_bz2module.c.h | 8 +- Modules/clinic/_codecsmodule.c.h | 14 +- Modules/clinic/_csv.c.h | 20 +- Modules/clinic/_cursesmodule.c.h | 8 +- Modules/clinic/_datetimemodule.c.h | 14 +- Modules/clinic/_elementtree.c.h | 50 +- Modules/clinic/_hashopenssl.c.h | 122 ++-- Modules/clinic/_lzmamodule.c.h | 14 +- Modules/clinic/_opcode.c.h | 8 +- Modules/clinic/_pickle.c.h | 38 +- Modules/clinic/_queuemodule.c.h | 20 +- Modules/clinic/_ssl.c.h | 56 +- Modules/clinic/_struct.c.h | 20 +- Modules/clinic/_testmultiphase.c.h | 8 +- Modules/clinic/_winapi.c.h | 38 +- Modules/clinic/binascii.c.h | 44 +- Modules/clinic/cmathmodule.c.h | 8 +- Modules/clinic/gcmodule.c.h | 14 +- Modules/clinic/grpmodule.c.h | 14 +- Modules/clinic/itertoolsmodule.c.h | 44 +- Modules/clinic/mathmodule.c.h | 14 +- Modules/clinic/md5module.c.h | 8 +- Modules/clinic/overlapped.c.h | 8 +- Modules/clinic/posixmodule.c.h | 524 ++++++++++++------ Modules/clinic/pyexpat.c.h | 8 +- Modules/clinic/selectmodule.c.h | 32 +- Modules/clinic/sha1module.c.h | 8 +- Modules/clinic/sha256module.c.h | 14 +- Modules/clinic/sha512module.c.h | 14 +- Modules/clinic/socketmodule.c.h | 8 +- Modules/clinic/zlibmodule.c.h | 32 +- Objects/clinic/bytearrayobject.c.h | 44 +- Objects/clinic/bytesobject.c.h | 44 +- Objects/clinic/codeobject.c.h | 14 +- Objects/clinic/complexobject.c.h | 8 +- Objects/clinic/descrobject.c.h | 14 +- Objects/clinic/enumobject.c.h | 8 +- Objects/clinic/funcobject.c.h | 8 +- Objects/clinic/listobject.c.h | 8 +- Objects/clinic/longobject.c.h | 20 +- Objects/clinic/memoryobject.c.h | 26 +- Objects/clinic/moduleobject.c.h | 8 +- Objects/clinic/odictobject.c.h | 32 +- Objects/clinic/structseq.c.h | 8 +- Objects/clinic/unicodeobject.c.h | 38 +- Objects/stringlib/clinic/transmogrify.h.h | 8 +- PC/clinic/_testconsole.c.h | 14 +- PC/clinic/winreg.c.h | 32 +- PC/clinic/winsound.c.h | 20 +- Python/clinic/Python-tokenize.c.h | 8 +- Python/clinic/_warnings.c.h | 14 +- Python/clinic/bltinmodule.c.h | 44 +- Python/clinic/import.c.h | 14 +- Python/clinic/sysmodule.c.h | 14 +- Python/clinic/traceback.c.h | 8 +- Tools/clinic/clinic.py | 17 +- 77 files changed, 1525 insertions(+), 820 deletions(-) diff --git a/Lib/test/clinic.test b/Lib/test/clinic.test index cad4ede6e2614f..c73a75b163fa37 100644 --- a/Lib/test/clinic.test +++ b/Lib/test/clinic.test @@ -1932,14 +1932,16 @@ test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1971,7 +1973,7 @@ exit: static PyObject * test_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=6de50281e91e828c input=0d3484844749c05b]*/ +/*[clinic end generated code: output=73d46a9ae3320f96 input=0d3484844749c05b]*/ /*[clinic input] @@ -2000,14 +2002,16 @@ test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2039,7 +2043,7 @@ exit: static PyObject * test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=0a18a89ba428545b input=384adc78bfa0bff7]*/ +/*[clinic end generated code: output=c9f02a41f425897d input=384adc78bfa0bff7]*/ /*[clinic input] @@ -2069,14 +2073,16 @@ test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2121,7 +2127,7 @@ exit: static PyObject * test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=c538adacd823a93d input=eda7964f784f4607]*/ +/*[clinic end generated code: output=b35d4e66f7283e46 input=eda7964f784f4607]*/ /*[clinic input] @@ -2153,14 +2159,16 @@ test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2216,7 +2224,7 @@ exit: static PyObject * test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=3da1346544572e42 input=209387a4815e5082]*/ +/*[clinic end generated code: output=ede7e6e65106bf2b input=209387a4815e5082]*/ /*[clinic input] @@ -2247,14 +2255,16 @@ test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2299,7 +2309,7 @@ exit: static PyObject * test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=49e377f61d78f7bc input=18393cc64fa000f4]*/ +/*[clinic end generated code: output=36d4df939a4c3eef input=18393cc64fa000f4]*/ /*[clinic input] @@ -2328,14 +2338,16 @@ test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2367,7 +2379,7 @@ exit: static PyObject * test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=cc2f5b714ff57b73 input=1767b0ebdf06060e]*/ +/*[clinic end generated code: output=4835f4b6cf386c28 input=1767b0ebdf06060e]*/ /*[clinic input] @@ -2397,14 +2409,16 @@ test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2436,7 +2450,7 @@ exit: static PyObject * test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c) -/*[clinic end generated code: output=ac58b4ad827f7104 input=9042f2818f664839]*/ +/*[clinic end generated code: output=2570ea156a8d3cb5 input=9042f2818f664839]*/ /*[clinic input] @@ -2468,14 +2482,16 @@ test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2510,7 +2526,7 @@ exit: static PyObject * test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=2c8227fd292a3df2 input=29546ebdca492fea]*/ +/*[clinic end generated code: output=aaa0e6b5ce02900d input=29546ebdca492fea]*/ /*[clinic input] @@ -2542,14 +2558,16 @@ test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2596,7 +2614,7 @@ exit: static PyObject * test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=7db2c23076c0ce35 input=cdf5a9625e554e9b]*/ +/*[clinic end generated code: output=1d9f2d8420d0a85f input=cdf5a9625e554e9b]*/ /*[clinic input] @@ -2627,14 +2645,16 @@ test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2679,7 +2699,7 @@ exit: static PyObject * test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=8b60ded08e257bc3 input=1581299d21d16f14]*/ +/*[clinic end generated code: output=a83caa0505b296cf input=1581299d21d16f14]*/ /*[clinic input] @@ -2711,14 +2731,16 @@ test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2770,7 +2792,7 @@ exit: static PyObject * test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=89bf981b3e4fd792 input=408798ec3d42949f]*/ +/*[clinic end generated code: output=0b24fba3dc04d26b input=408798ec3d42949f]*/ /*[clinic input] @@ -2803,14 +2825,16 @@ test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2857,7 +2881,7 @@ exit: static PyObject * test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=ee7404155f38124b input=8d8e5643bbbc2309]*/ +/*[clinic end generated code: output=592b217bca2f7bcc input=8d8e5643bbbc2309]*/ /*[clinic input] @@ -2889,14 +2913,16 @@ test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2941,7 +2967,7 @@ exit: static PyObject * test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=95228b79fe883900 input=f7e5eed94f75fff0]*/ +/*[clinic end generated code: output=b8b00420826bc11f input=f7e5eed94f75fff0]*/ /*[clinic input] @@ -2974,14 +3000,16 @@ test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3033,7 +3061,7 @@ exit: static PyObject * test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=46729a9015020a1c input=1e557dc979d120fd]*/ +/*[clinic end generated code: output=3b9ee879ebee285a input=1e557dc979d120fd]*/ /*[clinic input] @@ -3068,14 +3096,16 @@ test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssi PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3125,7 +3155,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=654caa27871b90f3 input=c3884a4f956fdc89]*/ +/*[clinic end generated code: output=d380f84f81cc0e45 input=c3884a4f956fdc89]*/ /*[clinic input] @@ -3158,14 +3188,16 @@ test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ss PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3212,7 +3244,7 @@ exit: static PyObject * test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=8bf5c4e1bd7e51b0 input=68d01d7c0f6dafb0]*/ +/*[clinic end generated code: output=ee629e962cb06992 input=68d01d7c0f6dafb0]*/ /*[clinic input] @@ -3248,14 +3280,16 @@ test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3314,7 +3348,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=c5f8107b8587178e input=d0883d45876f186c]*/ +/*[clinic end generated code: output=a2721babb42ecfd1 input=d0883d45876f186c]*/ /*[clinic input] @@ -3350,14 +3384,16 @@ test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, P PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3421,7 +3457,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=b6173d24de23d57a input=c95e2e1ec93035ad]*/ +/*[clinic end generated code: output=0626203eedb6e7e8 input=c95e2e1ec93035ad]*/ /*[clinic input] @@ -3459,14 +3495,16 @@ test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(c), &_Py_ID(d), &_Py_ID(e), &_Py_ID(f), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3538,7 +3576,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=24307613feedda4f input=9914857713c5bbf8]*/ +/*[clinic end generated code: output=07d8acc04558a5a0 input=9914857713c5bbf8]*/ /*[clinic input] test_keyword_only_parameter @@ -3566,14 +3604,16 @@ test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(co_lnotab), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3612,7 +3652,7 @@ exit: static PyObject * test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab) -/*[clinic end generated code: output=3c50cf76e22da926 input=303df5046c7e37a3]*/ +/*[clinic end generated code: output=b12fe2e515a62603 input=303df5046c7e37a3]*/ /*[clinic input] @@ -3792,14 +3832,16 @@ test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3833,7 +3875,7 @@ exit: static PyObject * test_vararg_impl(PyObject *module, PyObject *a, PyObject *args) -/*[clinic end generated code: output=f8ac700ba8665934 input=81d33815ad1bae6e]*/ +/*[clinic end generated code: output=6661f3ca97d85e8c input=81d33815ad1bae6e]*/ /*[clinic input] test_vararg_with_default @@ -3863,14 +3905,16 @@ test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3914,7 +3958,7 @@ exit: static PyObject * test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args, int b) -/*[clinic end generated code: output=295db5304354c293 input=6e110b54acd9b22d]*/ +/*[clinic end generated code: output=5fe3cfccb1bef781 input=6e110b54acd9b22d]*/ /*[clinic input] test_vararg_with_only_defaults @@ -3944,14 +3988,16 @@ test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(b), &_Py_ID(c), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4000,7 +4046,7 @@ exit: static PyObject * test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b, PyObject *c) -/*[clinic end generated code: output=f4327658411a0ea6 input=fa56a709a035666e]*/ +/*[clinic end generated code: output=dd21b28f0db26a4b input=fa56a709a035666e]*/ /*[clinic input] test_paramname_module @@ -4025,14 +4071,16 @@ test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(module), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4062,4 +4110,4 @@ exit: static PyObject * test_paramname_module_impl(PyObject *module, PyObject *mod) -/*[clinic end generated code: output=6fa6cbc5dec09562 input=afefe259667f13ba]*/ +/*[clinic end generated code: output=4a2a849ecbcc8b53 input=afefe259667f13ba]*/ diff --git a/Modules/_blake2/clinic/blake2b_impl.c.h b/Modules/_blake2/clinic/blake2b_impl.c.h index 4d107aa72fc56d..99b0f098cc2b27 100644 --- a/Modules/_blake2/clinic/blake2b_impl.c.h +++ b/Modules/_blake2/clinic/blake2b_impl.c.h @@ -30,14 +30,16 @@ py_blake2b_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 12 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[12]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 12) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(digest_size), &_Py_ID(key), &_Py_ID(salt), &_Py_ID(person), &_Py_ID(fanout), &_Py_ID(depth), &_Py_ID(leaf_size), &_Py_ID(node_offset), &_Py_ID(node_depth), &_Py_ID(inner_size), &_Py_ID(last_node), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -274,4 +276,4 @@ _blake2_blake2b_hexdigest(BLAKE2bObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2b_hexdigest_impl(self); } -/*[clinic end generated code: output=f9cbb310c99ccf18 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=996b4fe396824797 input=a9049054013a1b77]*/ diff --git a/Modules/_blake2/clinic/blake2s_impl.c.h b/Modules/_blake2/clinic/blake2s_impl.c.h index 5fe7abf1d1d1ee..9b821fbcd62cdb 100644 --- a/Modules/_blake2/clinic/blake2s_impl.c.h +++ b/Modules/_blake2/clinic/blake2s_impl.c.h @@ -30,14 +30,16 @@ py_blake2s_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 12 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[12]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 12) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(digest_size), &_Py_ID(key), &_Py_ID(salt), &_Py_ID(person), &_Py_ID(fanout), &_Py_ID(depth), &_Py_ID(leaf_size), &_Py_ID(node_offset), &_Py_ID(node_depth), &_Py_ID(inner_size), &_Py_ID(last_node), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -274,4 +276,4 @@ _blake2_blake2s_hexdigest(BLAKE2sObject *self, PyObject *Py_UNUSED(ignored)) { return _blake2_blake2s_hexdigest_impl(self); } -/*[clinic end generated code: output=dcb873c061ed772c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bd0fb7639e450618 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 2e9654bb200ca7..b38738486f6856 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -141,14 +141,16 @@ _io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 8 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[8]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(buffering), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(closefd), &_Py_ID(opener), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -362,14 +364,16 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -403,4 +407,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=58de61ccdf9ac533 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1f8001287a423470 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index 1ccb91a48370ae..8a8f86b2eea318 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -410,14 +410,16 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -485,14 +487,16 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -653,14 +657,16 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(raw), &_Py_ID(buffer_size), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -707,4 +713,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=1ec10ce06920c007 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ca87adcfff6a810b input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index 006ffa99a18825..84b58db6c7a702 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -491,14 +491,16 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(initial_bytes), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -532,4 +534,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=4d9e7301462263e3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a44770efbaeb80dd input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index ac6233cfcd6ac9..a925b94fe07531 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -57,14 +57,16 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(closefd), &_Py_ID(opener), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -464,4 +466,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=bfa0d5eca7181dbd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ff479a26cab0d479 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index 4a9119c826e61e..d495dd10c16330 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -263,14 +263,16 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(initial_value), &_Py_ID(newline), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -365,4 +367,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored)) { return _io_StringIO_seekable_impl(self); } -/*[clinic end generated code: output=4f15862a62730297 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=533f20ae9b773126 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index 855a07992cb8c3..038f0a5c209d49 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -32,14 +32,16 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(decoder), &_Py_ID(translate), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -99,14 +101,16 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *ar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -232,14 +236,16 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 6 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[6]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(buffer), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(line_buffering), &_Py_ID(write_through), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -368,14 +374,16 @@ _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(newline), &_Py_ID(line_buffering), &_Py_ID(write_through), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -761,4 +769,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored)) { return _io_TextIOWrapper_close_impl(self); } -/*[clinic end generated code: output=3a1b1fb6cf4b8241 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=aecd376eca3cb148 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 81b5eae538ba67..65820a8f2ea0b3 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -56,14 +56,16 @@ _io__WindowsConsoleIO___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(mode), &_Py_ID(closefd), &_Py_ID(opener), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -405,4 +407,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=22471fc8bfe93894 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=08ae244e9a44da55 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index 621dd6a08d70e0..df2aa29cfe626e 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -29,14 +29,16 @@ _posixshmem_shm_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(mode), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -117,14 +119,16 @@ _posixshmem_shm_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -168,4 +172,4 @@ _posixshmem_shm_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs #ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF #define _POSIXSHMEM_SHM_UNLINK_METHODDEF #endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */ -/*[clinic end generated code: output=2763fabf9d642d88 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3f6fee283d5fd0e9 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index d10574bcdf9eed..dce0366c266f10 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -29,14 +29,16 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -124,14 +126,16 @@ _multiprocessing_SemLock_acquire(SemLockObject *self, PyObject *const *args, Py_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -210,14 +214,16 @@ _multiprocessing_SemLock(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(kind), &_Py_ID(value), &_Py_ID(maxvalue), &_Py_ID(name), &_Py_ID(unlink), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -536,4 +542,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=c29c04e27b12263b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=720d7d0066dc0954 input=a9049054013a1b77]*/ diff --git a/Modules/_sha3/clinic/sha3module.c.h b/Modules/_sha3/clinic/sha3module.c.h index d3023a19829164..a0c7c1c043e515 100644 --- a/Modules/_sha3/clinic/sha3module.c.h +++ b/Modules/_sha3/clinic/sha3module.c.h @@ -23,14 +23,16 @@ py_sha3_new(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -191,4 +193,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=1fc87ca41d6a1a4d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=747c3f34ddd14063 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 9fd6501deb4d1c..e7e78707ee8d5d 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -21,14 +21,16 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 8 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[8]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(database), &_Py_ID(timeout), &_Py_ID(detect_types), &_Py_ID(isolation_level), &_Py_ID(check_same_thread), &_Py_ID(factory), &_Py_ID(cached_statements), &_Py_ID(uri), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -148,14 +150,16 @@ pysqlite_connection_cursor(pysqlite_Connection *self, PyObject *const *args, Py_ 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(factory), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -218,14 +222,16 @@ blobopen(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(readonly), &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -394,14 +400,16 @@ pysqlite_connection_create_function(pysqlite_Connection *self, PyTypeObject *cls PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(narg), &_Py_ID(func), &_Py_ID(deterministic), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -556,14 +564,16 @@ pysqlite_connection_create_aggregate(pysqlite_Connection *self, PyTypeObject *cl PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(n_arg), &_Py_ID(aggregate_class), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -630,14 +640,16 @@ pysqlite_connection_set_authorizer(pysqlite_Connection *self, PyTypeObject *cls, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(authorizer_callback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -685,14 +697,16 @@ pysqlite_connection_set_progress_handler(pysqlite_Connection *self, PyTypeObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(progress_handler), &_Py_ID(n), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -745,14 +759,16 @@ pysqlite_connection_set_trace_callback(pysqlite_Connection *self, PyTypeObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(trace_callback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1002,14 +1018,16 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *const *args, Py_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(target), &_Py_ID(pages), &_Py_ID(progress), &_Py_ID(name), &_Py_ID(sleep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1181,14 +1199,16 @@ serialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1268,14 +1288,16 @@ deserialize(pysqlite_Connection *self, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1496,4 +1518,4 @@ getlimit(pysqlite_Connection *self, PyObject *arg) #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=bef98f463226dd88 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=beef3eac690a1f88 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index 5e30831e943ff8..36b8d0051a2915 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -194,14 +194,16 @@ pysqlite_cursor_fetchmany(pysqlite_Cursor *self, PyObject *const *args, Py_ssize 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(size), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -316,4 +318,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=0dc75868f6018ed5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e53e75a32a9d92bd input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index ff7e8fa84dfa5d..12f60835880b10 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -26,14 +26,16 @@ pysqlite_complete_statement(PyObject *module, PyObject *const *args, Py_ssize_t 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(statement), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -209,4 +211,4 @@ pysqlite_adapt(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=2f54640446a11961 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=39d38c6cfc455042 input=a9049054013a1b77]*/ diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index aff8212f2e4065..711e16a1190d77 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -183,14 +183,16 @@ _sre_SRE_Pattern_match(PatternObject *self, PyTypeObject *cls, PyObject *const * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -274,14 +276,16 @@ _sre_SRE_Pattern_fullmatch(PatternObject *self, PyTypeObject *cls, PyObject *con PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -367,14 +371,16 @@ _sre_SRE_Pattern_search(PatternObject *self, PyTypeObject *cls, PyObject *const PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -457,14 +463,16 @@ _sre_SRE_Pattern_findall(PatternObject *self, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -550,14 +558,16 @@ _sre_SRE_Pattern_finditer(PatternObject *self, PyTypeObject *cls, PyObject *cons PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -640,14 +650,16 @@ _sre_SRE_Pattern_scanner(PatternObject *self, PyTypeObject *cls, PyObject *const PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(pos), &_Py_ID(endpos), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -730,14 +742,16 @@ _sre_SRE_Pattern_split(PatternObject *self, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -802,14 +816,16 @@ _sre_SRE_Pattern_sub(PatternObject *self, PyTypeObject *cls, PyObject *const *ar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(repl), &_Py_ID(string), &_Py_ID(count), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -877,14 +893,16 @@ _sre_SRE_Pattern_subn(PatternObject *self, PyTypeObject *cls, PyObject *const *a PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(repl), &_Py_ID(string), &_Py_ID(count), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -977,14 +995,16 @@ _sre_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 6 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[6]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(pattern), &_Py_ID(flags), &_Py_ID(code), &_Py_ID(groups), &_Py_ID(groupindex), &_Py_ID(indexgroup), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1066,14 +1086,16 @@ _sre_SRE_Match_expand(MatchObject *self, PyObject *const *args, Py_ssize_t nargs 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(template), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1122,14 +1144,16 @@ _sre_SRE_Match_groups(MatchObject *self, PyObject *const *args, Py_ssize_t nargs 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(default), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1183,14 +1207,16 @@ _sre_SRE_Match_groupdict(MatchObject *self, PyObject *const *args, Py_ssize_t na 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(default), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1395,4 +1421,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const } return _sre_SRE_Scanner_search_impl(self, cls); } -/*[clinic end generated code: output=60eb672f4d3ae36e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=14ea86f85c130a7b input=a9049054013a1b77]*/ diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index 008c86a53cd842..a052ab2086fd96 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -25,14 +25,16 @@ _ssl_Certificate_public_bytes(PySSLCertificate *self, PyObject *const *args, Py_ 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(format), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -84,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=89ddd7c395575a6c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=82efada014f9b7fe input=a9049054013a1b77]*/ diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index f3790bab682cc1..b7e340e68796fa 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -33,14 +33,16 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *cons PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(input), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -117,14 +119,16 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *cons PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(input), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -206,14 +210,16 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -333,14 +339,16 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(input), &_Py_ID(final), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -682,4 +690,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=fbe916d63ebbed1f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b034ec7126c11bde input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index ddc89c266288b6..daf524c3456ca8 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -34,14 +34,16 @@ _asyncio_Future___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(loop), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -168,14 +170,16 @@ _asyncio_Future_add_done_callback(FutureObj *self, PyObject *const *args, Py_ssi 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(context), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -243,14 +247,16 @@ _asyncio_Future_cancel(FutureObj *self, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(msg), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -377,14 +383,16 @@ _asyncio_Task___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(coro), &_Py_ID(loop), &_Py_ID(name), &_Py_ID(context), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -493,14 +501,16 @@ _asyncio_Task_cancel(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, PyO 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(msg), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -613,14 +623,16 @@ _asyncio_Task_get_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(limit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -678,14 +690,16 @@ _asyncio_Task_print_stack(TaskObj *self, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(limit), &_Py_ID(file), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -858,14 +872,16 @@ _asyncio__get_event_loop(PyObject *module, PyObject *const *args, Py_ssize_t nar 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(stacklevel), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -941,14 +957,16 @@ _asyncio__register_task(PyObject *module, PyObject *const *args, Py_ssize_t narg 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(task), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -996,14 +1014,16 @@ _asyncio__unregister_task(PyObject *module, PyObject *const *args, Py_ssize_t na 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(task), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1053,14 +1073,16 @@ _asyncio__enter_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(loop), &_Py_ID(task), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1112,14 +1134,16 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(loop), &_Py_ID(task), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1148,4 +1172,4 @@ _asyncio__leave_task(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=e0fae10a70fef650 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=459a7c7f21bbc290 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index 0b65b476c7703f..bbf456e4b0f411 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -34,14 +34,16 @@ _bisect_bisect_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -138,14 +140,16 @@ _bisect_insort_right(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -239,14 +243,16 @@ _bisect_bisect_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -343,14 +349,16 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(x), &_Py_ID(lo), &_Py_ID(hi), &_Py_ID(key), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -417,4 +425,4 @@ _bisect_insort_left(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P exit: return return_value; } -/*[clinic end generated code: output=9d0f2c2fa8b26356 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7dc87f7af75275a1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 829b5bf1df95c3..50a48b0bf2b825 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -103,14 +103,16 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(max_length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -166,4 +168,4 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *const *args, Py return return_value; } -/*[clinic end generated code: output=cf3f67c6fec47e8e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=829bed4097cf2e63 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index e71e6d716a3814..25db060cd900fa 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -94,14 +94,16 @@ _codecs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(obj), &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -192,14 +194,16 @@ _codecs_decode(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(obj), &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2865,4 +2869,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=b1a18e7f4a6b9980 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e885abad241bc54d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index 70a05812f4f137..8900946350a524 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -48,14 +48,16 @@ _csv_unregister_dialect(PyObject *module, PyObject *const *args, Py_ssize_t narg 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -103,14 +105,16 @@ _csv_get_dialect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -161,14 +165,16 @@ _csv_field_size_limit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(new_limit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -200,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=34c738de1fa21f31 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=94374e41eb2806ee input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index a07ec40b8ef3f1..67fadace863970 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -2686,14 +2686,16 @@ _curses_setupterm(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(term), &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4311,4 +4313,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=0dbd85118ec15c64 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b2e71e2012f16197 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 57fb82e02c536c..51e51e3791cc24 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -30,14 +30,16 @@ iso_calendar_date_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(year), &_Py_ID(week), &_Py_ID(weekday), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -103,14 +105,16 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(tz), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -142,4 +146,4 @@ datetime_datetime_now(PyTypeObject *type, PyObject *const *args, Py_ssize_t narg exit: return return_value; } -/*[clinic end generated code: output=d4ba846588df856d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=42654669940e0e3a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index e45e85750a47a0..0a2a74e220c2d1 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -176,14 +176,16 @@ _elementtree_Element_find(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -237,14 +239,16 @@ _elementtree_Element_findtext(ElementObject *self, PyObject *const *args, Py_ssi PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(default), &_Py_ID(namespaces), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -304,14 +308,16 @@ _elementtree_Element_findall(ElementObject *self, PyObject *const *args, Py_ssiz PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -364,14 +370,16 @@ _elementtree_Element_iterfind(ElementObject *self, PyObject *const *args, Py_ssi PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(namespaces), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -424,14 +432,16 @@ _elementtree_Element_get(ElementObject *self, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -483,14 +493,16 @@ _elementtree_Element_iter(ElementObject *self, PyObject *const *args, Py_ssize_t 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(tag), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -724,14 +736,16 @@ _elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwar int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(element_factory), &_Py_ID(comment_factory), &_Py_ID(pi_factory), &_Py_ID(insert_comments), &_Py_ID(insert_pis), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -956,14 +970,16 @@ _elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(target), &_Py_ID(encoding), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1089,4 +1105,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args, exit: return return_value; } -/*[clinic end generated code: output=6aaeefc69fa77d9c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=67a80531eaf43815 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 785777058f8c4a..fb61a444018dbb 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -91,14 +91,16 @@ EVPXOF_digest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -159,14 +161,16 @@ EVPXOF_hexdigest(EVPobject *self, PyObject *const *args, Py_ssize_t nargs, PyObj 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -231,14 +235,16 @@ EVP_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -306,14 +312,16 @@ _hashlib_openssl_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -379,14 +387,16 @@ _hashlib_openssl_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -452,14 +462,16 @@ _hashlib_openssl_sha224(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -525,14 +537,16 @@ _hashlib_openssl_sha256(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -598,14 +612,16 @@ _hashlib_openssl_sha384(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -671,14 +687,16 @@ _hashlib_openssl_sha512(PyObject *module, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -746,14 +764,16 @@ _hashlib_openssl_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -823,14 +843,16 @@ _hashlib_openssl_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -900,14 +922,16 @@ _hashlib_openssl_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -977,14 +1001,16 @@ _hashlib_openssl_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1054,14 +1080,16 @@ _hashlib_openssl_shake_128(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1131,14 +1159,16 @@ _hashlib_openssl_shake_256(PyObject *module, PyObject *const *args, Py_ssize_t n PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1208,14 +1238,16 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(hash_name), &_Py_ID(password), &_Py_ID(salt), &_Py_ID(iterations), &_Py_ID(dklen), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1315,14 +1347,16 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(password), &_Py_ID(salt), &_Py_ID(n), &_Py_ID(r), &_Py_ID(p), &_Py_ID(maxmem), &_Py_ID(dklen), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1452,14 +1486,16 @@ _hashlib_hmac_singleshot(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digest), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1531,14 +1567,16 @@ _hashlib_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digestmod), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1627,14 +1665,16 @@ _hashlib_HMAC_update(HMACobject *self, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(msg), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1811,4 +1851,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=50b27b4c8a9d8995 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b339e255db698147 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index 202286340a1052..286d2b0070659f 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -103,14 +103,16 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *const *args, Py_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(max_length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -200,14 +202,16 @@ _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(format), &_Py_ID(memlimit), &_Py_ID(filters), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -334,4 +338,4 @@ _lzma__decode_filter_properties(PyObject *module, PyObject *const *args, Py_ssiz return return_value; } -/*[clinic end generated code: output=39acc74d6985803d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=da3e83ba97244044 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 52cf74283f64a0..3bd3ba02387435 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -27,14 +27,16 @@ _opcode_stack_effect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(jump), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -101,4 +103,4 @@ _opcode_get_specialization_stats(PyObject *module, PyObject *Py_UNUSED(ignored)) { return _opcode_get_specialization_stats_impl(module); } -/*[clinic end generated code: output=c750638a652227d3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=21e3d53a659c651a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index 3ffe6559defc0a..e9ff2604719abd 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -114,14 +114,16 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -355,14 +357,16 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -547,14 +551,16 @@ _pickle_dump(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(obj), &_Py_ID(file), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -649,14 +655,16 @@ _pickle_dumps(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(obj), &_Py_ID(protocol), &_Py_ID(fix_imports), &_Py_ID(buffer_callback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -755,14 +763,16 @@ _pickle_load(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -879,14 +889,16 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fix_imports), &_Py_ID(encoding), &_Py_ID(errors), &_Py_ID(buffers), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -968,4 +980,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=b6c91d0bb93fe9d7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3321309c2157ee74 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index 9c7defcc6410d0..f86dac3c497d64 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -60,14 +60,16 @@ _queue_SimpleQueue_put(simplequeueobject *self, PyObject *const *args, Py_ssize_ PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(item), &_Py_ID(block), &_Py_ID(timeout), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -133,14 +135,16 @@ _queue_SimpleQueue_put_nowait(simplequeueobject *self, PyObject *const *args, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(item), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -195,14 +199,16 @@ _queue_SimpleQueue_get(simplequeueobject *self, PyTypeObject *cls, PyObject *con PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(block), &_Py_ID(timeout), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -326,4 +332,4 @@ _queue_SimpleQueue_qsize(simplequeueobject *self, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=009d2b2985c53be1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=628e992d38f50aac input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index d73dfb65a1644f..622e321fa1d8b3 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -356,14 +356,16 @@ _ssl__SSLSocket_get_channel_binding(PySSLSocket *self, PyObject *const *args, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(cb_type), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -560,14 +562,16 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(certfile), &_Py_ID(keyfile), &_Py_ID(password), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -629,14 +633,16 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(cafile), &_Py_ID(capath), &_Py_ID(cadata), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -711,14 +717,16 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sock), &_Py_ID(server_side), &_Py_ID(server_hostname), &_Py_ID(owner), &_Py_ID(session), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -801,14 +809,16 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 6 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[6]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(incoming), &_Py_ID(outgoing), &_Py_ID(server_side), &_Py_ID(server_hostname), &_Py_ID(owner), &_Py_ID(session), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -966,14 +976,16 @@ _ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *const *args, Py_ssiz 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(binary_form), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1284,14 +1296,16 @@ _ssl_txt2obj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(txt), &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1395,14 +1409,16 @@ _ssl_enum_certificates(PyObject *module, PyObject *const *args, Py_ssize_t nargs 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(store_name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1469,14 +1485,16 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(store_name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1525,4 +1543,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=52d2d1aeb0031666 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9f477b0c709acb28 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index cc2683abff340f..b21d9ff292433b 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -28,14 +28,16 @@ Struct___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(format), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -132,14 +134,16 @@ Struct_unpack_from(PyStructObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(buffer), &_Py_ID(offset), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -335,14 +339,16 @@ unpack_from(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(buffer), &_Py_ID(offset), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -445,4 +451,4 @@ iter_unpack(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -/*[clinic end generated code: output=8c9dbbba919a0fc3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=eca7df0e75f8919d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index d433488ad0d287..42ec7475e5e4be 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -81,14 +81,16 @@ _testmultiphase_StateAccessType_increment_count_clinic(StateAccessTypeObject *se PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(n), &_Py_ID(twice), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -160,4 +162,4 @@ _testmultiphase_StateAccessType_get_count(StateAccessTypeObject *self, PyTypeObj } return _testmultiphase_StateAccessType_get_count_impl(self, cls); } -/*[clinic end generated code: output=fcd8c6cff407aca8 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=52ea97ab2f03bb6d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index 1b3bed2698b226..53d5cccdd7db37 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -114,14 +114,16 @@ _winapi_ConnectNamedPipe(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(handle), &_Py_ID(overlapped), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -865,14 +867,16 @@ _winapi_LCMapStringEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(locale), &_Py_ID(flags), &_Py_ID(src), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -923,14 +927,16 @@ _winapi_ReadFile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(handle), &_Py_ID(size), &_Py_ID(overlapped), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1169,14 +1175,16 @@ _winapi_WriteFile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(handle), &_Py_ID(buffer), &_Py_ID(overlapped), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1239,14 +1247,16 @@ _winapi_GetFileType(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(handle), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1299,14 +1309,16 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(on_type_read), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1333,4 +1345,4 @@ _winapi__mimetypes_read_windows_registry(PyObject *module, PyObject *const *args exit: return return_value; } -/*[clinic end generated code: output=c71b900b526c27a2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=3e51e0b2ea3fea5a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index f631d9e70b5c4c..23ebdff2108258 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -57,14 +57,16 @@ binascii_b2a_uu(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(backtick), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -135,14 +137,16 @@ binascii_a2b_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(strict_mode), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -204,14 +208,16 @@ binascii_b2a_base64(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(newline), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -393,14 +399,16 @@ binascii_b2a_hex(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -484,14 +492,16 @@ binascii_hexlify(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -632,14 +642,16 @@ binascii_a2b_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(header), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -706,14 +718,16 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(quotetabs), &_Py_ID(istext), &_Py_ID(header), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -781,4 +795,4 @@ binascii_b2a_qp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -/*[clinic end generated code: output=b0b6a0a2b582f36c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a266ba13c374aefa input=a9049054013a1b77]*/ diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index 3ce0758ab495ce..b1da9452c61db8 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -901,14 +901,16 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(rel_tol), &_Py_ID(abs_tol), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -980,4 +982,4 @@ cmath_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec exit: return return_value; } -/*[clinic end generated code: output=42ea3c546a0600f9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0146c656e67f5d5f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index c594040a36be03..2d18e2ee0978e0 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -96,14 +96,16 @@ gc_collect(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(generation), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -271,14 +273,16 @@ gc_get_objects(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(generation), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -420,4 +424,4 @@ gc_get_freeze_count(PyObject *module, PyObject *Py_UNUSED(ignored)) exit: return return_value; } -/*[clinic end generated code: output=bbf986401df8b6ad input=a9049054013a1b77]*/ +/*[clinic end generated code: output=66432ac0e17fd04f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h index 23620b17617390..4914bc9abd67b5 100644 --- a/Modules/clinic/grpmodule.c.h +++ b/Modules/clinic/grpmodule.c.h @@ -28,14 +28,16 @@ grp_getgrgid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(id), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -83,14 +85,16 @@ grp_getgrnam(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -145,4 +149,4 @@ grp_getgrall(PyObject *module, PyObject *Py_UNUSED(ignored)) { return grp_getgrall_impl(module); } -/*[clinic end generated code: output=7e0c715b1629caa6 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0916fdbcdeaf5d7d input=a9049054013a1b77]*/ diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index 31143f8a2f9204..8806606d85befe 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -62,14 +62,16 @@ itertools_groupby(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(key), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -406,14 +408,16 @@ itertools_combinations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -475,14 +479,16 @@ itertools_combinations_with_replacement(PyTypeObject *type, PyObject *args, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -543,14 +549,16 @@ itertools_permutations(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(r), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -603,14 +611,16 @@ itertools_accumulate(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(func), &_Py_ID(initial), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -676,14 +686,16 @@ itertools_compress(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(data), &_Py_ID(selectors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -772,14 +784,16 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(start), &_Py_ID(step), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -820,4 +834,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6a11508348ff8bc9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b1056d63f68a9059 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 40486c6d62ae69..9fac1037e52528 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -586,14 +586,16 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(a), &_Py_ID(b), &_Py_ID(rel_tol), &_Py_ID(abs_tol), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -702,14 +704,16 @@ math_prod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(start), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -913,4 +917,4 @@ math_ulp(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=da661dd349ceb809 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c2c2f42452d63734 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index 5f08049654af8a..b4602104f18042 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -93,14 +93,16 @@ _md5_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -146,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=d1cdfd4e89a935da input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b4924c9905cc9f34 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 45e082052f12fc..cc0c74cc1d2946 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -454,14 +454,16 @@ _overlapped_Overlapped(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(event), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1252,4 +1254,4 @@ _overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const * return return_value; } -/*[clinic end generated code: output=96a8586837f7210b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ed7ca699b5cf6260 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index 02c9b010fd61f1..a26cb8261083a9 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -45,14 +45,16 @@ os_stat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -125,14 +127,16 @@ os_lstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -219,14 +223,16 @@ os_access(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), &_Py_ID(effective_ids), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -377,14 +383,16 @@ os_chdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -440,14 +448,16 @@ os_fchdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -518,14 +528,16 @@ os_chmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -604,14 +616,16 @@ os_fchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(mode), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -672,14 +686,16 @@ os_lchmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -746,14 +762,16 @@ os_chflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -827,14 +845,16 @@ os_lchflags(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -895,14 +915,16 @@ os_chroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -957,14 +979,16 @@ os_fsync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1038,14 +1062,16 @@ os_fdatasync(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1122,14 +1148,16 @@ os_chown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(uid), &_Py_ID(gid), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1213,14 +1241,16 @@ os_fchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(uid), &_Py_ID(gid), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1284,14 +1314,16 @@ os_lchown(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(uid), &_Py_ID(gid), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1402,14 +1434,16 @@ os_link(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1507,14 +1541,16 @@ os_listdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1639,14 +1675,16 @@ os__getvolumepathname(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1701,14 +1739,16 @@ os__path_splitroot(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1761,14 +1801,16 @@ os__path_normpath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1821,14 +1863,16 @@ os_mkdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1936,14 +1980,16 @@ os_getpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(which), &_Py_ID(who), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2001,14 +2047,16 @@ os_setpriority(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(which), &_Py_ID(who), &_Py_ID(priority), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2076,14 +2124,16 @@ os_rename(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2165,14 +2215,16 @@ os_replace(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(src_dir_fd), &_Py_ID(dst_dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2252,14 +2304,16 @@ os_rmdir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2321,14 +2375,16 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(command), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2393,14 +2449,16 @@ os_system(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(command), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2495,14 +2553,16 @@ os_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2567,14 +2627,16 @@ os_remove(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2683,14 +2745,16 @@ os_utime(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(times), &_Py_ID(ns), &_Py_ID(dir_fd), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2778,14 +2842,16 @@ os__exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2887,14 +2953,16 @@ os_execve(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(argv), &_Py_ID(env), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -2980,14 +3048,16 @@ os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file_actions), &_Py_ID(setpgroup), &_Py_ID(resetids), &_Py_ID(setsid), &_Py_ID(setsigmask), &_Py_ID(setsigdef), &_Py_ID(scheduler), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3128,14 +3198,16 @@ os_posix_spawnp(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file_actions), &_Py_ID(setpgroup), &_Py_ID(resetids), &_Py_ID(setsid), &_Py_ID(setsigmask), &_Py_ID(setsigdef), &_Py_ID(scheduler), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3369,14 +3441,16 @@ os_register_at_fork(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(before), &_Py_ID(after_in_child), &_Py_ID(after_in_parent), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3493,14 +3567,16 @@ os_sched_get_priority_max(PyObject *module, PyObject *const *args, Py_ssize_t na 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(policy), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3553,14 +3629,16 @@ os_sched_get_priority_min(PyObject *module, PyObject *const *args, Py_ssize_t na 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(policy), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -3646,14 +3724,16 @@ os_sched_param(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sched_priority), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4336,14 +4416,16 @@ os_getpgid(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(pid), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4818,14 +4900,16 @@ os_wait3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(options), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -4881,14 +4965,16 @@ os_wait4(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(pid), &_Py_ID(options), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5086,14 +5172,16 @@ os_pidfd_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(pid), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5148,14 +5236,16 @@ os_readlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5230,14 +5320,16 @@ os_symlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(target_is_directory), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5501,14 +5593,16 @@ os_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(flags), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5592,14 +5686,16 @@ os_close(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -5719,14 +5815,16 @@ os_dup2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwn PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(fd2), &_Py_ID(inheritable), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6169,14 +6267,16 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), &_Py_ID(headers), &_Py_ID(trailers), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6269,14 +6369,16 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), &_Py_ID(headers), &_Py_ID(trailers), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6376,14 +6478,16 @@ os_sendfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(out_fd), &_Py_ID(in_fd), &_Py_ID(offset), &_Py_ID(count), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6502,14 +6606,16 @@ os_fstat(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6852,14 +6958,16 @@ os_copy_file_range(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(count), &_Py_ID(offset_src), &_Py_ID(offset_dst), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -6964,14 +7072,16 @@ os_splice(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 6 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[6]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(src), &_Py_ID(dst), &_Py_ID(count), &_Py_ID(offset_src), &_Py_ID(offset_dst), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7070,14 +7180,16 @@ os_mkfifo(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7168,14 +7280,16 @@ os_mknod(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kw PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(mode), &_Py_ID(device), &_Py_ID(dir_fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7421,14 +7535,16 @@ os_truncate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7820,14 +7936,16 @@ os_WIFCONTINUED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7885,14 +8003,16 @@ os_WIFSTOPPED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -7950,14 +8070,16 @@ os_WIFSIGNALED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8015,14 +8137,16 @@ os_WIFEXITED(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8080,14 +8204,16 @@ os_WEXITSTATUS(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8145,14 +8271,16 @@ os_WTERMSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8210,14 +8338,16 @@ os_WSTOPSIG(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8313,14 +8443,16 @@ os_statvfs(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8375,14 +8507,16 @@ os__getdiskusage(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8486,14 +8620,16 @@ os_pathconf(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(name), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8673,14 +8809,16 @@ os_startfile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(filepath), &_Py_ID(operation), &_Py_ID(arguments), &_Py_ID(cwd), &_Py_ID(show_cmd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -8815,14 +8953,16 @@ os_device_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9007,14 +9147,16 @@ os_getxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9092,14 +9234,16 @@ os_setxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(value), &_Py_ID(flags), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9202,14 +9346,16 @@ os_removexattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(attribute), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9286,14 +9432,16 @@ os_listxattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9402,14 +9550,16 @@ os_memfd_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9474,14 +9624,16 @@ os_eventfd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(initval), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9543,14 +9695,16 @@ os_eventfd_read(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9602,14 +9756,16 @@ os_eventfd_write(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(value), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -9990,14 +10146,16 @@ os_DirEntry_stat(DirEntry *self, PyTypeObject *defining_class, PyObject *const * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10052,14 +10210,16 @@ os_DirEntry_is_dir(DirEntry *self, PyTypeObject *defining_class, PyObject *const 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10119,14 +10279,16 @@ os_DirEntry_is_file(DirEntry *self, PyTypeObject *defining_class, PyObject *cons 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(follow_symlinks), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10227,14 +10389,16 @@ os_scandir(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10294,14 +10458,16 @@ os_fspath(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *k 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10349,14 +10515,16 @@ os_getrandom(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(size), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10434,14 +10602,16 @@ os__add_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(path), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10500,14 +10670,16 @@ os__remove_dll_directory(PyObject *module, PyObject *const *args, Py_ssize_t nar 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(cookie), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -10569,14 +10741,16 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(status), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -11193,4 +11367,4 @@ os_waitstatus_to_exitcode(PyObject *module, PyObject *const *args, Py_ssize_t na #ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF #define OS_WAITSTATUS_TO_EXITCODE_METHODDEF #endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */ -/*[clinic end generated code: output=1098a7cfade9ccf3 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dc71eece3fc988a7 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 8a94808b1ee32c..0454fbc9994504 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -377,14 +377,16 @@ pyexpat_ParserCreate(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(encoding), &_Py_ID(namespace_separator), &_Py_ID(intern), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -496,4 +498,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=965b72d4db77696e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=de5f664ef05ef34a input=a9049054013a1b77]*/ diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index 8c50a92e0af04f..fda9aaab475567 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -530,14 +530,16 @@ select_epoll(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sizehint), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -694,14 +696,16 @@ select_epoll_register(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(eventmask), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -769,14 +773,16 @@ select_epoll_modify(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), &_Py_ID(eventmask), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -836,14 +842,16 @@ select_epoll_unregister(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fd), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -905,14 +913,16 @@ select_epoll_poll(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(timeout), &_Py_ID(maxevents), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1300,4 +1310,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=fd0e09b87b5224e5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9556c7d6cd5192d1 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index 90b104ca4f278b..ad15ddaadfc86c 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -93,14 +93,16 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -146,4 +148,4 @@ _sha1_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=0b960b6c804e0e74 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4d1293ca3472acdb input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h index d842b2c00838fb..10d09fac695fc4 100644 --- a/Modules/clinic/sha256module.c.h +++ b/Modules/clinic/sha256module.c.h @@ -93,14 +93,16 @@ _sha256_sha256(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -165,14 +167,16 @@ _sha256_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -218,4 +222,4 @@ _sha256_sha224(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje exit: return return_value; } -/*[clinic end generated code: output=14d3d2fc52748f00 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ae926f7ec85e7c97 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h index cc1db6c81a5291..f8d326363c398e 100644 --- a/Modules/clinic/sha512module.c.h +++ b/Modules/clinic/sha512module.c.h @@ -93,14 +93,16 @@ _sha512_sha512(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -165,14 +167,16 @@ _sha512_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(string), &_Py_ID(usedforsecurity), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -218,4 +222,4 @@ _sha512_sha384(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje exit: return return_value; } -/*[clinic end generated code: output=157933e88662a202 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=dd168f3f21097afe input=a9049054013a1b77]*/ diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 17c80acd506b36..8ff1044d013b0f 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -18,14 +18,16 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(family), &_Py_ID(type), &_Py_ID(proto), &_Py_ID(fileno), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -89,4 +91,4 @@ sock_initobj(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=81d4e46affca18d9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=987155ac4b48a198 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 1bb4c010c49cdd..a04b954a57f353 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -33,14 +33,16 @@ zlib_compress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(level), &_Py_ID(wbits), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -125,14 +127,16 @@ zlib_decompress(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(wbits), &_Py_ID(bufsize), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -242,14 +246,16 @@ zlib_compressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 6 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[6]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 6) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(level), &_Py_ID(method), &_Py_ID(wbits), &_Py_ID(memLevel), &_Py_ID(strategy), &_Py_ID(zdict), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -367,14 +373,16 @@ zlib_decompressobj(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(wbits), &_Py_ID(zdict), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -509,14 +517,16 @@ zlib_Decompress_decompress(compobject *self, PyTypeObject *cls, PyObject *const 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(max_length), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1021,4 +1031,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=9f81d7e0a2b5ce9f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9e5f9911d0c273e1 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 0cd4ffabfafae8..142f2998160725 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -18,14 +18,16 @@ bytearray___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(source), &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -239,14 +241,16 @@ bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t n 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(delete), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -440,14 +444,16 @@ bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -560,14 +566,16 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -935,14 +943,16 @@ bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1040,14 +1050,16 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(keepends), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1153,14 +1165,16 @@ bytearray_hex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1273,4 +1287,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return bytearray_sizeof_impl(self); } -/*[clinic end generated code: output=849a319750e5be5c input=a9049054013a1b77]*/ +/*[clinic end generated code: output=72bfa6cac2fd6832 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index 95b49b72ea0256..904124ec479abb 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -52,14 +52,16 @@ bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -224,14 +226,16 @@ bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -424,14 +428,16 @@ bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(delete), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -705,14 +711,16 @@ bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -797,14 +805,16 @@ bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, P 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(keepends), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -910,14 +920,16 @@ bytes_hex(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -970,14 +982,16 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(source), &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1049,4 +1063,4 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=85531f9e2dc5148e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e0a25b7ba749a04 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index b2068d2ee5a5ff..da33f4a6a20c1b 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -194,14 +194,16 @@ code_replace(PyCodeObject *self, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 18 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[18]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 18) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(co_argcount), &_Py_ID(co_posonlyargcount), &_Py_ID(co_kwonlyargcount), &_Py_ID(co_nlocals), &_Py_ID(co_stacksize), &_Py_ID(co_flags), &_Py_ID(co_firstlineno), &_Py_ID(co_code), &_Py_ID(co_consts), &_Py_ID(co_names), &_Py_ID(co_varnames), &_Py_ID(co_freevars), &_Py_ID(co_cellvars), &_Py_ID(co_filename), &_Py_ID(co_name), &_Py_ID(co_qualname), &_Py_ID(co_linetable), &_Py_ID(co_exceptiontable), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -447,14 +449,16 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(oparg), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -484,4 +488,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n exit: return return_value; } -/*[clinic end generated code: output=5f97acf4a317a786 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b6c98f17c60ace53 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 5eec880940ecdb..e92c6e985852de 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -110,14 +110,16 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(real), &_Py_ID(imag), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -158,4 +160,4 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=0b9f12050d70c462 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=52e85a1e258425d6 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 142848379cf58a..75706437df83f9 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -17,14 +17,16 @@ mappingproxy_new(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(mapping), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -101,14 +103,16 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(fget), &_Py_ID(fset), &_Py_ID(fdel), &_Py_ID(doc), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -163,4 +167,4 @@ property_init(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=0a16d3f1f58901fd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8dc1ddfcf764ac8e input=a9049054013a1b77]*/ diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index 3fbf439910e114..208a9e8be1a1a2 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -32,14 +32,16 @@ enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(start), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -105,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=da7b5b91a6f1b371 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=683261097bfd794a input=a9049054013a1b77]*/ diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 2d06a0a76cbed8..c3a3a8edc39278 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -35,14 +35,16 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(code), &_Py_ID(globals), &_Py_ID(name), &_Py_ID(argdefs), &_Py_ID(closure), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -102,4 +104,4 @@ func_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=6a8b851396d4f8e1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=777cead7b1f6fad3 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 1219e2964dce98..926eaa5d36983b 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -174,14 +174,16 @@ list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(reverse), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -380,4 +382,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored)) { return list___reversed___impl(self); } -/*[clinic end generated code: output=db59fe39806487d5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=782ed6c68b1c9f83 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 21973346e73448..1cf5b43188596b 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -17,14 +17,16 @@ long_new(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(base), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -286,14 +288,16 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject * PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(length), &_Py_ID(byteorder), &_Py_ID(signed), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -398,14 +402,16 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(bytes), &_Py_ID(byteorder), &_Py_ID(signed), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -460,4 +466,4 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb exit: return return_value; } -/*[clinic end generated code: output=c0f4be6b9c4a9718 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b29b4afc65e3290e input=a9049054013a1b77]*/ diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index 0b19e0dd69fe5a..ff7b50bb114b05 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -23,14 +23,16 @@ memoryview(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(object), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -97,14 +99,16 @@ memoryview_cast(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t narg PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(format), &_Py_ID(shape), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -206,14 +210,16 @@ memoryview_tobytes(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t n 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(order), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -299,14 +305,16 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(bytes_per_sep), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -348,4 +356,4 @@ memoryview_hex(PyMemoryViewObject *self, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=db15d56c1d6980c7 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a832f2fc44e4794c input=a9049054013a1b77]*/ diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index a3cd5f05e4d727..861bcea6215950 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -25,14 +25,16 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) int return_value = -1; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(doc), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -75,4 +77,4 @@ module___init__(PyObject *self, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=bda1c2523136cae5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2f897c9e4721f03f input=a9049054013a1b77]*/ diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index a9acc877196f45..115a134e3f7f54 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -26,14 +26,16 @@ OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(iterable), &_Py_ID(value), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -89,14 +91,16 @@ OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t na PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -153,14 +157,16 @@ OrderedDict_pop(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(default), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -215,14 +221,16 @@ OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(last), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -278,14 +286,16 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t n PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(last), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -322,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=b5f283ccb30d58cd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=76d85a9162d62ca8 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index e7c8b8b4f0f24c..40ba18a544f4b3 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -17,14 +17,16 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sequence), &_Py_ID(dict), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -60,4 +62,4 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=877766d79425a53b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=802d5663c7d01024 input=a9049054013a1b77]*/ diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 9252dd015e907f..d803a2733bd636 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -162,14 +162,16 @@ unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -253,14 +255,16 @@ unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(tabsize), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -952,14 +956,16 @@ unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1072,14 +1078,16 @@ unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(maxsplit), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1151,14 +1159,16 @@ unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(keepends), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1406,14 +1416,16 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(object), &_Py_ID(encoding), &_Py_ID(errors), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1485,4 +1497,4 @@ unicode_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=03ac50defdc6a9c1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e775ff4154f1c935 input=a9049054013a1b77]*/ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 2ce7ebb14af82e..49388cf043ced2 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -28,14 +28,16 @@ stringlib_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(tabsize), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -276,4 +278,4 @@ stringlib_zfill(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=e8860c16bac89939 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d44a269805f6739e input=a9049054013a1b77]*/ diff --git a/PC/clinic/_testconsole.c.h b/PC/clinic/_testconsole.c.h index d51b4f204f0aa9..b2f3b4ce8b08a2 100644 --- a/PC/clinic/_testconsole.c.h +++ b/PC/clinic/_testconsole.c.h @@ -29,14 +29,16 @@ _testconsole_write_input(PyObject *module, PyObject *const *args, Py_ssize_t nar PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), &_Py_ID(s), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -92,14 +94,16 @@ _testconsole_read_output(PyObject *module, PyObject *const *args, Py_ssize_t nar 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(file), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -136,4 +140,4 @@ _testconsole_read_output(PyObject *module, PyObject *const *args, Py_ssize_t nar #ifndef _TESTCONSOLE_READ_OUTPUT_METHODDEF #define _TESTCONSOLE_READ_OUTPUT_METHODDEF #endif /* !defined(_TESTCONSOLE_READ_OUTPUT_METHODDEF) */ -/*[clinic end generated code: output=715f638690f09ae5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=208c72e2c873555b input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 6a1079245a4afb..dc78274e062b29 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -95,14 +95,16 @@ winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *const *args, Py_ssize_t n PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(exc_type), &_Py_ID(exc_value), &_Py_ID(traceback), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -315,14 +317,16 @@ winreg_CreateKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -490,14 +494,16 @@ winreg_DeleteKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(access), &_Py_ID(reserved), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -892,14 +898,16 @@ winreg_OpenKey(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1003,14 +1011,16 @@ winreg_OpenKeyEx(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(sub_key), &_Py_ID(reserved), &_Py_ID(access), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1569,4 +1579,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=69741cf92c8679e9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5dfd7dbce8ccb392 input=a9049054013a1b77]*/ diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index 2ac3db547a6718..241d547c267a4c 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -31,14 +31,16 @@ winsound_PlaySound(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sound), &_Py_ID(flags), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -95,14 +97,16 @@ winsound_Beep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(frequency), &_Py_ID(duration), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -158,14 +162,16 @@ winsound_MessageBeep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(type), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -200,4 +206,4 @@ winsound_MessageBeep(PyObject *module, PyObject *const *args, Py_ssize_t nargs, exit: return return_value; } -/*[clinic end generated code: output=8f2b830992e924ba input=a9049054013a1b77]*/ +/*[clinic end generated code: output=f70b7730127208d8 input=a9049054013a1b77]*/ diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index 09fb9e12b5e2c6..6af93743f40dab 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -17,14 +17,16 @@ tokenizeriter_new(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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(source), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -65,4 +67,4 @@ tokenizeriter_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=f4ad6c00049b8fbd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=8c2c09f651961986 input=a9049054013a1b77]*/ diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index cbf6d911d23008..13ebbf45b8e168 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -27,14 +27,16 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(message), &_Py_ID(category), &_Py_ID(stacklevel), &_Py_ID(source), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -117,14 +119,16 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 8 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[8]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 8) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(message), &_Py_ID(category), &_Py_ID(filename), &_Py_ID(lineno), &_Py_ID(module), &_Py_ID(registry), &_Py_ID(module_globals), &_Py_ID(source), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -195,4 +199,4 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs exit: return return_value; } -/*[clinic end generated code: output=587aba8230c8a221 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=2eac4fabc87a4d56 input=a9049054013a1b77]*/ diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index 9e99b3c0cd41d6..abe5476b283b06 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -42,14 +42,16 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 5 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[5]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 5) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(name), &_Py_ID(globals), &_Py_ID(locals), &_Py_ID(fromlist), &_Py_ID(level), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -282,14 +284,16 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 7 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[7]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 7) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(source), &_Py_ID(filename), &_Py_ID(mode), &_Py_ID(flags), &_Py_ID(dont_inherit), &_Py_ID(optimize), &_Py_ID(_feature_version), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -482,14 +486,16 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(closure), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -814,14 +820,16 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 3 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[3]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 3) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(base), &_Py_ID(exp), &_Py_ID(mod), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -886,14 +894,16 @@ builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(sep), &_Py_ID(end), &_Py_ID(file), &_Py_ID(flush), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1023,14 +1033,16 @@ builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(number), &_Py_ID(ndigits), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1087,14 +1099,16 @@ builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(start), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1198,4 +1212,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs) exit: return return_value; } -/*[clinic end generated code: output=86126812a48f432e input=a9049054013a1b77]*/ +/*[clinic end generated code: output=919725bf5d400acf input=a9049054013a1b77]*/ diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index 5575ca17e412b1..819fb1c75c15c3 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -201,14 +201,16 @@ _imp_find_frozen(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(withdata), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -555,14 +557,16 @@ _imp_source_hash(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 2 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[2]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 2) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(key), &_Py_ID(source), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -613,4 +617,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=fd65dd97485d679d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=806352838c3f7008 input=a9049054013a1b77]*/ diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index 9501958ba44e05..beaf21c85bcff2 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -26,14 +26,16 @@ sys_addaudithook(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyOb 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(hook), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -454,14 +456,16 @@ sys_set_coroutine_origin_tracking_depth(PyObject *module, PyObject *const *args, 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[1]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 1) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(depth), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -1166,4 +1170,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef SYS_GETANDROIDAPILEVEL_METHODDEF #define SYS_GETANDROIDAPILEVEL_METHODDEF #endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */ -/*[clinic end generated code: output=f1a7d3e4d16cafc5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=38446a4c76e2f3b6 input=a9049054013a1b77]*/ diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index bd5db806194e33..3c344934971643 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -24,14 +24,16 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + #define NUM_KEYWORDS 4 static struct { PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[4]; + PyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, 4) + .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = { &_Py_ID(tb_next), &_Py_ID(tb_frame), &_Py_ID(tb_lasti), &_Py_ID(tb_lineno), }, }; + #undef NUM_KEYWORDS #define KWTUPLE (&_kwtuple.ob_base.ob_base) #else // !Py_BUILD_CORE @@ -76,4 +78,4 @@ tb_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) exit: return return_value; } -/*[clinic end generated code: output=99884fd1eb717db9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=7bc9927e362fdfb7 input=a9049054013a1b77]*/ diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index b808a2a518c8e4..805bdcb4365450 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -542,14 +542,6 @@ def declare_parser(f, *, hasformat=False): kwtuple field is also statically initialized. Otherwise it is initialized at runtime. """ - def keywords(f): - params = f.parameters.values() - kwds = [ - p for p in params - if not p.is_positional_only() and not p.is_vararg() - ] - return kwds - if hasformat: fname = '' format_ = '.format = "{format_units}:{name}",' @@ -557,7 +549,10 @@ def keywords(f): fname = '.fname = "{name}",' format_ = '' - num_keywords = len(keywords(f)) + num_keywords = len([ + p for p in f.parameters.values() + if not p.is_positional_only() and not p.is_vararg() + ]) if num_keywords == 0: declarations = """ #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) @@ -574,7 +569,7 @@ def keywords(f): static struct {{ PyGC_Head _this_is_not_used; PyObject_VAR_HEAD - PyObject *ob_item[%d]; + PyObject *ob_item[NUM_KEYWORDS]; }} _kwtuple = {{ .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS) .ob_item = {{ {keywords_py} }}, @@ -585,7 +580,7 @@ def keywords(f): #else // !Py_BUILD_CORE # define KWTUPLE NULL #endif // !Py_BUILD_CORE - """ % (num_keywords) + """ % num_keywords declarations += """ static const char * const _keywords[] = {{{keywords_c} NULL}};