1/*[clinic input]
2output preset block
3[clinic start generated code]*/
4/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3c81ac2402d06a8b]*/
5
6
7/*[clinic input]
8test_object_converter
9
10    a: object
11    b: object(converter="PyUnicode_FSConverter")
12    c: object(subclass_of="&PyUnicode_Type")
13    d: object(type="PyUnicode_Object *")
14    /
15
16[clinic start generated code]*/
17
18PyDoc_STRVAR(test_object_converter__doc__,
19"test_object_converter($module, a, b, c, d, /)\n"
20"--\n"
21"\n");
22
23#define TEST_OBJECT_CONVERTER_METHODDEF    \
24    {"test_object_converter", _PyCFunction_CAST(test_object_converter), METH_FASTCALL, test_object_converter__doc__},
25
26static PyObject *
27test_object_converter_impl(PyObject *module, PyObject *a, PyObject *b,
28                           PyObject *c, PyUnicode_Object *d);
29
30static PyObject *
31test_object_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
32{
33    PyObject *return_value = NULL;
34    PyObject *a;
35    PyObject *b;
36    PyObject *c;
37    PyUnicode_Object *d;
38
39    if (!_PyArg_CheckPositional("test_object_converter", nargs, 4, 4)) {
40        goto exit;
41    }
42    a = args[0];
43    if (!PyUnicode_FSConverter(args[1], &b)) {
44        goto exit;
45    }
46    if (!PyUnicode_Check(args[2])) {
47        _PyArg_BadArgument("test_object_converter", "argument 3", "str", args[2]);
48        goto exit;
49    }
50    c = args[2];
51    d = (PyUnicode_Object *)args[3];
52    return_value = test_object_converter_impl(module, a, b, c, d);
53
54exit:
55    return return_value;
56}
57
58static PyObject *
59test_object_converter_impl(PyObject *module, PyObject *a, PyObject *b,
60                           PyObject *c, PyUnicode_Object *d)
61/*[clinic end generated code: output=886f4f9b598726b6 input=005e6a8a711a869b]*/
62
63
64/*[clinic input]
65test_object_converter_one_arg
66
67    a: object
68    /
69
70[clinic start generated code]*/
71
72PyDoc_STRVAR(test_object_converter_one_arg__doc__,
73"test_object_converter_one_arg($module, a, /)\n"
74"--\n"
75"\n");
76
77#define TEST_OBJECT_CONVERTER_ONE_ARG_METHODDEF    \
78    {"test_object_converter_one_arg", (PyCFunction)test_object_converter_one_arg, METH_O, test_object_converter_one_arg__doc__},
79
80static PyObject *
81test_object_converter_one_arg(PyObject *module, PyObject *a)
82/*[clinic end generated code: output=6da755f8502139df input=d635d92a421f1ca3]*/
83
84
85/*[clinic input]
86test_objects_converter
87
88    a: object
89    b: object = NULL
90    /
91
92[clinic start generated code]*/
93
94PyDoc_STRVAR(test_objects_converter__doc__,
95"test_objects_converter($module, a, b=<unrepresentable>, /)\n"
96"--\n"
97"\n");
98
99#define TEST_OBJECTS_CONVERTER_METHODDEF    \
100    {"test_objects_converter", _PyCFunction_CAST(test_objects_converter), METH_FASTCALL, test_objects_converter__doc__},
101
102static PyObject *
103test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b);
104
105static PyObject *
106test_objects_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
107{
108    PyObject *return_value = NULL;
109    PyObject *a;
110    PyObject *b = NULL;
111
112    if (!_PyArg_CheckPositional("test_objects_converter", nargs, 1, 2)) {
113        goto exit;
114    }
115    a = args[0];
116    if (nargs < 2) {
117        goto skip_optional;
118    }
119    b = args[1];
120skip_optional:
121    return_value = test_objects_converter_impl(module, a, b);
122
123exit:
124    return return_value;
125}
126
127static PyObject *
128test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
129/*[clinic end generated code: output=fc26328b79d46bb7 input=4cbb3d9edd2a36f3]*/
130
131
132/*[clinic input]
133test_object_converter_subclass_of
134
135    a: object(subclass_of="&PyLong_Type")
136    b: object(subclass_of="&PyTuple_Type")
137    c: object(subclass_of="&PyList_Type")
138    d: object(subclass_of="&PySet_Type")
139    e: object(subclass_of="&PyFrozenSet_Type")
140    f: object(subclass_of="&PyDict_Type")
141    g: object(subclass_of="&PyUnicode_Type")
142    h: object(subclass_of="&PyBytes_Type")
143    i: object(subclass_of="&PyByteArray_Type")
144    j: object(subclass_of="&MyType")
145    /
146
147[clinic start generated code]*/
148
149PyDoc_STRVAR(test_object_converter_subclass_of__doc__,
150"test_object_converter_subclass_of($module, a, b, c, d, e, f, g, h, i,\n"
151"                                  j, /)\n"
152"--\n"
153"\n");
154
155#define TEST_OBJECT_CONVERTER_SUBCLASS_OF_METHODDEF    \
156    {"test_object_converter_subclass_of", _PyCFunction_CAST(test_object_converter_subclass_of), METH_FASTCALL, test_object_converter_subclass_of__doc__},
157
158static PyObject *
159test_object_converter_subclass_of_impl(PyObject *module, PyObject *a,
160                                       PyObject *b, PyObject *c, PyObject *d,
161                                       PyObject *e, PyObject *f, PyObject *g,
162                                       PyObject *h, PyObject *i, PyObject *j);
163
164static PyObject *
165test_object_converter_subclass_of(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
166{
167    PyObject *return_value = NULL;
168    PyObject *a;
169    PyObject *b;
170    PyObject *c;
171    PyObject *d;
172    PyObject *e;
173    PyObject *f;
174    PyObject *g;
175    PyObject *h;
176    PyObject *i;
177    PyObject *j;
178
179    if (!_PyArg_CheckPositional("test_object_converter_subclass_of", nargs, 10, 10)) {
180        goto exit;
181    }
182    if (!PyLong_Check(args[0])) {
183        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 1", "int", args[0]);
184        goto exit;
185    }
186    a = args[0];
187    if (!PyTuple_Check(args[1])) {
188        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 2", "tuple", args[1]);
189        goto exit;
190    }
191    b = args[1];
192    if (!PyList_Check(args[2])) {
193        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 3", "list", args[2]);
194        goto exit;
195    }
196    c = args[2];
197    if (!PySet_Check(args[3])) {
198        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 4", "set", args[3]);
199        goto exit;
200    }
201    d = args[3];
202    if (!PyFrozenSet_Check(args[4])) {
203        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 5", "frozenset", args[4]);
204        goto exit;
205    }
206    e = args[4];
207    if (!PyDict_Check(args[5])) {
208        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 6", "dict", args[5]);
209        goto exit;
210    }
211    f = args[5];
212    if (!PyUnicode_Check(args[6])) {
213        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 7", "str", args[6]);
214        goto exit;
215    }
216    g = args[6];
217    if (!PyBytes_Check(args[7])) {
218        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 8", "bytes", args[7]);
219        goto exit;
220    }
221    h = args[7];
222    if (!PyByteArray_Check(args[8])) {
223        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 9", "bytearray", args[8]);
224        goto exit;
225    }
226    i = args[8];
227    if (!PyObject_TypeCheck(args[9], &MyType)) {
228        _PyArg_BadArgument("test_object_converter_subclass_of", "argument 10", (&MyType)->tp_name, args[9]);
229        goto exit;
230    }
231    j = args[9];
232    return_value = test_object_converter_subclass_of_impl(module, a, b, c, d, e, f, g, h, i, j);
233
234exit:
235    return return_value;
236}
237
238static PyObject *
239test_object_converter_subclass_of_impl(PyObject *module, PyObject *a,
240                                       PyObject *b, PyObject *c, PyObject *d,
241                                       PyObject *e, PyObject *f, PyObject *g,
242                                       PyObject *h, PyObject *i, PyObject *j)
243/*[clinic end generated code: output=e4b07c9a54479a40 input=31b06b772d5f983e]*/
244
245
246/*[clinic input]
247test_PyBytesObject_converter
248
249    a: PyBytesObject
250    /
251
252[clinic start generated code]*/
253
254PyDoc_STRVAR(test_PyBytesObject_converter__doc__,
255"test_PyBytesObject_converter($module, a, /)\n"
256"--\n"
257"\n");
258
259#define TEST_PYBYTESOBJECT_CONVERTER_METHODDEF    \
260    {"test_PyBytesObject_converter", (PyCFunction)test_PyBytesObject_converter, METH_O, test_PyBytesObject_converter__doc__},
261
262static PyObject *
263test_PyBytesObject_converter_impl(PyObject *module, PyBytesObject *a);
264
265static PyObject *
266test_PyBytesObject_converter(PyObject *module, PyObject *arg)
267{
268    PyObject *return_value = NULL;
269    PyBytesObject *a;
270
271    if (!PyBytes_Check(arg)) {
272        _PyArg_BadArgument("test_PyBytesObject_converter", "argument", "bytes", arg);
273        goto exit;
274    }
275    a = (PyBytesObject *)arg;
276    return_value = test_PyBytesObject_converter_impl(module, a);
277
278exit:
279    return return_value;
280}
281
282static PyObject *
283test_PyBytesObject_converter_impl(PyObject *module, PyBytesObject *a)
284/*[clinic end generated code: output=7539d628e6fceace input=12b10c7cb5750400]*/
285
286
287/*[clinic input]
288test_PyByteArrayObject_converter
289
290    a: PyByteArrayObject
291    /
292
293[clinic start generated code]*/
294
295PyDoc_STRVAR(test_PyByteArrayObject_converter__doc__,
296"test_PyByteArrayObject_converter($module, a, /)\n"
297"--\n"
298"\n");
299
300#define TEST_PYBYTEARRAYOBJECT_CONVERTER_METHODDEF    \
301    {"test_PyByteArrayObject_converter", (PyCFunction)test_PyByteArrayObject_converter, METH_O, test_PyByteArrayObject_converter__doc__},
302
303static PyObject *
304test_PyByteArrayObject_converter_impl(PyObject *module, PyByteArrayObject *a);
305
306static PyObject *
307test_PyByteArrayObject_converter(PyObject *module, PyObject *arg)
308{
309    PyObject *return_value = NULL;
310    PyByteArrayObject *a;
311
312    if (!PyByteArray_Check(arg)) {
313        _PyArg_BadArgument("test_PyByteArrayObject_converter", "argument", "bytearray", arg);
314        goto exit;
315    }
316    a = (PyByteArrayObject *)arg;
317    return_value = test_PyByteArrayObject_converter_impl(module, a);
318
319exit:
320    return return_value;
321}
322
323static PyObject *
324test_PyByteArrayObject_converter_impl(PyObject *module, PyByteArrayObject *a)
325/*[clinic end generated code: output=1245af9f5b3e355e input=5a657da535d194ae]*/
326
327
328/*[clinic input]
329test_unicode_converter
330
331    a: unicode
332    /
333
334[clinic start generated code]*/
335
336PyDoc_STRVAR(test_unicode_converter__doc__,
337"test_unicode_converter($module, a, /)\n"
338"--\n"
339"\n");
340
341#define TEST_UNICODE_CONVERTER_METHODDEF    \
342    {"test_unicode_converter", (PyCFunction)test_unicode_converter, METH_O, test_unicode_converter__doc__},
343
344static PyObject *
345test_unicode_converter_impl(PyObject *module, PyObject *a);
346
347static PyObject *
348test_unicode_converter(PyObject *module, PyObject *arg)
349{
350    PyObject *return_value = NULL;
351    PyObject *a;
352
353    if (!PyUnicode_Check(arg)) {
354        _PyArg_BadArgument("test_unicode_converter", "argument", "str", arg);
355        goto exit;
356    }
357    if (PyUnicode_READY(arg) == -1) {
358        goto exit;
359    }
360    a = arg;
361    return_value = test_unicode_converter_impl(module, a);
362
363exit:
364    return return_value;
365}
366
367static PyObject *
368test_unicode_converter_impl(PyObject *module, PyObject *a)
369/*[clinic end generated code: output=18f1e3880c862611 input=aa33612df92aa9c5]*/
370
371
372/*[clinic input]
373test_bool_converter
374
375    a: bool = True
376    b: bool(accept={object}) = True
377    c: bool(accept={int}) = True
378    /
379
380[clinic start generated code]*/
381
382PyDoc_STRVAR(test_bool_converter__doc__,
383"test_bool_converter($module, a=True, b=True, c=True, /)\n"
384"--\n"
385"\n");
386
387#define TEST_BOOL_CONVERTER_METHODDEF    \
388    {"test_bool_converter", _PyCFunction_CAST(test_bool_converter), METH_FASTCALL, test_bool_converter__doc__},
389
390static PyObject *
391test_bool_converter_impl(PyObject *module, int a, int b, int c);
392
393static PyObject *
394test_bool_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
395{
396    PyObject *return_value = NULL;
397    int a = 1;
398    int b = 1;
399    int c = 1;
400
401    if (!_PyArg_CheckPositional("test_bool_converter", nargs, 0, 3)) {
402        goto exit;
403    }
404    if (nargs < 1) {
405        goto skip_optional;
406    }
407    a = PyObject_IsTrue(args[0]);
408    if (a < 0) {
409        goto exit;
410    }
411    if (nargs < 2) {
412        goto skip_optional;
413    }
414    b = PyObject_IsTrue(args[1]);
415    if (b < 0) {
416        goto exit;
417    }
418    if (nargs < 3) {
419        goto skip_optional;
420    }
421    c = _PyLong_AsInt(args[2]);
422    if (c == -1 && PyErr_Occurred()) {
423        goto exit;
424    }
425skip_optional:
426    return_value = test_bool_converter_impl(module, a, b, c);
427
428exit:
429    return return_value;
430}
431
432static PyObject *
433test_bool_converter_impl(PyObject *module, int a, int b, int c)
434/*[clinic end generated code: output=27f0e653a70b9be3 input=939854fa9f248c60]*/
435
436
437/*[clinic input]
438test_char_converter
439
440    a: char = b'A'
441    b: char = b'\a'
442    c: char = b'\b'
443    d: char = b'\t'
444    e: char = b'\n'
445    f: char = b'\v'
446    g: char = b'\f'
447    h: char = b'\r'
448    i: char = b'"'
449    j: char = b"'"
450    k: char = b'?'
451    l: char = b'\\'
452    m: char = b'\000'
453    n: char = b'\377'
454    /
455
456[clinic start generated code]*/
457
458PyDoc_STRVAR(test_char_converter__doc__,
459"test_char_converter($module, a=b\'A\', b=b\'\\x07\', c=b\'\\x08\', d=b\'\\t\',\n"
460"                    e=b\'\\n\', f=b\'\\x0b\', g=b\'\\x0c\', h=b\'\\r\', i=b\'\"\',\n"
461"                    j=b\"\'\", k=b\'?\', l=b\'\\\\\', m=b\'\\x00\', n=b\'\\xff\', /)\n"
462"--\n"
463"\n");
464
465#define TEST_CHAR_CONVERTER_METHODDEF    \
466    {"test_char_converter", _PyCFunction_CAST(test_char_converter), METH_FASTCALL, test_char_converter__doc__},
467
468static PyObject *
469test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
470                         char e, char f, char g, char h, char i, char j,
471                         char k, char l, char m, char n);
472
473static PyObject *
474test_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
475{
476    PyObject *return_value = NULL;
477    char a = 'A';
478    char b = '\x07';
479    char c = '\x08';
480    char d = '\t';
481    char e = '\n';
482    char f = '\x0b';
483    char g = '\x0c';
484    char h = '\r';
485    char i = '"';
486    char j = '\'';
487    char k = '?';
488    char l = '\\';
489    char m = '\x00';
490    char n = '\xff';
491
492    if (!_PyArg_CheckPositional("test_char_converter", nargs, 0, 14)) {
493        goto exit;
494    }
495    if (nargs < 1) {
496        goto skip_optional;
497    }
498    if (PyBytes_Check(args[0]) && PyBytes_GET_SIZE(args[0]) == 1) {
499        a = PyBytes_AS_STRING(args[0])[0];
500    }
501    else if (PyByteArray_Check(args[0]) && PyByteArray_GET_SIZE(args[0]) == 1) {
502        a = PyByteArray_AS_STRING(args[0])[0];
503    }
504    else {
505        _PyArg_BadArgument("test_char_converter", "argument 1", "a byte string of length 1", args[0]);
506        goto exit;
507    }
508    if (nargs < 2) {
509        goto skip_optional;
510    }
511    if (PyBytes_Check(args[1]) && PyBytes_GET_SIZE(args[1]) == 1) {
512        b = PyBytes_AS_STRING(args[1])[0];
513    }
514    else if (PyByteArray_Check(args[1]) && PyByteArray_GET_SIZE(args[1]) == 1) {
515        b = PyByteArray_AS_STRING(args[1])[0];
516    }
517    else {
518        _PyArg_BadArgument("test_char_converter", "argument 2", "a byte string of length 1", args[1]);
519        goto exit;
520    }
521    if (nargs < 3) {
522        goto skip_optional;
523    }
524    if (PyBytes_Check(args[2]) && PyBytes_GET_SIZE(args[2]) == 1) {
525        c = PyBytes_AS_STRING(args[2])[0];
526    }
527    else if (PyByteArray_Check(args[2]) && PyByteArray_GET_SIZE(args[2]) == 1) {
528        c = PyByteArray_AS_STRING(args[2])[0];
529    }
530    else {
531        _PyArg_BadArgument("test_char_converter", "argument 3", "a byte string of length 1", args[2]);
532        goto exit;
533    }
534    if (nargs < 4) {
535        goto skip_optional;
536    }
537    if (PyBytes_Check(args[3]) && PyBytes_GET_SIZE(args[3]) == 1) {
538        d = PyBytes_AS_STRING(args[3])[0];
539    }
540    else if (PyByteArray_Check(args[3]) && PyByteArray_GET_SIZE(args[3]) == 1) {
541        d = PyByteArray_AS_STRING(args[3])[0];
542    }
543    else {
544        _PyArg_BadArgument("test_char_converter", "argument 4", "a byte string of length 1", args[3]);
545        goto exit;
546    }
547    if (nargs < 5) {
548        goto skip_optional;
549    }
550    if (PyBytes_Check(args[4]) && PyBytes_GET_SIZE(args[4]) == 1) {
551        e = PyBytes_AS_STRING(args[4])[0];
552    }
553    else if (PyByteArray_Check(args[4]) && PyByteArray_GET_SIZE(args[4]) == 1) {
554        e = PyByteArray_AS_STRING(args[4])[0];
555    }
556    else {
557        _PyArg_BadArgument("test_char_converter", "argument 5", "a byte string of length 1", args[4]);
558        goto exit;
559    }
560    if (nargs < 6) {
561        goto skip_optional;
562    }
563    if (PyBytes_Check(args[5]) && PyBytes_GET_SIZE(args[5]) == 1) {
564        f = PyBytes_AS_STRING(args[5])[0];
565    }
566    else if (PyByteArray_Check(args[5]) && PyByteArray_GET_SIZE(args[5]) == 1) {
567        f = PyByteArray_AS_STRING(args[5])[0];
568    }
569    else {
570        _PyArg_BadArgument("test_char_converter", "argument 6", "a byte string of length 1", args[5]);
571        goto exit;
572    }
573    if (nargs < 7) {
574        goto skip_optional;
575    }
576    if (PyBytes_Check(args[6]) && PyBytes_GET_SIZE(args[6]) == 1) {
577        g = PyBytes_AS_STRING(args[6])[0];
578    }
579    else if (PyByteArray_Check(args[6]) && PyByteArray_GET_SIZE(args[6]) == 1) {
580        g = PyByteArray_AS_STRING(args[6])[0];
581    }
582    else {
583        _PyArg_BadArgument("test_char_converter", "argument 7", "a byte string of length 1", args[6]);
584        goto exit;
585    }
586    if (nargs < 8) {
587        goto skip_optional;
588    }
589    if (PyBytes_Check(args[7]) && PyBytes_GET_SIZE(args[7]) == 1) {
590        h = PyBytes_AS_STRING(args[7])[0];
591    }
592    else if (PyByteArray_Check(args[7]) && PyByteArray_GET_SIZE(args[7]) == 1) {
593        h = PyByteArray_AS_STRING(args[7])[0];
594    }
595    else {
596        _PyArg_BadArgument("test_char_converter", "argument 8", "a byte string of length 1", args[7]);
597        goto exit;
598    }
599    if (nargs < 9) {
600        goto skip_optional;
601    }
602    if (PyBytes_Check(args[8]) && PyBytes_GET_SIZE(args[8]) == 1) {
603        i = PyBytes_AS_STRING(args[8])[0];
604    }
605    else if (PyByteArray_Check(args[8]) && PyByteArray_GET_SIZE(args[8]) == 1) {
606        i = PyByteArray_AS_STRING(args[8])[0];
607    }
608    else {
609        _PyArg_BadArgument("test_char_converter", "argument 9", "a byte string of length 1", args[8]);
610        goto exit;
611    }
612    if (nargs < 10) {
613        goto skip_optional;
614    }
615    if (PyBytes_Check(args[9]) && PyBytes_GET_SIZE(args[9]) == 1) {
616        j = PyBytes_AS_STRING(args[9])[0];
617    }
618    else if (PyByteArray_Check(args[9]) && PyByteArray_GET_SIZE(args[9]) == 1) {
619        j = PyByteArray_AS_STRING(args[9])[0];
620    }
621    else {
622        _PyArg_BadArgument("test_char_converter", "argument 10", "a byte string of length 1", args[9]);
623        goto exit;
624    }
625    if (nargs < 11) {
626        goto skip_optional;
627    }
628    if (PyBytes_Check(args[10]) && PyBytes_GET_SIZE(args[10]) == 1) {
629        k = PyBytes_AS_STRING(args[10])[0];
630    }
631    else if (PyByteArray_Check(args[10]) && PyByteArray_GET_SIZE(args[10]) == 1) {
632        k = PyByteArray_AS_STRING(args[10])[0];
633    }
634    else {
635        _PyArg_BadArgument("test_char_converter", "argument 11", "a byte string of length 1", args[10]);
636        goto exit;
637    }
638    if (nargs < 12) {
639        goto skip_optional;
640    }
641    if (PyBytes_Check(args[11]) && PyBytes_GET_SIZE(args[11]) == 1) {
642        l = PyBytes_AS_STRING(args[11])[0];
643    }
644    else if (PyByteArray_Check(args[11]) && PyByteArray_GET_SIZE(args[11]) == 1) {
645        l = PyByteArray_AS_STRING(args[11])[0];
646    }
647    else {
648        _PyArg_BadArgument("test_char_converter", "argument 12", "a byte string of length 1", args[11]);
649        goto exit;
650    }
651    if (nargs < 13) {
652        goto skip_optional;
653    }
654    if (PyBytes_Check(args[12]) && PyBytes_GET_SIZE(args[12]) == 1) {
655        m = PyBytes_AS_STRING(args[12])[0];
656    }
657    else if (PyByteArray_Check(args[12]) && PyByteArray_GET_SIZE(args[12]) == 1) {
658        m = PyByteArray_AS_STRING(args[12])[0];
659    }
660    else {
661        _PyArg_BadArgument("test_char_converter", "argument 13", "a byte string of length 1", args[12]);
662        goto exit;
663    }
664    if (nargs < 14) {
665        goto skip_optional;
666    }
667    if (PyBytes_Check(args[13]) && PyBytes_GET_SIZE(args[13]) == 1) {
668        n = PyBytes_AS_STRING(args[13])[0];
669    }
670    else if (PyByteArray_Check(args[13]) && PyByteArray_GET_SIZE(args[13]) == 1) {
671        n = PyByteArray_AS_STRING(args[13])[0];
672    }
673    else {
674        _PyArg_BadArgument("test_char_converter", "argument 14", "a byte string of length 1", args[13]);
675        goto exit;
676    }
677skip_optional:
678    return_value = test_char_converter_impl(module, a, b, c, d, e, f, g, h, i, j, k, l, m, n);
679
680exit:
681    return return_value;
682}
683
684static PyObject *
685test_char_converter_impl(PyObject *module, char a, char b, char c, char d,
686                         char e, char f, char g, char h, char i, char j,
687                         char k, char l, char m, char n)
688/*[clinic end generated code: output=98589f02422fe6b1 input=e42330417a44feac]*/
689
690
691/*[clinic input]
692test_unsigned_char_converter
693
694    a: unsigned_char = 12
695    b: unsigned_char(bitwise=False) = 34
696    c: unsigned_char(bitwise=True) = 56
697    /
698
699[clinic start generated code]*/
700
701PyDoc_STRVAR(test_unsigned_char_converter__doc__,
702"test_unsigned_char_converter($module, a=12, b=34, c=56, /)\n"
703"--\n"
704"\n");
705
706#define TEST_UNSIGNED_CHAR_CONVERTER_METHODDEF    \
707    {"test_unsigned_char_converter", _PyCFunction_CAST(test_unsigned_char_converter), METH_FASTCALL, test_unsigned_char_converter__doc__},
708
709static PyObject *
710test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
711                                  unsigned char b, unsigned char c);
712
713static PyObject *
714test_unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
715{
716    PyObject *return_value = NULL;
717    unsigned char a = 12;
718    unsigned char b = 34;
719    unsigned char c = 56;
720
721    if (!_PyArg_CheckPositional("test_unsigned_char_converter", nargs, 0, 3)) {
722        goto exit;
723    }
724    if (nargs < 1) {
725        goto skip_optional;
726    }
727    {
728        long ival = PyLong_AsLong(args[0]);
729        if (ival == -1 && PyErr_Occurred()) {
730            goto exit;
731        }
732        else if (ival < 0) {
733            PyErr_SetString(PyExc_OverflowError,
734                            "unsigned byte integer is less than minimum");
735            goto exit;
736        }
737        else if (ival > UCHAR_MAX) {
738            PyErr_SetString(PyExc_OverflowError,
739                            "unsigned byte integer is greater than maximum");
740            goto exit;
741        }
742        else {
743            a = (unsigned char) ival;
744        }
745    }
746    if (nargs < 2) {
747        goto skip_optional;
748    }
749    {
750        long ival = PyLong_AsLong(args[1]);
751        if (ival == -1 && PyErr_Occurred()) {
752            goto exit;
753        }
754        else if (ival < 0) {
755            PyErr_SetString(PyExc_OverflowError,
756                            "unsigned byte integer is less than minimum");
757            goto exit;
758        }
759        else if (ival > UCHAR_MAX) {
760            PyErr_SetString(PyExc_OverflowError,
761                            "unsigned byte integer is greater than maximum");
762            goto exit;
763        }
764        else {
765            b = (unsigned char) ival;
766        }
767    }
768    if (nargs < 3) {
769        goto skip_optional;
770    }
771    {
772        unsigned long ival = PyLong_AsUnsignedLongMask(args[2]);
773        if (ival == (unsigned long)-1 && PyErr_Occurred()) {
774            goto exit;
775        }
776        else {
777            c = (unsigned char) ival;
778        }
779    }
780skip_optional:
781    return_value = test_unsigned_char_converter_impl(module, a, b, c);
782
783exit:
784    return return_value;
785}
786
787static PyObject *
788test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
789                                  unsigned char b, unsigned char c)
790/*[clinic end generated code: output=45920dbedc22eb55 input=021414060993e289]*/
791
792
793/*[clinic input]
794test_short_converter
795
796    a: short = 12
797    /
798
799[clinic start generated code]*/
800
801PyDoc_STRVAR(test_short_converter__doc__,
802"test_short_converter($module, a=12, /)\n"
803"--\n"
804"\n");
805
806#define TEST_SHORT_CONVERTER_METHODDEF    \
807    {"test_short_converter", _PyCFunction_CAST(test_short_converter), METH_FASTCALL, test_short_converter__doc__},
808
809static PyObject *
810test_short_converter_impl(PyObject *module, short a);
811
812static PyObject *
813test_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
814{
815    PyObject *return_value = NULL;
816    short a = 12;
817
818    if (!_PyArg_CheckPositional("test_short_converter", nargs, 0, 1)) {
819        goto exit;
820    }
821    if (nargs < 1) {
822        goto skip_optional;
823    }
824    {
825        long ival = PyLong_AsLong(args[0]);
826        if (ival == -1 && PyErr_Occurred()) {
827            goto exit;
828        }
829        else if (ival < SHRT_MIN) {
830            PyErr_SetString(PyExc_OverflowError,
831                            "signed short integer is less than minimum");
832            goto exit;
833        }
834        else if (ival > SHRT_MAX) {
835            PyErr_SetString(PyExc_OverflowError,
836                            "signed short integer is greater than maximum");
837            goto exit;
838        }
839        else {
840            a = (short) ival;
841        }
842    }
843skip_optional:
844    return_value = test_short_converter_impl(module, a);
845
846exit:
847    return return_value;
848}
849
850static PyObject *
851test_short_converter_impl(PyObject *module, short a)
852/*[clinic end generated code: output=a580945bd6963d45 input=6a8a7a509a498ff4]*/
853
854
855/*[clinic input]
856test_unsigned_short_converter
857
858    a: unsigned_short = 12
859    b: unsigned_short(bitwise=False) = 34
860    c: unsigned_short(bitwise=True) = 56
861    /
862
863[clinic start generated code]*/
864
865PyDoc_STRVAR(test_unsigned_short_converter__doc__,
866"test_unsigned_short_converter($module, a=12, b=34, c=56, /)\n"
867"--\n"
868"\n");
869
870#define TEST_UNSIGNED_SHORT_CONVERTER_METHODDEF    \
871    {"test_unsigned_short_converter", _PyCFunction_CAST(test_unsigned_short_converter), METH_FASTCALL, test_unsigned_short_converter__doc__},
872
873static PyObject *
874test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
875                                   unsigned short b, unsigned short c);
876
877static PyObject *
878test_unsigned_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
879{
880    PyObject *return_value = NULL;
881    unsigned short a = 12;
882    unsigned short b = 34;
883    unsigned short c = 56;
884
885    if (!_PyArg_CheckPositional("test_unsigned_short_converter", nargs, 0, 3)) {
886        goto exit;
887    }
888    if (nargs < 1) {
889        goto skip_optional;
890    }
891    if (!_PyLong_UnsignedShort_Converter(args[0], &a)) {
892        goto exit;
893    }
894    if (nargs < 2) {
895        goto skip_optional;
896    }
897    if (!_PyLong_UnsignedShort_Converter(args[1], &b)) {
898        goto exit;
899    }
900    if (nargs < 3) {
901        goto skip_optional;
902    }
903    c = (unsigned short)PyLong_AsUnsignedLongMask(args[2]);
904    if (c == (unsigned short)-1 && PyErr_Occurred()) {
905        goto exit;
906    }
907skip_optional:
908    return_value = test_unsigned_short_converter_impl(module, a, b, c);
909
910exit:
911    return return_value;
912}
913
914static PyObject *
915test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
916                                   unsigned short b, unsigned short c)
917/*[clinic end generated code: output=e6e990df729114fc input=cdfd8eff3d9176b4]*/
918
919
920/*[clinic input]
921test_int_converter
922
923    a: int = 12
924    b: int(accept={int}) = 34
925    c: int(accept={str}) = 45
926    d: int(type='myenum') = 67
927    /
928
929[clinic start generated code]*/
930
931PyDoc_STRVAR(test_int_converter__doc__,
932"test_int_converter($module, a=12, b=34, c=45, d=67, /)\n"
933"--\n"
934"\n");
935
936#define TEST_INT_CONVERTER_METHODDEF    \
937    {"test_int_converter", _PyCFunction_CAST(test_int_converter), METH_FASTCALL, test_int_converter__doc__},
938
939static PyObject *
940test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d);
941
942static PyObject *
943test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
944{
945    PyObject *return_value = NULL;
946    int a = 12;
947    int b = 34;
948    int c = 45;
949    myenum d = 67;
950
951    if (!_PyArg_CheckPositional("test_int_converter", nargs, 0, 4)) {
952        goto exit;
953    }
954    if (nargs < 1) {
955        goto skip_optional;
956    }
957    a = _PyLong_AsInt(args[0]);
958    if (a == -1 && PyErr_Occurred()) {
959        goto exit;
960    }
961    if (nargs < 2) {
962        goto skip_optional;
963    }
964    b = _PyLong_AsInt(args[1]);
965    if (b == -1 && PyErr_Occurred()) {
966        goto exit;
967    }
968    if (nargs < 3) {
969        goto skip_optional;
970    }
971    if (!PyUnicode_Check(args[2])) {
972        _PyArg_BadArgument("test_int_converter", "argument 3", "a unicode character", args[2]);
973        goto exit;
974    }
975    if (PyUnicode_READY(args[2])) {
976        goto exit;
977    }
978    if (PyUnicode_GET_LENGTH(args[2]) != 1) {
979        _PyArg_BadArgument("test_int_converter", "argument 3", "a unicode character", args[2]);
980        goto exit;
981    }
982    c = PyUnicode_READ_CHAR(args[2], 0);
983    if (nargs < 4) {
984        goto skip_optional;
985    }
986    d = _PyLong_AsInt(args[3]);
987    if (d == -1 && PyErr_Occurred()) {
988        goto exit;
989    }
990skip_optional:
991    return_value = test_int_converter_impl(module, a, b, c, d);
992
993exit:
994    return return_value;
995}
996
997static PyObject *
998test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
999/*[clinic end generated code: output=800993036e078c07 input=d20541fc1ca0553e]*/
1000
1001
1002/*[clinic input]
1003test_unsigned_int_converter
1004
1005    a: unsigned_int = 12
1006    b: unsigned_int(bitwise=False) = 34
1007    c: unsigned_int(bitwise=True) = 56
1008    /
1009
1010[clinic start generated code]*/
1011
1012PyDoc_STRVAR(test_unsigned_int_converter__doc__,
1013"test_unsigned_int_converter($module, a=12, b=34, c=56, /)\n"
1014"--\n"
1015"\n");
1016
1017#define TEST_UNSIGNED_INT_CONVERTER_METHODDEF    \
1018    {"test_unsigned_int_converter", _PyCFunction_CAST(test_unsigned_int_converter), METH_FASTCALL, test_unsigned_int_converter__doc__},
1019
1020static PyObject *
1021test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
1022                                 unsigned int b, unsigned int c);
1023
1024static PyObject *
1025test_unsigned_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1026{
1027    PyObject *return_value = NULL;
1028    unsigned int a = 12;
1029    unsigned int b = 34;
1030    unsigned int c = 56;
1031
1032    if (!_PyArg_CheckPositional("test_unsigned_int_converter", nargs, 0, 3)) {
1033        goto exit;
1034    }
1035    if (nargs < 1) {
1036        goto skip_optional;
1037    }
1038    if (!_PyLong_UnsignedInt_Converter(args[0], &a)) {
1039        goto exit;
1040    }
1041    if (nargs < 2) {
1042        goto skip_optional;
1043    }
1044    if (!_PyLong_UnsignedInt_Converter(args[1], &b)) {
1045        goto exit;
1046    }
1047    if (nargs < 3) {
1048        goto skip_optional;
1049    }
1050    c = (unsigned int)PyLong_AsUnsignedLongMask(args[2]);
1051    if (c == (unsigned int)-1 && PyErr_Occurred()) {
1052        goto exit;
1053    }
1054skip_optional:
1055    return_value = test_unsigned_int_converter_impl(module, a, b, c);
1056
1057exit:
1058    return return_value;
1059}
1060
1061static PyObject *
1062test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
1063                                 unsigned int b, unsigned int c)
1064/*[clinic end generated code: output=f9cdbe410ccc98a3 input=5533534828b62fc0]*/
1065
1066
1067/*[clinic input]
1068test_long_converter
1069
1070    a: long = 12
1071    /
1072
1073[clinic start generated code]*/
1074
1075PyDoc_STRVAR(test_long_converter__doc__,
1076"test_long_converter($module, a=12, /)\n"
1077"--\n"
1078"\n");
1079
1080#define TEST_LONG_CONVERTER_METHODDEF    \
1081    {"test_long_converter", _PyCFunction_CAST(test_long_converter), METH_FASTCALL, test_long_converter__doc__},
1082
1083static PyObject *
1084test_long_converter_impl(PyObject *module, long a);
1085
1086static PyObject *
1087test_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1088{
1089    PyObject *return_value = NULL;
1090    long a = 12;
1091
1092    if (!_PyArg_CheckPositional("test_long_converter", nargs, 0, 1)) {
1093        goto exit;
1094    }
1095    if (nargs < 1) {
1096        goto skip_optional;
1097    }
1098    a = PyLong_AsLong(args[0]);
1099    if (a == -1 && PyErr_Occurred()) {
1100        goto exit;
1101    }
1102skip_optional:
1103    return_value = test_long_converter_impl(module, a);
1104
1105exit:
1106    return return_value;
1107}
1108
1109static PyObject *
1110test_long_converter_impl(PyObject *module, long a)
1111/*[clinic end generated code: output=02b3a83495c1d236 input=d2179e3c9cdcde89]*/
1112
1113
1114/*[clinic input]
1115test_unsigned_long_converter
1116
1117    a: unsigned_long = 12
1118    b: unsigned_long(bitwise=False) = 34
1119    c: unsigned_long(bitwise=True) = 56
1120    /
1121
1122[clinic start generated code]*/
1123
1124PyDoc_STRVAR(test_unsigned_long_converter__doc__,
1125"test_unsigned_long_converter($module, a=12, b=34, c=56, /)\n"
1126"--\n"
1127"\n");
1128
1129#define TEST_UNSIGNED_LONG_CONVERTER_METHODDEF    \
1130    {"test_unsigned_long_converter", _PyCFunction_CAST(test_unsigned_long_converter), METH_FASTCALL, test_unsigned_long_converter__doc__},
1131
1132static PyObject *
1133test_unsigned_long_converter_impl(PyObject *module, unsigned long a,
1134                                  unsigned long b, unsigned long c);
1135
1136static PyObject *
1137test_unsigned_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1138{
1139    PyObject *return_value = NULL;
1140    unsigned long a = 12;
1141    unsigned long b = 34;
1142    unsigned long c = 56;
1143
1144    if (!_PyArg_CheckPositional("test_unsigned_long_converter", nargs, 0, 3)) {
1145        goto exit;
1146    }
1147    if (nargs < 1) {
1148        goto skip_optional;
1149    }
1150    if (!_PyLong_UnsignedLong_Converter(args[0], &a)) {
1151        goto exit;
1152    }
1153    if (nargs < 2) {
1154        goto skip_optional;
1155    }
1156    if (!_PyLong_UnsignedLong_Converter(args[1], &b)) {
1157        goto exit;
1158    }
1159    if (nargs < 3) {
1160        goto skip_optional;
1161    }
1162    if (!PyLong_Check(args[2])) {
1163        _PyArg_BadArgument("test_unsigned_long_converter", "argument 3", "int", args[2]);
1164        goto exit;
1165    }
1166    c = PyLong_AsUnsignedLongMask(args[2]);
1167skip_optional:
1168    return_value = test_unsigned_long_converter_impl(module, a, b, c);
1169
1170exit:
1171    return return_value;
1172}
1173
1174static PyObject *
1175test_unsigned_long_converter_impl(PyObject *module, unsigned long a,
1176                                  unsigned long b, unsigned long c)
1177/*[clinic end generated code: output=540bb0ba2894e1fe input=f450d94cae1ef73b]*/
1178
1179
1180/*[clinic input]
1181test_long_long_converter
1182
1183    a: long_long = 12
1184    /
1185
1186[clinic start generated code]*/
1187
1188PyDoc_STRVAR(test_long_long_converter__doc__,
1189"test_long_long_converter($module, a=12, /)\n"
1190"--\n"
1191"\n");
1192
1193#define TEST_LONG_LONG_CONVERTER_METHODDEF    \
1194    {"test_long_long_converter", _PyCFunction_CAST(test_long_long_converter), METH_FASTCALL, test_long_long_converter__doc__},
1195
1196static PyObject *
1197test_long_long_converter_impl(PyObject *module, long long a);
1198
1199static PyObject *
1200test_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1201{
1202    PyObject *return_value = NULL;
1203    long long a = 12;
1204
1205    if (!_PyArg_CheckPositional("test_long_long_converter", nargs, 0, 1)) {
1206        goto exit;
1207    }
1208    if (nargs < 1) {
1209        goto skip_optional;
1210    }
1211    a = PyLong_AsLongLong(args[0]);
1212    if (a == -1 && PyErr_Occurred()) {
1213        goto exit;
1214    }
1215skip_optional:
1216    return_value = test_long_long_converter_impl(module, a);
1217
1218exit:
1219    return return_value;
1220}
1221
1222static PyObject *
1223test_long_long_converter_impl(PyObject *module, long long a)
1224/*[clinic end generated code: output=f9d4ed79ad2db857 input=d5fc81577ff4dd02]*/
1225
1226
1227/*[clinic input]
1228test_unsigned_long_long_converter
1229
1230    a: unsigned_long_long = 12
1231    b: unsigned_long_long(bitwise=False) = 34
1232    c: unsigned_long_long(bitwise=True) = 56
1233    /
1234
1235[clinic start generated code]*/
1236
1237PyDoc_STRVAR(test_unsigned_long_long_converter__doc__,
1238"test_unsigned_long_long_converter($module, a=12, b=34, c=56, /)\n"
1239"--\n"
1240"\n");
1241
1242#define TEST_UNSIGNED_LONG_LONG_CONVERTER_METHODDEF    \
1243    {"test_unsigned_long_long_converter", _PyCFunction_CAST(test_unsigned_long_long_converter), METH_FASTCALL, test_unsigned_long_long_converter__doc__},
1244
1245static PyObject *
1246test_unsigned_long_long_converter_impl(PyObject *module,
1247                                       unsigned long long a,
1248                                       unsigned long long b,
1249                                       unsigned long long c);
1250
1251static PyObject *
1252test_unsigned_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1253{
1254    PyObject *return_value = NULL;
1255    unsigned long long a = 12;
1256    unsigned long long b = 34;
1257    unsigned long long c = 56;
1258
1259    if (!_PyArg_CheckPositional("test_unsigned_long_long_converter", nargs, 0, 3)) {
1260        goto exit;
1261    }
1262    if (nargs < 1) {
1263        goto skip_optional;
1264    }
1265    if (!_PyLong_UnsignedLongLong_Converter(args[0], &a)) {
1266        goto exit;
1267    }
1268    if (nargs < 2) {
1269        goto skip_optional;
1270    }
1271    if (!_PyLong_UnsignedLongLong_Converter(args[1], &b)) {
1272        goto exit;
1273    }
1274    if (nargs < 3) {
1275        goto skip_optional;
1276    }
1277    if (!PyLong_Check(args[2])) {
1278        _PyArg_BadArgument("test_unsigned_long_long_converter", "argument 3", "int", args[2]);
1279        goto exit;
1280    }
1281    c = PyLong_AsUnsignedLongLongMask(args[2]);
1282skip_optional:
1283    return_value = test_unsigned_long_long_converter_impl(module, a, b, c);
1284
1285exit:
1286    return return_value;
1287}
1288
1289static PyObject *
1290test_unsigned_long_long_converter_impl(PyObject *module,
1291                                       unsigned long long a,
1292                                       unsigned long long b,
1293                                       unsigned long long c)
1294/*[clinic end generated code: output=3d69994f618b46bb input=a15115dc41866ff4]*/
1295
1296
1297/*[clinic input]
1298test_Py_ssize_t_converter
1299
1300    a: Py_ssize_t = 12
1301    b: Py_ssize_t(accept={int}) = 34
1302    c: Py_ssize_t(accept={int, NoneType}) = 56
1303    /
1304
1305[clinic start generated code]*/
1306
1307PyDoc_STRVAR(test_Py_ssize_t_converter__doc__,
1308"test_Py_ssize_t_converter($module, a=12, b=34, c=56, /)\n"
1309"--\n"
1310"\n");
1311
1312#define TEST_PY_SSIZE_T_CONVERTER_METHODDEF    \
1313    {"test_Py_ssize_t_converter", _PyCFunction_CAST(test_Py_ssize_t_converter), METH_FASTCALL, test_Py_ssize_t_converter__doc__},
1314
1315static PyObject *
1316test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
1317                               Py_ssize_t c);
1318
1319static PyObject *
1320test_Py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1321{
1322    PyObject *return_value = NULL;
1323    Py_ssize_t a = 12;
1324    Py_ssize_t b = 34;
1325    Py_ssize_t c = 56;
1326
1327    if (!_PyArg_CheckPositional("test_Py_ssize_t_converter", nargs, 0, 3)) {
1328        goto exit;
1329    }
1330    if (nargs < 1) {
1331        goto skip_optional;
1332    }
1333    {
1334        Py_ssize_t ival = -1;
1335        PyObject *iobj = _PyNumber_Index(args[0]);
1336        if (iobj != NULL) {
1337            ival = PyLong_AsSsize_t(iobj);
1338            Py_DECREF(iobj);
1339        }
1340        if (ival == -1 && PyErr_Occurred()) {
1341            goto exit;
1342        }
1343        a = ival;
1344    }
1345    if (nargs < 2) {
1346        goto skip_optional;
1347    }
1348    {
1349        Py_ssize_t ival = -1;
1350        PyObject *iobj = _PyNumber_Index(args[1]);
1351        if (iobj != NULL) {
1352            ival = PyLong_AsSsize_t(iobj);
1353            Py_DECREF(iobj);
1354        }
1355        if (ival == -1 && PyErr_Occurred()) {
1356            goto exit;
1357        }
1358        b = ival;
1359    }
1360    if (nargs < 3) {
1361        goto skip_optional;
1362    }
1363    if (!_Py_convert_optional_to_ssize_t(args[2], &c)) {
1364        goto exit;
1365    }
1366skip_optional:
1367    return_value = test_Py_ssize_t_converter_impl(module, a, b, c);
1368
1369exit:
1370    return return_value;
1371}
1372
1373static PyObject *
1374test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
1375                               Py_ssize_t c)
1376/*[clinic end generated code: output=48214bc3d01f4dd7 input=3855f184bb3f299d]*/
1377
1378
1379/*[clinic input]
1380test_slice_index_converter
1381
1382    a: slice_index = 12
1383    b: slice_index(accept={int}) = 34
1384    c: slice_index(accept={int, NoneType}) = 56
1385    /
1386
1387[clinic start generated code]*/
1388
1389PyDoc_STRVAR(test_slice_index_converter__doc__,
1390"test_slice_index_converter($module, a=12, b=34, c=56, /)\n"
1391"--\n"
1392"\n");
1393
1394#define TEST_SLICE_INDEX_CONVERTER_METHODDEF    \
1395    {"test_slice_index_converter", _PyCFunction_CAST(test_slice_index_converter), METH_FASTCALL, test_slice_index_converter__doc__},
1396
1397static PyObject *
1398test_slice_index_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
1399                                Py_ssize_t c);
1400
1401static PyObject *
1402test_slice_index_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1403{
1404    PyObject *return_value = NULL;
1405    Py_ssize_t a = 12;
1406    Py_ssize_t b = 34;
1407    Py_ssize_t c = 56;
1408
1409    if (!_PyArg_CheckPositional("test_slice_index_converter", nargs, 0, 3)) {
1410        goto exit;
1411    }
1412    if (nargs < 1) {
1413        goto skip_optional;
1414    }
1415    if (!_PyEval_SliceIndex(args[0], &a)) {
1416        goto exit;
1417    }
1418    if (nargs < 2) {
1419        goto skip_optional;
1420    }
1421    if (!_PyEval_SliceIndexNotNone(args[1], &b)) {
1422        goto exit;
1423    }
1424    if (nargs < 3) {
1425        goto skip_optional;
1426    }
1427    if (!_PyEval_SliceIndex(args[2], &c)) {
1428        goto exit;
1429    }
1430skip_optional:
1431    return_value = test_slice_index_converter_impl(module, a, b, c);
1432
1433exit:
1434    return return_value;
1435}
1436
1437static PyObject *
1438test_slice_index_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
1439                                Py_ssize_t c)
1440/*[clinic end generated code: output=67506ed999361212 input=edeadb0ee126f531]*/
1441
1442
1443/*[clinic input]
1444test_size_t_converter
1445
1446    a: size_t = 12
1447    /
1448
1449[clinic start generated code]*/
1450
1451PyDoc_STRVAR(test_size_t_converter__doc__,
1452"test_size_t_converter($module, a=12, /)\n"
1453"--\n"
1454"\n");
1455
1456#define TEST_SIZE_T_CONVERTER_METHODDEF    \
1457    {"test_size_t_converter", _PyCFunction_CAST(test_size_t_converter), METH_FASTCALL, test_size_t_converter__doc__},
1458
1459static PyObject *
1460test_size_t_converter_impl(PyObject *module, size_t a);
1461
1462static PyObject *
1463test_size_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1464{
1465    PyObject *return_value = NULL;
1466    size_t a = 12;
1467
1468    if (!_PyArg_CheckPositional("test_size_t_converter", nargs, 0, 1)) {
1469        goto exit;
1470    }
1471    if (nargs < 1) {
1472        goto skip_optional;
1473    }
1474    if (!_PyLong_Size_t_Converter(args[0], &a)) {
1475        goto exit;
1476    }
1477skip_optional:
1478    return_value = test_size_t_converter_impl(module, a);
1479
1480exit:
1481    return return_value;
1482}
1483
1484static PyObject *
1485test_size_t_converter_impl(PyObject *module, size_t a)
1486/*[clinic end generated code: output=1653ecb5cbf775aa input=52e93a0fed0f1fb3]*/
1487
1488
1489/*[clinic input]
1490test_float_converter
1491
1492    a: float = 12.5
1493    /
1494
1495[clinic start generated code]*/
1496
1497PyDoc_STRVAR(test_float_converter__doc__,
1498"test_float_converter($module, a=12.5, /)\n"
1499"--\n"
1500"\n");
1501
1502#define TEST_FLOAT_CONVERTER_METHODDEF    \
1503    {"test_float_converter", _PyCFunction_CAST(test_float_converter), METH_FASTCALL, test_float_converter__doc__},
1504
1505static PyObject *
1506test_float_converter_impl(PyObject *module, float a);
1507
1508static PyObject *
1509test_float_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1510{
1511    PyObject *return_value = NULL;
1512    float a = 12.5;
1513
1514    if (!_PyArg_CheckPositional("test_float_converter", nargs, 0, 1)) {
1515        goto exit;
1516    }
1517    if (nargs < 1) {
1518        goto skip_optional;
1519    }
1520    if (PyFloat_CheckExact(args[0])) {
1521        a = (float) (PyFloat_AS_DOUBLE(args[0]));
1522    }
1523    else
1524    {
1525        a = (float) PyFloat_AsDouble(args[0]);
1526        if (a == -1.0 && PyErr_Occurred()) {
1527            goto exit;
1528        }
1529    }
1530skip_optional:
1531    return_value = test_float_converter_impl(module, a);
1532
1533exit:
1534    return return_value;
1535}
1536
1537static PyObject *
1538test_float_converter_impl(PyObject *module, float a)
1539/*[clinic end generated code: output=36ad006990a8a91e input=259c0d98eca35034]*/
1540
1541
1542/*[clinic input]
1543test_double_converter
1544
1545    a: double = 12.5
1546    /
1547
1548[clinic start generated code]*/
1549
1550PyDoc_STRVAR(test_double_converter__doc__,
1551"test_double_converter($module, a=12.5, /)\n"
1552"--\n"
1553"\n");
1554
1555#define TEST_DOUBLE_CONVERTER_METHODDEF    \
1556    {"test_double_converter", _PyCFunction_CAST(test_double_converter), METH_FASTCALL, test_double_converter__doc__},
1557
1558static PyObject *
1559test_double_converter_impl(PyObject *module, double a);
1560
1561static PyObject *
1562test_double_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1563{
1564    PyObject *return_value = NULL;
1565    double a = 12.5;
1566
1567    if (!_PyArg_CheckPositional("test_double_converter", nargs, 0, 1)) {
1568        goto exit;
1569    }
1570    if (nargs < 1) {
1571        goto skip_optional;
1572    }
1573    if (PyFloat_CheckExact(args[0])) {
1574        a = PyFloat_AS_DOUBLE(args[0]);
1575    }
1576    else
1577    {
1578        a = PyFloat_AsDouble(args[0]);
1579        if (a == -1.0 && PyErr_Occurred()) {
1580            goto exit;
1581        }
1582    }
1583skip_optional:
1584    return_value = test_double_converter_impl(module, a);
1585
1586exit:
1587    return return_value;
1588}
1589
1590static PyObject *
1591test_double_converter_impl(PyObject *module, double a)
1592/*[clinic end generated code: output=7435925592bac795 input=c6a9945706a41c27]*/
1593
1594
1595/*[clinic input]
1596test_Py_complex_converter
1597
1598    a: Py_complex
1599    /
1600
1601[clinic start generated code]*/
1602
1603PyDoc_STRVAR(test_Py_complex_converter__doc__,
1604"test_Py_complex_converter($module, a, /)\n"
1605"--\n"
1606"\n");
1607
1608#define TEST_PY_COMPLEX_CONVERTER_METHODDEF    \
1609    {"test_Py_complex_converter", (PyCFunction)test_Py_complex_converter, METH_O, test_Py_complex_converter__doc__},
1610
1611static PyObject *
1612test_Py_complex_converter_impl(PyObject *module, Py_complex a);
1613
1614static PyObject *
1615test_Py_complex_converter(PyObject *module, PyObject *arg)
1616{
1617    PyObject *return_value = NULL;
1618    Py_complex a;
1619
1620    a = PyComplex_AsCComplex(arg);
1621    if (PyErr_Occurred()) {
1622        goto exit;
1623    }
1624    return_value = test_Py_complex_converter_impl(module, a);
1625
1626exit:
1627    return return_value;
1628}
1629
1630static PyObject *
1631test_Py_complex_converter_impl(PyObject *module, Py_complex a)
1632/*[clinic end generated code: output=c2ecbec2144ca540 input=070f216a515beb79]*/
1633
1634
1635/*[clinic input]
1636test_str_converter
1637
1638    a: str = NULL
1639    b: str = "ab"
1640    c: str(accept={str}) = "cd"
1641    d: str(accept={robuffer}) = "cef"
1642    e: str(accept={str, NoneType}) = "gh"
1643    f: str(accept={robuffer}, zeroes=True) = "ij"
1644    g: str(accept={robuffer, str}, zeroes=True) = "kl"
1645    h: str(accept={robuffer, str, NoneType}, zeroes=True) = "mn"
1646    /
1647
1648[clinic start generated code]*/
1649
1650PyDoc_STRVAR(test_str_converter__doc__,
1651"test_str_converter($module, a=<unrepresentable>, b=\'ab\', c=\'cd\',\n"
1652"                   d=\'cef\', e=\'gh\', f=\'ij\', g=\'kl\', h=\'mn\', /)\n"
1653"--\n"
1654"\n");
1655
1656#define TEST_STR_CONVERTER_METHODDEF    \
1657    {"test_str_converter", _PyCFunction_CAST(test_str_converter), METH_FASTCALL, test_str_converter__doc__},
1658
1659static PyObject *
1660test_str_converter_impl(PyObject *module, const char *a, const char *b,
1661                        const char *c, const char *d, const char *e,
1662                        const char *f, Py_ssize_t f_length, const char *g,
1663                        Py_ssize_t g_length, const char *h,
1664                        Py_ssize_t h_length);
1665
1666static PyObject *
1667test_str_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1668{
1669    PyObject *return_value = NULL;
1670    const char *a = NULL;
1671    const char *b = "ab";
1672    const char *c = "cd";
1673    const char *d = "cef";
1674    const char *e = "gh";
1675    const char *f = "ij";
1676    Py_ssize_t f_length;
1677    const char *g = "kl";
1678    Py_ssize_t g_length;
1679    const char *h = "mn";
1680    Py_ssize_t h_length;
1681
1682    if (!_PyArg_ParseStack(args, nargs, "|sssyzy#s#z#:test_str_converter",
1683        &a, &b, &c, &d, &e, &f, &f_length, &g, &g_length, &h, &h_length)) {
1684        goto exit;
1685    }
1686    return_value = test_str_converter_impl(module, a, b, c, d, e, f, f_length, g, g_length, h, h_length);
1687
1688exit:
1689    return return_value;
1690}
1691
1692static PyObject *
1693test_str_converter_impl(PyObject *module, const char *a, const char *b,
1694                        const char *c, const char *d, const char *e,
1695                        const char *f, Py_ssize_t f_length, const char *g,
1696                        Py_ssize_t g_length, const char *h,
1697                        Py_ssize_t h_length)
1698/*[clinic end generated code: output=82cb06d5237ef062 input=8afe9da8185cd38c]*/
1699
1700
1701/*[clinic input]
1702test_str_converter_encoding
1703
1704    a: str(encoding="idna")
1705    b: str(encoding="idna", accept={str})
1706    c: str(encoding="idna", accept={bytes, bytearray, str})
1707    d: str(encoding="idna", zeroes=True)
1708    e: str(encoding="idna", accept={bytes, bytearray, str}, zeroes=True)
1709    /
1710
1711[clinic start generated code]*/
1712
1713PyDoc_STRVAR(test_str_converter_encoding__doc__,
1714"test_str_converter_encoding($module, a, b, c, d, e, /)\n"
1715"--\n"
1716"\n");
1717
1718#define TEST_STR_CONVERTER_ENCODING_METHODDEF    \
1719    {"test_str_converter_encoding", _PyCFunction_CAST(test_str_converter_encoding), METH_FASTCALL, test_str_converter_encoding__doc__},
1720
1721static PyObject *
1722test_str_converter_encoding_impl(PyObject *module, char *a, char *b, char *c,
1723                                 char *d, Py_ssize_t d_length, char *e,
1724                                 Py_ssize_t e_length);
1725
1726static PyObject *
1727test_str_converter_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1728{
1729    PyObject *return_value = NULL;
1730    char *a = NULL;
1731    char *b = NULL;
1732    char *c = NULL;
1733    char *d = NULL;
1734    Py_ssize_t d_length;
1735    char *e = NULL;
1736    Py_ssize_t e_length;
1737
1738    if (!_PyArg_ParseStack(args, nargs, "esesetes#et#:test_str_converter_encoding",
1739        "idna", &a, "idna", &b, "idna", &c, "idna", &d, &d_length, "idna", &e, &e_length)) {
1740        goto exit;
1741    }
1742    return_value = test_str_converter_encoding_impl(module, a, b, c, d, d_length, e, e_length);
1743    /* Post parse cleanup for a */
1744    PyMem_FREE(a);
1745    /* Post parse cleanup for b */
1746    PyMem_FREE(b);
1747    /* Post parse cleanup for c */
1748    PyMem_FREE(c);
1749    /* Post parse cleanup for d */
1750    PyMem_FREE(d);
1751    /* Post parse cleanup for e */
1752    PyMem_FREE(e);
1753
1754exit:
1755    return return_value;
1756}
1757
1758static PyObject *
1759test_str_converter_encoding_impl(PyObject *module, char *a, char *b, char *c,
1760                                 char *d, Py_ssize_t d_length, char *e,
1761                                 Py_ssize_t e_length)
1762/*[clinic end generated code: output=999c1deecfa15b0a input=eb4c38e1f898f402]*/
1763
1764
1765/*[clinic input]
1766test_Py_UNICODE_converter
1767
1768    a: Py_UNICODE
1769    b: Py_UNICODE(accept={str})
1770    c: Py_UNICODE(accept={str, NoneType})
1771    d: Py_UNICODE(zeroes=True)
1772    e: Py_UNICODE(accept={str, NoneType}, zeroes=True)
1773    /
1774
1775[clinic start generated code]*/
1776
1777PyDoc_STRVAR(test_Py_UNICODE_converter__doc__,
1778"test_Py_UNICODE_converter($module, a, b, c, d, e, /)\n"
1779"--\n"
1780"\n");
1781
1782#define TEST_PY_UNICODE_CONVERTER_METHODDEF    \
1783    {"test_Py_UNICODE_converter", _PyCFunction_CAST(test_Py_UNICODE_converter), METH_FASTCALL, test_Py_UNICODE_converter__doc__},
1784
1785static PyObject *
1786test_Py_UNICODE_converter_impl(PyObject *module, const Py_UNICODE *a,
1787                               const Py_UNICODE *b, const Py_UNICODE *c,
1788                               const Py_UNICODE *d, Py_ssize_t d_length,
1789                               const Py_UNICODE *e, Py_ssize_t e_length);
1790
1791static PyObject *
1792test_Py_UNICODE_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1793{
1794    PyObject *return_value = NULL;
1795    const Py_UNICODE *a = NULL;
1796    const Py_UNICODE *b = NULL;
1797    const Py_UNICODE *c = NULL;
1798    const Py_UNICODE *d = NULL;
1799    Py_ssize_t d_length;
1800    const Py_UNICODE *e = NULL;
1801    Py_ssize_t e_length;
1802
1803    if (!_PyArg_ParseStack(args, nargs, "O&O&O&u#Z#:test_Py_UNICODE_converter",
1804        _PyUnicode_WideCharString_Converter, &a, _PyUnicode_WideCharString_Converter, &b, _PyUnicode_WideCharString_Opt_Converter, &c, &d, &d_length, &e, &e_length)) {
1805        goto exit;
1806    }
1807    return_value = test_Py_UNICODE_converter_impl(module, a, b, c, d, d_length, e, e_length);
1808
1809exit:
1810    /* Cleanup for a */
1811    #if !USE_UNICODE_WCHAR_CACHE
1812    PyMem_Free((void *)a);
1813    #endif /* USE_UNICODE_WCHAR_CACHE */
1814    /* Cleanup for b */
1815    #if !USE_UNICODE_WCHAR_CACHE
1816    PyMem_Free((void *)b);
1817    #endif /* USE_UNICODE_WCHAR_CACHE */
1818    /* Cleanup for c */
1819    #if !USE_UNICODE_WCHAR_CACHE
1820    PyMem_Free((void *)c);
1821    #endif /* USE_UNICODE_WCHAR_CACHE */
1822
1823    return return_value;
1824}
1825
1826static PyObject *
1827test_Py_UNICODE_converter_impl(PyObject *module, const Py_UNICODE *a,
1828                               const Py_UNICODE *b, const Py_UNICODE *c,
1829                               const Py_UNICODE *d, Py_ssize_t d_length,
1830                               const Py_UNICODE *e, Py_ssize_t e_length)
1831/*[clinic end generated code: output=9d41b3a38a0f6f2f input=064a3b68ad7f04b0]*/
1832
1833
1834/*[clinic input]
1835test_Py_buffer_converter
1836
1837    a: Py_buffer
1838    b: Py_buffer(accept={buffer})
1839    c: Py_buffer(accept={str, buffer})
1840    d: Py_buffer(accept={str, buffer, NoneType})
1841    e: Py_buffer(accept={rwbuffer})
1842    /
1843
1844[clinic start generated code]*/
1845
1846PyDoc_STRVAR(test_Py_buffer_converter__doc__,
1847"test_Py_buffer_converter($module, a, b, c, d, e, /)\n"
1848"--\n"
1849"\n");
1850
1851#define TEST_PY_BUFFER_CONVERTER_METHODDEF    \
1852    {"test_Py_buffer_converter", _PyCFunction_CAST(test_Py_buffer_converter), METH_FASTCALL, test_Py_buffer_converter__doc__},
1853
1854static PyObject *
1855test_Py_buffer_converter_impl(PyObject *module, Py_buffer *a, Py_buffer *b,
1856                              Py_buffer *c, Py_buffer *d, Py_buffer *e);
1857
1858static PyObject *
1859test_Py_buffer_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1860{
1861    PyObject *return_value = NULL;
1862    Py_buffer a = {NULL, NULL};
1863    Py_buffer b = {NULL, NULL};
1864    Py_buffer c = {NULL, NULL};
1865    Py_buffer d = {NULL, NULL};
1866    Py_buffer e = {NULL, NULL};
1867
1868    if (!_PyArg_ParseStack(args, nargs, "y*y*s*z*w*:test_Py_buffer_converter",
1869        &a, &b, &c, &d, &e)) {
1870        goto exit;
1871    }
1872    return_value = test_Py_buffer_converter_impl(module, &a, &b, &c, &d, &e);
1873
1874exit:
1875    /* Cleanup for a */
1876    if (a.obj) {
1877       PyBuffer_Release(&a);
1878    }
1879    /* Cleanup for b */
1880    if (b.obj) {
1881       PyBuffer_Release(&b);
1882    }
1883    /* Cleanup for c */
1884    if (c.obj) {
1885       PyBuffer_Release(&c);
1886    }
1887    /* Cleanup for d */
1888    if (d.obj) {
1889       PyBuffer_Release(&d);
1890    }
1891    /* Cleanup for e */
1892    if (e.obj) {
1893       PyBuffer_Release(&e);
1894    }
1895
1896    return return_value;
1897}
1898
1899static PyObject *
1900test_Py_buffer_converter_impl(PyObject *module, Py_buffer *a, Py_buffer *b,
1901                              Py_buffer *c, Py_buffer *d, Py_buffer *e)
1902/*[clinic end generated code: output=a153b71b4f45f952 input=6a9da0f56f9525fd]*/
1903
1904
1905/*[clinic input]
1906test_keywords
1907
1908    a: object
1909    b: object
1910
1911[clinic start generated code]*/
1912
1913PyDoc_STRVAR(test_keywords__doc__,
1914"test_keywords($module, /, a, b)\n"
1915"--\n"
1916"\n");
1917
1918#define TEST_KEYWORDS_METHODDEF    \
1919    {"test_keywords", _PyCFunction_CAST(test_keywords), METH_FASTCALL|METH_KEYWORDS, test_keywords__doc__},
1920
1921static PyObject *
1922test_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
1923
1924static PyObject *
1925test_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1926{
1927    PyObject *return_value = NULL;
1928    static const char * const _keywords[] = {"a", "b", NULL};
1929    static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords", 0};
1930    PyObject *argsbuf[2];
1931    PyObject *a;
1932    PyObject *b;
1933
1934    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
1935    if (!args) {
1936        goto exit;
1937    }
1938    a = args[0];
1939    b = args[1];
1940    return_value = test_keywords_impl(module, a, b);
1941
1942exit:
1943    return return_value;
1944}
1945
1946static PyObject *
1947test_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
1948/*[clinic end generated code: output=c03a52cfca192d3b input=0d3484844749c05b]*/
1949
1950
1951/*[clinic input]
1952test_keywords_kwonly
1953
1954    a: object
1955    *
1956    b: object
1957
1958[clinic start generated code]*/
1959
1960PyDoc_STRVAR(test_keywords_kwonly__doc__,
1961"test_keywords_kwonly($module, /, a, *, b)\n"
1962"--\n"
1963"\n");
1964
1965#define TEST_KEYWORDS_KWONLY_METHODDEF    \
1966    {"test_keywords_kwonly", _PyCFunction_CAST(test_keywords_kwonly), METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly__doc__},
1967
1968static PyObject *
1969test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b);
1970
1971static PyObject *
1972test_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1973{
1974    PyObject *return_value = NULL;
1975    static const char * const _keywords[] = {"a", "b", NULL};
1976    static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly", 0};
1977    PyObject *argsbuf[2];
1978    PyObject *a;
1979    PyObject *b;
1980
1981    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
1982    if (!args) {
1983        goto exit;
1984    }
1985    a = args[0];
1986    b = args[1];
1987    return_value = test_keywords_kwonly_impl(module, a, b);
1988
1989exit:
1990    return return_value;
1991}
1992
1993static PyObject *
1994test_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b)
1995/*[clinic end generated code: output=4704adcb6c7df928 input=384adc78bfa0bff7]*/
1996
1997
1998/*[clinic input]
1999test_keywords_opt
2000
2001    a: object
2002    b: object = None
2003    c: object = None
2004
2005[clinic start generated code]*/
2006
2007PyDoc_STRVAR(test_keywords_opt__doc__,
2008"test_keywords_opt($module, /, a, b=None, c=None)\n"
2009"--\n"
2010"\n");
2011
2012#define TEST_KEYWORDS_OPT_METHODDEF    \
2013    {"test_keywords_opt", _PyCFunction_CAST(test_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_keywords_opt__doc__},
2014
2015static PyObject *
2016test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2017                       PyObject *c);
2018
2019static PyObject *
2020test_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2021{
2022    PyObject *return_value = NULL;
2023    static const char * const _keywords[] = {"a", "b", "c", NULL};
2024    static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt", 0};
2025    PyObject *argsbuf[3];
2026    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2027    PyObject *a;
2028    PyObject *b = Py_None;
2029    PyObject *c = Py_None;
2030
2031    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
2032    if (!args) {
2033        goto exit;
2034    }
2035    a = args[0];
2036    if (!noptargs) {
2037        goto skip_optional_pos;
2038    }
2039    if (args[1]) {
2040        b = args[1];
2041        if (!--noptargs) {
2042            goto skip_optional_pos;
2043        }
2044    }
2045    c = args[2];
2046skip_optional_pos:
2047    return_value = test_keywords_opt_impl(module, a, b, c);
2048
2049exit:
2050    return return_value;
2051}
2052
2053static PyObject *
2054test_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2055                       PyObject *c)
2056/*[clinic end generated code: output=de3ee1039da35fa1 input=eda7964f784f4607]*/
2057
2058
2059/*[clinic input]
2060test_keywords_opt_kwonly
2061
2062    a: object
2063    b: object = None
2064    *
2065    c: object = None
2066    d: object = None
2067
2068[clinic start generated code]*/
2069
2070PyDoc_STRVAR(test_keywords_opt_kwonly__doc__,
2071"test_keywords_opt_kwonly($module, /, a, b=None, *, c=None, d=None)\n"
2072"--\n"
2073"\n");
2074
2075#define TEST_KEYWORDS_OPT_KWONLY_METHODDEF    \
2076    {"test_keywords_opt_kwonly", _PyCFunction_CAST(test_keywords_opt_kwonly), METH_FASTCALL|METH_KEYWORDS, test_keywords_opt_kwonly__doc__},
2077
2078static PyObject *
2079test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
2080                              PyObject *c, PyObject *d);
2081
2082static PyObject *
2083test_keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2084{
2085    PyObject *return_value = NULL;
2086    static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
2087    static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_opt_kwonly", 0};
2088    PyObject *argsbuf[4];
2089    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2090    PyObject *a;
2091    PyObject *b = Py_None;
2092    PyObject *c = Py_None;
2093    PyObject *d = Py_None;
2094
2095    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
2096    if (!args) {
2097        goto exit;
2098    }
2099    a = args[0];
2100    if (!noptargs) {
2101        goto skip_optional_pos;
2102    }
2103    if (args[1]) {
2104        b = args[1];
2105        if (!--noptargs) {
2106            goto skip_optional_pos;
2107        }
2108    }
2109skip_optional_pos:
2110    if (!noptargs) {
2111        goto skip_optional_kwonly;
2112    }
2113    if (args[2]) {
2114        c = args[2];
2115        if (!--noptargs) {
2116            goto skip_optional_kwonly;
2117        }
2118    }
2119    d = args[3];
2120skip_optional_kwonly:
2121    return_value = test_keywords_opt_kwonly_impl(module, a, b, c, d);
2122
2123exit:
2124    return return_value;
2125}
2126
2127static PyObject *
2128test_keywords_opt_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
2129                              PyObject *c, PyObject *d)
2130/*[clinic end generated code: output=996394678586854e input=209387a4815e5082]*/
2131
2132
2133/*[clinic input]
2134test_keywords_kwonly_opt
2135
2136    a: object
2137    *
2138    b: object = None
2139    c: object = None
2140
2141[clinic start generated code]*/
2142
2143PyDoc_STRVAR(test_keywords_kwonly_opt__doc__,
2144"test_keywords_kwonly_opt($module, /, a, *, b=None, c=None)\n"
2145"--\n"
2146"\n");
2147
2148#define TEST_KEYWORDS_KWONLY_OPT_METHODDEF    \
2149    {"test_keywords_kwonly_opt", _PyCFunction_CAST(test_keywords_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_keywords_kwonly_opt__doc__},
2150
2151static PyObject *
2152test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2153                              PyObject *c);
2154
2155static PyObject *
2156test_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2157{
2158    PyObject *return_value = NULL;
2159    static const char * const _keywords[] = {"a", "b", "c", NULL};
2160    static _PyArg_Parser _parser = {NULL, _keywords, "test_keywords_kwonly_opt", 0};
2161    PyObject *argsbuf[3];
2162    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2163    PyObject *a;
2164    PyObject *b = Py_None;
2165    PyObject *c = Py_None;
2166
2167    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
2168    if (!args) {
2169        goto exit;
2170    }
2171    a = args[0];
2172    if (!noptargs) {
2173        goto skip_optional_kwonly;
2174    }
2175    if (args[1]) {
2176        b = args[1];
2177        if (!--noptargs) {
2178            goto skip_optional_kwonly;
2179        }
2180    }
2181    c = args[2];
2182skip_optional_kwonly:
2183    return_value = test_keywords_kwonly_opt_impl(module, a, b, c);
2184
2185exit:
2186    return return_value;
2187}
2188
2189static PyObject *
2190test_keywords_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2191                              PyObject *c)
2192/*[clinic end generated code: output=4ea9947a903a2f24 input=18393cc64fa000f4]*/
2193
2194
2195/*[clinic input]
2196test_posonly_keywords
2197
2198    a: object
2199    /
2200    b: object
2201
2202[clinic start generated code]*/
2203
2204PyDoc_STRVAR(test_posonly_keywords__doc__,
2205"test_posonly_keywords($module, a, /, b)\n"
2206"--\n"
2207"\n");
2208
2209#define TEST_POSONLY_KEYWORDS_METHODDEF    \
2210    {"test_posonly_keywords", _PyCFunction_CAST(test_posonly_keywords), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords__doc__},
2211
2212static PyObject *
2213test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b);
2214
2215static PyObject *
2216test_posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2217{
2218    PyObject *return_value = NULL;
2219    static const char * const _keywords[] = {"", "b", NULL};
2220    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords", 0};
2221    PyObject *argsbuf[2];
2222    PyObject *a;
2223    PyObject *b;
2224
2225    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
2226    if (!args) {
2227        goto exit;
2228    }
2229    a = args[0];
2230    b = args[1];
2231    return_value = test_posonly_keywords_impl(module, a, b);
2232
2233exit:
2234    return return_value;
2235}
2236
2237static PyObject *
2238test_posonly_keywords_impl(PyObject *module, PyObject *a, PyObject *b)
2239/*[clinic end generated code: output=478aad346a188a80 input=1767b0ebdf06060e]*/
2240
2241
2242/*[clinic input]
2243test_posonly_kwonly
2244
2245    a: object
2246    /
2247    *
2248    c: object
2249
2250[clinic start generated code]*/
2251
2252PyDoc_STRVAR(test_posonly_kwonly__doc__,
2253"test_posonly_kwonly($module, a, /, *, c)\n"
2254"--\n"
2255"\n");
2256
2257#define TEST_POSONLY_KWONLY_METHODDEF    \
2258    {"test_posonly_kwonly", _PyCFunction_CAST(test_posonly_kwonly), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly__doc__},
2259
2260static PyObject *
2261test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c);
2262
2263static PyObject *
2264test_posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2265{
2266    PyObject *return_value = NULL;
2267    static const char * const _keywords[] = {"", "c", NULL};
2268    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly", 0};
2269    PyObject *argsbuf[2];
2270    PyObject *a;
2271    PyObject *c;
2272
2273    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
2274    if (!args) {
2275        goto exit;
2276    }
2277    a = args[0];
2278    c = args[1];
2279    return_value = test_posonly_kwonly_impl(module, a, c);
2280
2281exit:
2282    return return_value;
2283}
2284
2285static PyObject *
2286test_posonly_kwonly_impl(PyObject *module, PyObject *a, PyObject *c)
2287/*[clinic end generated code: output=d747975a0b28e9c2 input=9042f2818f664839]*/
2288
2289
2290/*[clinic input]
2291test_posonly_keywords_kwonly
2292
2293    a: object
2294    /
2295    b: object
2296    *
2297    c: object
2298
2299[clinic start generated code]*/
2300
2301PyDoc_STRVAR(test_posonly_keywords_kwonly__doc__,
2302"test_posonly_keywords_kwonly($module, a, /, b, *, c)\n"
2303"--\n"
2304"\n");
2305
2306#define TEST_POSONLY_KEYWORDS_KWONLY_METHODDEF    \
2307    {"test_posonly_keywords_kwonly", _PyCFunction_CAST(test_posonly_keywords_kwonly), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly__doc__},
2308
2309static PyObject *
2310test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
2311                                  PyObject *c);
2312
2313static PyObject *
2314test_posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2315{
2316    PyObject *return_value = NULL;
2317    static const char * const _keywords[] = {"", "b", "c", NULL};
2318    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly", 0};
2319    PyObject *argsbuf[3];
2320    PyObject *a;
2321    PyObject *b;
2322    PyObject *c;
2323
2324    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
2325    if (!args) {
2326        goto exit;
2327    }
2328    a = args[0];
2329    b = args[1];
2330    c = args[2];
2331    return_value = test_posonly_keywords_kwonly_impl(module, a, b, c);
2332
2333exit:
2334    return return_value;
2335}
2336
2337static PyObject *
2338test_posonly_keywords_kwonly_impl(PyObject *module, PyObject *a, PyObject *b,
2339                                  PyObject *c)
2340/*[clinic end generated code: output=5b99f692f8ddaa4a input=29546ebdca492fea]*/
2341
2342
2343/*[clinic input]
2344test_posonly_keywords_opt
2345
2346    a: object
2347    /
2348    b: object
2349    c: object = None
2350    d: object = None
2351
2352[clinic start generated code]*/
2353
2354PyDoc_STRVAR(test_posonly_keywords_opt__doc__,
2355"test_posonly_keywords_opt($module, a, /, b, c=None, d=None)\n"
2356"--\n"
2357"\n");
2358
2359#define TEST_POSONLY_KEYWORDS_OPT_METHODDEF    \
2360    {"test_posonly_keywords_opt", _PyCFunction_CAST(test_posonly_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt__doc__},
2361
2362static PyObject *
2363test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2364                               PyObject *c, PyObject *d);
2365
2366static PyObject *
2367test_posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2368{
2369    PyObject *return_value = NULL;
2370    static const char * const _keywords[] = {"", "b", "c", "d", NULL};
2371    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt", 0};
2372    PyObject *argsbuf[4];
2373    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
2374    PyObject *a;
2375    PyObject *b;
2376    PyObject *c = Py_None;
2377    PyObject *d = Py_None;
2378
2379    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf);
2380    if (!args) {
2381        goto exit;
2382    }
2383    a = args[0];
2384    b = args[1];
2385    if (!noptargs) {
2386        goto skip_optional_pos;
2387    }
2388    if (args[2]) {
2389        c = args[2];
2390        if (!--noptargs) {
2391            goto skip_optional_pos;
2392        }
2393    }
2394    d = args[3];
2395skip_optional_pos:
2396    return_value = test_posonly_keywords_opt_impl(module, a, b, c, d);
2397
2398exit:
2399    return return_value;
2400}
2401
2402static PyObject *
2403test_posonly_keywords_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2404                               PyObject *c, PyObject *d)
2405/*[clinic end generated code: output=fd5dfbac5727aebb input=cdf5a9625e554e9b]*/
2406
2407
2408/*[clinic input]
2409test_posonly_keywords_opt2
2410
2411    a: object
2412    /
2413    b: object = None
2414    c: object = None
2415
2416[clinic start generated code]*/
2417
2418PyDoc_STRVAR(test_posonly_keywords_opt2__doc__,
2419"test_posonly_keywords_opt2($module, a, /, b=None, c=None)\n"
2420"--\n"
2421"\n");
2422
2423#define TEST_POSONLY_KEYWORDS_OPT2_METHODDEF    \
2424    {"test_posonly_keywords_opt2", _PyCFunction_CAST(test_posonly_keywords_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2__doc__},
2425
2426static PyObject *
2427test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
2428                                PyObject *c);
2429
2430static PyObject *
2431test_posonly_keywords_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2432{
2433    PyObject *return_value = NULL;
2434    static const char * const _keywords[] = {"", "b", "c", NULL};
2435    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2", 0};
2436    PyObject *argsbuf[3];
2437    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2438    PyObject *a;
2439    PyObject *b = Py_None;
2440    PyObject *c = Py_None;
2441
2442    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
2443    if (!args) {
2444        goto exit;
2445    }
2446    a = args[0];
2447    if (!noptargs) {
2448        goto skip_optional_pos;
2449    }
2450    if (args[1]) {
2451        b = args[1];
2452        if (!--noptargs) {
2453            goto skip_optional_pos;
2454        }
2455    }
2456    c = args[2];
2457skip_optional_pos:
2458    return_value = test_posonly_keywords_opt2_impl(module, a, b, c);
2459
2460exit:
2461    return return_value;
2462}
2463
2464static PyObject *
2465test_posonly_keywords_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
2466                                PyObject *c)
2467/*[clinic end generated code: output=777f58ac70775420 input=1581299d21d16f14]*/
2468
2469
2470/*[clinic input]
2471test_posonly_opt_keywords_opt
2472
2473    a: object
2474    b: object = None
2475    /
2476    c: object = None
2477    d: object = None
2478
2479[clinic start generated code]*/
2480
2481PyDoc_STRVAR(test_posonly_opt_keywords_opt__doc__,
2482"test_posonly_opt_keywords_opt($module, a, b=None, /, c=None, d=None)\n"
2483"--\n"
2484"\n");
2485
2486#define TEST_POSONLY_OPT_KEYWORDS_OPT_METHODDEF    \
2487    {"test_posonly_opt_keywords_opt", _PyCFunction_CAST(test_posonly_opt_keywords_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt__doc__},
2488
2489static PyObject *
2490test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
2491                                   PyObject *b, PyObject *c, PyObject *d);
2492
2493static PyObject *
2494test_posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2495{
2496    PyObject *return_value = NULL;
2497    static const char * const _keywords[] = {"", "", "c", "d", NULL};
2498    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt", 0};
2499    PyObject *argsbuf[4];
2500    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2501    PyObject *a;
2502    PyObject *b = Py_None;
2503    PyObject *c = Py_None;
2504    PyObject *d = Py_None;
2505
2506    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
2507    if (!args) {
2508        goto exit;
2509    }
2510    a = args[0];
2511    if (nargs < 2) {
2512        goto skip_optional_posonly;
2513    }
2514    noptargs--;
2515    b = args[1];
2516skip_optional_posonly:
2517    if (!noptargs) {
2518        goto skip_optional_pos;
2519    }
2520    if (args[2]) {
2521        c = args[2];
2522        if (!--noptargs) {
2523            goto skip_optional_pos;
2524        }
2525    }
2526    d = args[3];
2527skip_optional_pos:
2528    return_value = test_posonly_opt_keywords_opt_impl(module, a, b, c, d);
2529
2530exit:
2531    return return_value;
2532}
2533
2534static PyObject *
2535test_posonly_opt_keywords_opt_impl(PyObject *module, PyObject *a,
2536                                   PyObject *b, PyObject *c, PyObject *d)
2537/*[clinic end generated code: output=2c18b8edff78ed22 input=408798ec3d42949f]*/
2538
2539
2540/*[clinic input]
2541test_posonly_kwonly_opt
2542
2543    a: object
2544    /
2545    *
2546    b: object
2547    c: object = None
2548    d: object = None
2549
2550[clinic start generated code]*/
2551
2552PyDoc_STRVAR(test_posonly_kwonly_opt__doc__,
2553"test_posonly_kwonly_opt($module, a, /, *, b, c=None, d=None)\n"
2554"--\n"
2555"\n");
2556
2557#define TEST_POSONLY_KWONLY_OPT_METHODDEF    \
2558    {"test_posonly_kwonly_opt", _PyCFunction_CAST(test_posonly_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt__doc__},
2559
2560static PyObject *
2561test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2562                             PyObject *c, PyObject *d);
2563
2564static PyObject *
2565test_posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2566{
2567    PyObject *return_value = NULL;
2568    static const char * const _keywords[] = {"", "b", "c", "d", NULL};
2569    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt", 0};
2570    PyObject *argsbuf[4];
2571    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
2572    PyObject *a;
2573    PyObject *b;
2574    PyObject *c = Py_None;
2575    PyObject *d = Py_None;
2576
2577    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
2578    if (!args) {
2579        goto exit;
2580    }
2581    a = args[0];
2582    b = args[1];
2583    if (!noptargs) {
2584        goto skip_optional_kwonly;
2585    }
2586    if (args[2]) {
2587        c = args[2];
2588        if (!--noptargs) {
2589            goto skip_optional_kwonly;
2590        }
2591    }
2592    d = args[3];
2593skip_optional_kwonly:
2594    return_value = test_posonly_kwonly_opt_impl(module, a, b, c, d);
2595
2596exit:
2597    return return_value;
2598}
2599
2600static PyObject *
2601test_posonly_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2602                             PyObject *c, PyObject *d)
2603/*[clinic end generated code: output=8db9ab5602e1efaf input=8d8e5643bbbc2309]*/
2604
2605
2606/*[clinic input]
2607test_posonly_kwonly_opt2
2608
2609    a: object
2610    /
2611    *
2612    b: object = None
2613    c: object = None
2614
2615[clinic start generated code]*/
2616
2617PyDoc_STRVAR(test_posonly_kwonly_opt2__doc__,
2618"test_posonly_kwonly_opt2($module, a, /, *, b=None, c=None)\n"
2619"--\n"
2620"\n");
2621
2622#define TEST_POSONLY_KWONLY_OPT2_METHODDEF    \
2623    {"test_posonly_kwonly_opt2", _PyCFunction_CAST(test_posonly_kwonly_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_kwonly_opt2__doc__},
2624
2625static PyObject *
2626test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
2627                              PyObject *c);
2628
2629static PyObject *
2630test_posonly_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2631{
2632    PyObject *return_value = NULL;
2633    static const char * const _keywords[] = {"", "b", "c", NULL};
2634    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_kwonly_opt2", 0};
2635    PyObject *argsbuf[3];
2636    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2637    PyObject *a;
2638    PyObject *b = Py_None;
2639    PyObject *c = Py_None;
2640
2641    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
2642    if (!args) {
2643        goto exit;
2644    }
2645    a = args[0];
2646    if (!noptargs) {
2647        goto skip_optional_kwonly;
2648    }
2649    if (args[1]) {
2650        b = args[1];
2651        if (!--noptargs) {
2652            goto skip_optional_kwonly;
2653        }
2654    }
2655    c = args[2];
2656skip_optional_kwonly:
2657    return_value = test_posonly_kwonly_opt2_impl(module, a, b, c);
2658
2659exit:
2660    return return_value;
2661}
2662
2663static PyObject *
2664test_posonly_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *b,
2665                              PyObject *c)
2666/*[clinic end generated code: output=6cfe546265d85d2c input=f7e5eed94f75fff0]*/
2667
2668
2669/*[clinic input]
2670test_posonly_opt_kwonly_opt
2671
2672    a: object
2673    b: object = None
2674    /
2675    *
2676    c: object = None
2677    d: object = None
2678
2679[clinic start generated code]*/
2680
2681PyDoc_STRVAR(test_posonly_opt_kwonly_opt__doc__,
2682"test_posonly_opt_kwonly_opt($module, a, b=None, /, *, c=None, d=None)\n"
2683"--\n"
2684"\n");
2685
2686#define TEST_POSONLY_OPT_KWONLY_OPT_METHODDEF    \
2687    {"test_posonly_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_kwonly_opt__doc__},
2688
2689static PyObject *
2690test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2691                                 PyObject *c, PyObject *d);
2692
2693static PyObject *
2694test_posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2695{
2696    PyObject *return_value = NULL;
2697    static const char * const _keywords[] = {"", "", "c", "d", NULL};
2698    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_kwonly_opt", 0};
2699    PyObject *argsbuf[4];
2700    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2701    PyObject *a;
2702    PyObject *b = Py_None;
2703    PyObject *c = Py_None;
2704    PyObject *d = Py_None;
2705
2706    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
2707    if (!args) {
2708        goto exit;
2709    }
2710    a = args[0];
2711    if (nargs < 2) {
2712        goto skip_optional_posonly;
2713    }
2714    noptargs--;
2715    b = args[1];
2716skip_optional_posonly:
2717    if (!noptargs) {
2718        goto skip_optional_kwonly;
2719    }
2720    if (args[2]) {
2721        c = args[2];
2722        if (!--noptargs) {
2723            goto skip_optional_kwonly;
2724        }
2725    }
2726    d = args[3];
2727skip_optional_kwonly:
2728    return_value = test_posonly_opt_kwonly_opt_impl(module, a, b, c, d);
2729
2730exit:
2731    return return_value;
2732}
2733
2734static PyObject *
2735test_posonly_opt_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *b,
2736                                 PyObject *c, PyObject *d)
2737/*[clinic end generated code: output=8b5e21a30cad22b7 input=1e557dc979d120fd]*/
2738
2739
2740/*[clinic input]
2741test_posonly_keywords_kwonly_opt
2742
2743    a: object
2744    /
2745    b: object
2746    *
2747    c: object
2748    d: object = None
2749    e: object = None
2750
2751[clinic start generated code]*/
2752
2753PyDoc_STRVAR(test_posonly_keywords_kwonly_opt__doc__,
2754"test_posonly_keywords_kwonly_opt($module, a, /, b, *, c, d=None, e=None)\n"
2755"--\n"
2756"\n");
2757
2758#define TEST_POSONLY_KEYWORDS_KWONLY_OPT_METHODDEF    \
2759    {"test_posonly_keywords_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt__doc__},
2760
2761static PyObject *
2762test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
2763                                      PyObject *b, PyObject *c, PyObject *d,
2764                                      PyObject *e);
2765
2766static PyObject *
2767test_posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2768{
2769    PyObject *return_value = NULL;
2770    static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
2771    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt", 0};
2772    PyObject *argsbuf[5];
2773    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 3;
2774    PyObject *a;
2775    PyObject *b;
2776    PyObject *c;
2777    PyObject *d = Py_None;
2778    PyObject *e = Py_None;
2779
2780    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
2781    if (!args) {
2782        goto exit;
2783    }
2784    a = args[0];
2785    b = args[1];
2786    c = args[2];
2787    if (!noptargs) {
2788        goto skip_optional_kwonly;
2789    }
2790    if (args[3]) {
2791        d = args[3];
2792        if (!--noptargs) {
2793            goto skip_optional_kwonly;
2794        }
2795    }
2796    e = args[4];
2797skip_optional_kwonly:
2798    return_value = test_posonly_keywords_kwonly_opt_impl(module, a, b, c, d, e);
2799
2800exit:
2801    return return_value;
2802}
2803
2804static PyObject *
2805test_posonly_keywords_kwonly_opt_impl(PyObject *module, PyObject *a,
2806                                      PyObject *b, PyObject *c, PyObject *d,
2807                                      PyObject *e)
2808/*[clinic end generated code: output=950b9ace38b8b4a7 input=c3884a4f956fdc89]*/
2809
2810
2811/*[clinic input]
2812test_posonly_keywords_kwonly_opt2
2813
2814    a: object
2815    /
2816    b: object
2817    *
2818    c: object = None
2819    d: object = None
2820
2821[clinic start generated code]*/
2822
2823PyDoc_STRVAR(test_posonly_keywords_kwonly_opt2__doc__,
2824"test_posonly_keywords_kwonly_opt2($module, a, /, b, *, c=None, d=None)\n"
2825"--\n"
2826"\n");
2827
2828#define TEST_POSONLY_KEYWORDS_KWONLY_OPT2_METHODDEF    \
2829    {"test_posonly_keywords_kwonly_opt2", _PyCFunction_CAST(test_posonly_keywords_kwonly_opt2), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_kwonly_opt2__doc__},
2830
2831static PyObject *
2832test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
2833                                       PyObject *b, PyObject *c, PyObject *d);
2834
2835static PyObject *
2836test_posonly_keywords_kwonly_opt2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2837{
2838    PyObject *return_value = NULL;
2839    static const char * const _keywords[] = {"", "b", "c", "d", NULL};
2840    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_kwonly_opt2", 0};
2841    PyObject *argsbuf[4];
2842    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
2843    PyObject *a;
2844    PyObject *b;
2845    PyObject *c = Py_None;
2846    PyObject *d = Py_None;
2847
2848    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
2849    if (!args) {
2850        goto exit;
2851    }
2852    a = args[0];
2853    b = args[1];
2854    if (!noptargs) {
2855        goto skip_optional_kwonly;
2856    }
2857    if (args[2]) {
2858        c = args[2];
2859        if (!--noptargs) {
2860            goto skip_optional_kwonly;
2861        }
2862    }
2863    d = args[3];
2864skip_optional_kwonly:
2865    return_value = test_posonly_keywords_kwonly_opt2_impl(module, a, b, c, d);
2866
2867exit:
2868    return return_value;
2869}
2870
2871static PyObject *
2872test_posonly_keywords_kwonly_opt2_impl(PyObject *module, PyObject *a,
2873                                       PyObject *b, PyObject *c, PyObject *d)
2874/*[clinic end generated code: output=fb6951a21b517317 input=68d01d7c0f6dafb0]*/
2875
2876
2877/*[clinic input]
2878test_posonly_keywords_opt_kwonly_opt
2879
2880    a: object
2881    /
2882    b: object
2883    c: object = None
2884    *
2885    d: object = None
2886    e: object = None
2887
2888[clinic start generated code]*/
2889
2890PyDoc_STRVAR(test_posonly_keywords_opt_kwonly_opt__doc__,
2891"test_posonly_keywords_opt_kwonly_opt($module, a, /, b, c=None, *,\n"
2892"                                     d=None, e=None)\n"
2893"--\n"
2894"\n");
2895
2896#define TEST_POSONLY_KEYWORDS_OPT_KWONLY_OPT_METHODDEF    \
2897    {"test_posonly_keywords_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt_kwonly_opt__doc__},
2898
2899static PyObject *
2900test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
2901                                          PyObject *b, PyObject *c,
2902                                          PyObject *d, PyObject *e);
2903
2904static PyObject *
2905test_posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2906{
2907    PyObject *return_value = NULL;
2908    static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
2909    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt_kwonly_opt", 0};
2910    PyObject *argsbuf[5];
2911    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
2912    PyObject *a;
2913    PyObject *b;
2914    PyObject *c = Py_None;
2915    PyObject *d = Py_None;
2916    PyObject *e = Py_None;
2917
2918    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
2919    if (!args) {
2920        goto exit;
2921    }
2922    a = args[0];
2923    b = args[1];
2924    if (!noptargs) {
2925        goto skip_optional_pos;
2926    }
2927    if (args[2]) {
2928        c = args[2];
2929        if (!--noptargs) {
2930            goto skip_optional_pos;
2931        }
2932    }
2933skip_optional_pos:
2934    if (!noptargs) {
2935        goto skip_optional_kwonly;
2936    }
2937    if (args[3]) {
2938        d = args[3];
2939        if (!--noptargs) {
2940            goto skip_optional_kwonly;
2941        }
2942    }
2943    e = args[4];
2944skip_optional_kwonly:
2945    return_value = test_posonly_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e);
2946
2947exit:
2948    return return_value;
2949}
2950
2951static PyObject *
2952test_posonly_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
2953                                          PyObject *b, PyObject *c,
2954                                          PyObject *d, PyObject *e)
2955/*[clinic end generated code: output=4db10815a99a857e input=d0883d45876f186c]*/
2956
2957
2958/*[clinic input]
2959test_posonly_keywords_opt2_kwonly_opt
2960
2961    a: object
2962    /
2963    b: object = None
2964    c: object = None
2965    *
2966    d: object = None
2967    e: object = None
2968
2969[clinic start generated code]*/
2970
2971PyDoc_STRVAR(test_posonly_keywords_opt2_kwonly_opt__doc__,
2972"test_posonly_keywords_opt2_kwonly_opt($module, a, /, b=None, c=None, *,\n"
2973"                                      d=None, e=None)\n"
2974"--\n"
2975"\n");
2976
2977#define TEST_POSONLY_KEYWORDS_OPT2_KWONLY_OPT_METHODDEF    \
2978    {"test_posonly_keywords_opt2_kwonly_opt", _PyCFunction_CAST(test_posonly_keywords_opt2_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_keywords_opt2_kwonly_opt__doc__},
2979
2980static PyObject *
2981test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
2982                                           PyObject *b, PyObject *c,
2983                                           PyObject *d, PyObject *e);
2984
2985static PyObject *
2986test_posonly_keywords_opt2_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2987{
2988    PyObject *return_value = NULL;
2989    static const char * const _keywords[] = {"", "b", "c", "d", "e", NULL};
2990    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_keywords_opt2_kwonly_opt", 0};
2991    PyObject *argsbuf[5];
2992    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
2993    PyObject *a;
2994    PyObject *b = Py_None;
2995    PyObject *c = Py_None;
2996    PyObject *d = Py_None;
2997    PyObject *e = Py_None;
2998
2999    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
3000    if (!args) {
3001        goto exit;
3002    }
3003    a = args[0];
3004    if (!noptargs) {
3005        goto skip_optional_pos;
3006    }
3007    if (args[1]) {
3008        b = args[1];
3009        if (!--noptargs) {
3010            goto skip_optional_pos;
3011        }
3012    }
3013    if (args[2]) {
3014        c = args[2];
3015        if (!--noptargs) {
3016            goto skip_optional_pos;
3017        }
3018    }
3019skip_optional_pos:
3020    if (!noptargs) {
3021        goto skip_optional_kwonly;
3022    }
3023    if (args[3]) {
3024        d = args[3];
3025        if (!--noptargs) {
3026            goto skip_optional_kwonly;
3027        }
3028    }
3029    e = args[4];
3030skip_optional_kwonly:
3031    return_value = test_posonly_keywords_opt2_kwonly_opt_impl(module, a, b, c, d, e);
3032
3033exit:
3034    return return_value;
3035}
3036
3037static PyObject *
3038test_posonly_keywords_opt2_kwonly_opt_impl(PyObject *module, PyObject *a,
3039                                           PyObject *b, PyObject *c,
3040                                           PyObject *d, PyObject *e)
3041/*[clinic end generated code: output=0416689b23ebf66e input=c95e2e1ec93035ad]*/
3042
3043
3044/*[clinic input]
3045test_posonly_opt_keywords_opt_kwonly_opt
3046
3047    a: object
3048    b: object = None
3049    /
3050    c: object = None
3051    d: object = None
3052    *
3053    e: object = None
3054    f: object = None
3055
3056[clinic start generated code]*/
3057
3058PyDoc_STRVAR(test_posonly_opt_keywords_opt_kwonly_opt__doc__,
3059"test_posonly_opt_keywords_opt_kwonly_opt($module, a, b=None, /, c=None,\n"
3060"                                         d=None, *, e=None, f=None)\n"
3061"--\n"
3062"\n");
3063
3064#define TEST_POSONLY_OPT_KEYWORDS_OPT_KWONLY_OPT_METHODDEF    \
3065    {"test_posonly_opt_keywords_opt_kwonly_opt", _PyCFunction_CAST(test_posonly_opt_keywords_opt_kwonly_opt), METH_FASTCALL|METH_KEYWORDS, test_posonly_opt_keywords_opt_kwonly_opt__doc__},
3066
3067static PyObject *
3068test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
3069                                              PyObject *b, PyObject *c,
3070                                              PyObject *d, PyObject *e,
3071                                              PyObject *f);
3072
3073static PyObject *
3074test_posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3075{
3076    PyObject *return_value = NULL;
3077    static const char * const _keywords[] = {"", "", "c", "d", "e", "f", NULL};
3078    static _PyArg_Parser _parser = {NULL, _keywords, "test_posonly_opt_keywords_opt_kwonly_opt", 0};
3079    PyObject *argsbuf[6];
3080    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
3081    PyObject *a;
3082    PyObject *b = Py_None;
3083    PyObject *c = Py_None;
3084    PyObject *d = Py_None;
3085    PyObject *e = Py_None;
3086    PyObject *f = Py_None;
3087
3088    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
3089    if (!args) {
3090        goto exit;
3091    }
3092    a = args[0];
3093    if (nargs < 2) {
3094        goto skip_optional_posonly;
3095    }
3096    noptargs--;
3097    b = args[1];
3098skip_optional_posonly:
3099    if (!noptargs) {
3100        goto skip_optional_pos;
3101    }
3102    if (args[2]) {
3103        c = args[2];
3104        if (!--noptargs) {
3105            goto skip_optional_pos;
3106        }
3107    }
3108    if (args[3]) {
3109        d = args[3];
3110        if (!--noptargs) {
3111            goto skip_optional_pos;
3112        }
3113    }
3114skip_optional_pos:
3115    if (!noptargs) {
3116        goto skip_optional_kwonly;
3117    }
3118    if (args[4]) {
3119        e = args[4];
3120        if (!--noptargs) {
3121            goto skip_optional_kwonly;
3122        }
3123    }
3124    f = args[5];
3125skip_optional_kwonly:
3126    return_value = test_posonly_opt_keywords_opt_kwonly_opt_impl(module, a, b, c, d, e, f);
3127
3128exit:
3129    return return_value;
3130}
3131
3132static PyObject *
3133test_posonly_opt_keywords_opt_kwonly_opt_impl(PyObject *module, PyObject *a,
3134                                              PyObject *b, PyObject *c,
3135                                              PyObject *d, PyObject *e,
3136                                              PyObject *f)
3137/*[clinic end generated code: output=8892a137a8c8f46f input=9914857713c5bbf8]*/
3138
3139/*[clinic input]
3140test_keyword_only_parameter
3141
3142
3143    *
3144    co_lnotab: PyBytesObject(c_default="(PyBytesObject *)self->co_lnotab") = None
3145
3146[clinic start generated code]*/
3147
3148PyDoc_STRVAR(test_keyword_only_parameter__doc__,
3149"test_keyword_only_parameter($module, /, *, co_lnotab=None)\n"
3150"--\n"
3151"\n");
3152
3153#define TEST_KEYWORD_ONLY_PARAMETER_METHODDEF    \
3154    {"test_keyword_only_parameter", _PyCFunction_CAST(test_keyword_only_parameter), METH_FASTCALL|METH_KEYWORDS, test_keyword_only_parameter__doc__},
3155
3156static PyObject *
3157test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab);
3158
3159static PyObject *
3160test_keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3161{
3162    PyObject *return_value = NULL;
3163    static const char * const _keywords[] = {"co_lnotab", NULL};
3164    static _PyArg_Parser _parser = {NULL, _keywords, "test_keyword_only_parameter", 0};
3165    PyObject *argsbuf[1];
3166    Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
3167    PyBytesObject *co_lnotab = (PyBytesObject *)self->co_lnotab;
3168
3169    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf);
3170    if (!args) {
3171        goto exit;
3172    }
3173    if (!noptargs) {
3174        goto skip_optional_kwonly;
3175    }
3176    if (!PyBytes_Check(args[0])) {
3177        _PyArg_BadArgument("test_keyword_only_parameter", "argument 'co_lnotab'", "bytes", args[0]);
3178        goto exit;
3179    }
3180    co_lnotab = (PyBytesObject *)args[0];
3181skip_optional_kwonly:
3182    return_value = test_keyword_only_parameter_impl(module, co_lnotab);
3183
3184exit:
3185    return return_value;
3186}
3187
3188static PyObject *
3189test_keyword_only_parameter_impl(PyObject *module, PyBytesObject *co_lnotab)
3190/*[clinic end generated code: output=332b5f4b444c5d55 input=303df5046c7e37a3]*/
3191
3192
3193/*[clinic input]
3194output push
3195output preset buffer
3196[clinic start generated code]*/
3197/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5bff3376ee0df0b5]*/
3198
3199#ifdef CONDITION_A
3200/*[clinic input]
3201test_preprocessor_guarded_condition_a
3202[clinic start generated code]*/
3203
3204static PyObject *
3205test_preprocessor_guarded_condition_a_impl(PyObject *module)
3206/*[clinic end generated code: output=ad012af18085add6 input=8edb8706a98cda7e]*/
3207#elif CONDITION_B
3208/*[clinic input]
3209test_preprocessor_guarded_elif_condition_b
3210[clinic start generated code]*/
3211
3212static PyObject *
3213test_preprocessor_guarded_elif_condition_b_impl(PyObject *module)
3214/*[clinic end generated code: output=615f2dee82b138d1 input=53777cebbf7fee32]*/
3215#else
3216/*[clinic input]
3217test_preprocessor_guarded_else
3218[clinic start generated code]*/
3219
3220static PyObject *
3221test_preprocessor_guarded_else_impl(PyObject *module)
3222/*[clinic end generated code: output=13af7670aac51b12 input=6657ab31d74c29fc]*/
3223#endif
3224
3225/*[clinic input]
3226dump buffer
3227output pop
3228[clinic start generated code]*/
3229
3230#if defined(CONDITION_A)
3231
3232PyDoc_STRVAR(test_preprocessor_guarded_condition_a__doc__,
3233"test_preprocessor_guarded_condition_a($module, /)\n"
3234"--\n"
3235"\n");
3236
3237#define TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF    \
3238    {"test_preprocessor_guarded_condition_a", (PyCFunction)test_preprocessor_guarded_condition_a, METH_NOARGS, test_preprocessor_guarded_condition_a__doc__},
3239
3240static PyObject *
3241test_preprocessor_guarded_condition_a(PyObject *module, PyObject *Py_UNUSED(ignored))
3242{
3243    return test_preprocessor_guarded_condition_a_impl(module);
3244}
3245
3246#endif /* defined(CONDITION_A) */
3247
3248#if !defined(CONDITION_A) && (CONDITION_B)
3249
3250PyDoc_STRVAR(test_preprocessor_guarded_elif_condition_b__doc__,
3251"test_preprocessor_guarded_elif_condition_b($module, /)\n"
3252"--\n"
3253"\n");
3254
3255#define TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF    \
3256    {"test_preprocessor_guarded_elif_condition_b", (PyCFunction)test_preprocessor_guarded_elif_condition_b, METH_NOARGS, test_preprocessor_guarded_elif_condition_b__doc__},
3257
3258static PyObject *
3259test_preprocessor_guarded_elif_condition_b(PyObject *module, PyObject *Py_UNUSED(ignored))
3260{
3261    return test_preprocessor_guarded_elif_condition_b_impl(module);
3262}
3263
3264#endif /* !defined(CONDITION_A) && (CONDITION_B) */
3265
3266#if !defined(CONDITION_A) && !(CONDITION_B)
3267
3268PyDoc_STRVAR(test_preprocessor_guarded_else__doc__,
3269"test_preprocessor_guarded_else($module, /)\n"
3270"--\n"
3271"\n");
3272
3273#define TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF    \
3274    {"test_preprocessor_guarded_else", (PyCFunction)test_preprocessor_guarded_else, METH_NOARGS, test_preprocessor_guarded_else__doc__},
3275
3276static PyObject *
3277test_preprocessor_guarded_else(PyObject *module, PyObject *Py_UNUSED(ignored))
3278{
3279    return test_preprocessor_guarded_else_impl(module);
3280}
3281
3282#endif /* !defined(CONDITION_A) && !(CONDITION_B) */
3283
3284#ifndef TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF
3285    #define TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF
3286#endif /* !defined(TEST_PREPROCESSOR_GUARDED_CONDITION_A_METHODDEF) */
3287
3288#ifndef TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF
3289    #define TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF
3290#endif /* !defined(TEST_PREPROCESSOR_GUARDED_ELIF_CONDITION_B_METHODDEF) */
3291
3292#ifndef TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF
3293    #define TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF
3294#endif /* !defined(TEST_PREPROCESSOR_GUARDED_ELSE_METHODDEF) */
3295/*[clinic end generated code: output=3804bb18d454038c input=3fc80c9989d2f2e1]*/
3296
3297/*[clinic input]
3298test_vararg_and_posonly
3299
3300
3301    a: object
3302    *args: object
3303    /
3304
3305[clinic start generated code]*/
3306
3307PyDoc_STRVAR(test_vararg_and_posonly__doc__,
3308"test_vararg_and_posonly($module, a, /, *args)\n"
3309"--\n"
3310"\n");
3311
3312#define TEST_VARARG_AND_POSONLY_METHODDEF    \
3313    {"test_vararg_and_posonly", _PyCFunction_CAST(test_vararg_and_posonly), METH_FASTCALL, test_vararg_and_posonly__doc__},
3314
3315static PyObject *
3316test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args);
3317
3318static PyObject *
3319test_vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
3320{
3321    PyObject *return_value = NULL;
3322    PyObject *a;
3323    PyObject *__clinic_args = NULL;
3324
3325    if (!_PyArg_CheckPositional("test_vararg_and_posonly", nargs, 1, PY_SSIZE_T_MAX)) {
3326        goto exit;
3327    }
3328    a = args[0];
3329    __clinic_args = PyTuple_New(nargs - 1);
3330    if (!__clinic_args) {
3331        goto exit;
3332    }
3333    for (Py_ssize_t i = 0; i < nargs - 1; ++i) {
3334        PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[1 + i]));
3335    }
3336    return_value = test_vararg_and_posonly_impl(module, a, __clinic_args);
3337
3338exit:
3339    Py_XDECREF(__clinic_args);
3340    return return_value;
3341}
3342
3343static PyObject *
3344test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args)
3345/*[clinic end generated code: output=79b75dc07decc8d6 input=08dc2bf7afbf1613]*/
3346
3347/*[clinic input]
3348test_vararg
3349
3350
3351    a: object
3352    *args: object
3353
3354[clinic start generated code]*/
3355
3356PyDoc_STRVAR(test_vararg__doc__,
3357"test_vararg($module, /, a, *args)\n"
3358"--\n"
3359"\n");
3360
3361#define TEST_VARARG_METHODDEF    \
3362    {"test_vararg", _PyCFunction_CAST(test_vararg), METH_FASTCALL|METH_KEYWORDS, test_vararg__doc__},
3363
3364static PyObject *
3365test_vararg_impl(PyObject *module, PyObject *a, PyObject *args);
3366
3367static PyObject *
3368test_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3369{
3370    PyObject *return_value = NULL;
3371    static const char * const _keywords[] = {"a", NULL};
3372    static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg", 0};
3373    PyObject *argsbuf[2];
3374    PyObject *a;
3375    PyObject *__clinic_args = NULL;
3376
3377    args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
3378    if (!args) {
3379        goto exit;
3380    }
3381    a = args[0];
3382    __clinic_args = args[1];
3383    return_value = test_vararg_impl(module, a, __clinic_args);
3384
3385exit:
3386    Py_XDECREF(__clinic_args);
3387    return return_value;
3388}
3389
3390static PyObject *
3391test_vararg_impl(PyObject *module, PyObject *a, PyObject *args)
3392/*[clinic end generated code: output=ce9334333757f6ea input=81d33815ad1bae6e]*/
3393
3394/*[clinic input]
3395test_vararg_with_default
3396
3397
3398    a: object
3399    *args: object
3400    b: bool = False
3401
3402[clinic start generated code]*/
3403
3404PyDoc_STRVAR(test_vararg_with_default__doc__,
3405"test_vararg_with_default($module, /, a, *args, b=False)\n"
3406"--\n"
3407"\n");
3408
3409#define TEST_VARARG_WITH_DEFAULT_METHODDEF    \
3410    {"test_vararg_with_default", _PyCFunction_CAST(test_vararg_with_default), METH_FASTCALL|METH_KEYWORDS, test_vararg_with_default__doc__},
3411
3412static PyObject *
3413test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
3414                              int b);
3415
3416static PyObject *
3417test_vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3418{
3419    PyObject *return_value = NULL;
3420    static const char * const _keywords[] = {"a", "b", NULL};
3421    static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg_with_default", 0};
3422    PyObject *argsbuf[3];
3423    Py_ssize_t noptargs = Py_MIN(nargs, 1) + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
3424    PyObject *a;
3425    PyObject *__clinic_args = NULL;
3426    int b = 0;
3427
3428    args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
3429    if (!args) {
3430        goto exit;
3431    }
3432    a = args[0];
3433    __clinic_args = args[1];
3434    if (!noptargs) {
3435        goto skip_optional_kwonly;
3436    }
3437    b = PyObject_IsTrue(args[2]);
3438    if (b < 0) {
3439        goto exit;
3440    }
3441skip_optional_kwonly:
3442    return_value = test_vararg_with_default_impl(module, a, __clinic_args, b);
3443
3444exit:
3445    Py_XDECREF(__clinic_args);
3446    return return_value;
3447}
3448
3449static PyObject *
3450test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
3451                              int b)
3452/*[clinic end generated code: output=32fb19dd6bcf9185 input=6e110b54acd9b22d]*/
3453
3454/*[clinic input]
3455test_vararg_with_only_defaults
3456
3457
3458    *args: object
3459    b: bool = False
3460    c: object = ' '
3461
3462[clinic start generated code]*/
3463
3464PyDoc_STRVAR(test_vararg_with_only_defaults__doc__,
3465"test_vararg_with_only_defaults($module, /, *args, b=False, c=\' \')\n"
3466"--\n"
3467"\n");
3468
3469#define TEST_VARARG_WITH_ONLY_DEFAULTS_METHODDEF    \
3470    {"test_vararg_with_only_defaults", _PyCFunction_CAST(test_vararg_with_only_defaults), METH_FASTCALL|METH_KEYWORDS, test_vararg_with_only_defaults__doc__},
3471
3472static PyObject *
3473test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
3474                                    PyObject *c);
3475
3476static PyObject *
3477test_vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3478{
3479    PyObject *return_value = NULL;
3480    static const char * const _keywords[] = {"b", "c", NULL};
3481    static _PyArg_Parser _parser = {NULL, _keywords, "test_vararg_with_only_defaults", 0};
3482    PyObject *argsbuf[3];
3483    Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
3484    PyObject *__clinic_args = NULL;
3485    int b = 0;
3486    PyObject *c = " ";
3487
3488    args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf);
3489    if (!args) {
3490        goto exit;
3491    }
3492    __clinic_args = args[0];
3493    if (!noptargs) {
3494        goto skip_optional_kwonly;
3495    }
3496    if (args[1]) {
3497        b = PyObject_IsTrue(args[1]);
3498        if (b < 0) {
3499            goto exit;
3500        }
3501        if (!--noptargs) {
3502            goto skip_optional_kwonly;
3503        }
3504    }
3505    c = args[2];
3506skip_optional_kwonly:
3507    return_value = test_vararg_with_only_defaults_impl(module, __clinic_args, b, c);
3508
3509exit:
3510    Py_XDECREF(__clinic_args);
3511    return return_value;
3512}
3513
3514static PyObject *
3515test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
3516                                    PyObject *c)
3517/*[clinic end generated code: output=7e393689e6ce61a3 input=fa56a709a035666e]*/
3518
3519/*[clinic input]
3520test_paramname_module
3521
3522    module as mod: object
3523[clinic start generated code]*/
3524
3525PyDoc_STRVAR(test_paramname_module__doc__,
3526"test_paramname_module($module, /, module)\n"
3527"--\n"
3528"\n");
3529
3530#define TEST_PARAMNAME_MODULE_METHODDEF    \
3531    {"test_paramname_module", _PyCFunction_CAST(test_paramname_module), METH_FASTCALL|METH_KEYWORDS, test_paramname_module__doc__},
3532
3533static PyObject *
3534test_paramname_module_impl(PyObject *module, PyObject *mod);
3535
3536static PyObject *
3537test_paramname_module(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
3538{
3539    PyObject *return_value = NULL;
3540    static const char * const _keywords[] = {"module", NULL};
3541    static _PyArg_Parser _parser = {NULL, _keywords, "test_paramname_module", 0};
3542    PyObject *argsbuf[1];
3543    PyObject *mod;
3544
3545    args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
3546    if (!args) {
3547        goto exit;
3548    }
3549    mod = args[0];
3550    return_value = test_paramname_module_impl(module, mod);
3551
3552exit:
3553    return return_value;
3554}
3555
3556static PyObject *
3557test_paramname_module_impl(PyObject *module, PyObject *mod)
3558/*[clinic end generated code: output=23379a7ffa65c514 input=afefe259667f13ba]*/
3559