}
-/*[clinic input]
+/*
+ * # Do NOT use __new__ to generate this method. Compare:
+ *
+ * [1] With __new__ (METH_KEYWORDS must be added even if we don't want to)
+ *
+ * varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+ * varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args)
+ * no auto-generated METHODDEF macro
+ *
+ * [2] Without __new__ (automatically METH_FASTCALL, not good for this test)
+ *
+ * varpos_no_fastcall_impl(PyObject *type, PyObject *args)
+ * varpos_no_fastcall(PyObject *type, PyObject *const *args, Py_ssize_t nargs)
+ * flags = METH_FASTCALL|METH_CLASS
+ *
+ * [3] Without __new__ + "@disable fastcall" (what we want)
+ *
+ * varpos_no_fastcall(PyObject *type, PyObject *args)
+ * varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args)
+ * flags = METH_VARARGS|METH_CLASS
+ *
+ * We want to test a non-fastcall class method but without triggering an
+ * undefined behaviour at runtime in cfunction_call().
+ *
+ * At runtime, a METH_VARARGS method called in cfunction_call() must be:
+ *
+ * (PyObject *, PyObject *) -> PyObject *
+ * (PyObject *, PyObject *, PyObject *) -> PyObject *
+ *
+ * depending on whether METH_KEYWORDS is present or not.
+ *
+ * AC determines whether a method is a __new__-like method solely bsaed
+ * on the method name, and not on its usage or its c_basename, and those
+ * methods must always be used with METH_VARARGS|METH_KEYWORDS|METH_CLASS.
+ *
+ * In particular, using [1] forces us to add METH_KEYWORDS even though
+ * the test shouldn't be expecting keyword arguments. Using [2] is also
+ * not possible since we want to test non-fastcalls. This is the reason
+ * why we need to be able to disable the METH_FASTCALL flag.
+ */
+
+/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as varpos_no_fastcall
+_testclinic.TestClass.varpos_no_fastcall
*args: tuple
[clinic start generated code]*/
static PyObject *
-varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args)
-/*[clinic end generated code: output=04e94f2898bb2dde input=c5d3d30a6589f97f]*/
+_testclinic_TestClass_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *args)
+/*[clinic end generated code: output=edfacec733aeb9c5 input=3f298d143aa98048]*/
{
return Py_NewRef(args);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_varpos_no_fastcall
+_testclinic.TestClass.posonly_varpos_no_fastcall
a: object
b: object
[clinic start generated code]*/
static PyObject *
-posonly_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, PyObject *b,
- PyObject *args)
-/*[clinic end generated code: output=b0a0425719f69f5a input=10f29f2c2c6bfdc4]*/
+_testclinic_TestClass_posonly_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args)
+/*[clinic end generated code: output=2c5184aebe020085 input=3621dd172c5193d8]*/
{
return pack_arguments_newref(3, a, b, args);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_req_opt_varpos_no_fastcall
+_testclinic.TestClass.posonly_req_opt_varpos_no_fastcall
a: object
b: object = False
[clinic start generated code]*/
static PyObject *
-posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject *args)
-/*[clinic end generated code: output=3c44915b1a554e2d input=d319302a8748147c]*/
+_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args)
+/*[clinic end generated code: output=08e533d59bceadf6 input=922fa7851b32e2dd]*/
{
return pack_arguments_newref(3, a, b, args);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_poskw_varpos_no_fastcall
+_testclinic.TestClass.posonly_poskw_varpos_no_fastcall
a: object
/
[clinic start generated code]*/
static PyObject *
-posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject *args)
-/*[clinic end generated code: output=6ad74bed4bdc7f96 input=1f8c113e749414a3]*/
+_testclinic_TestClass_posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args)
+/*[clinic end generated code: output=8ecfda20850e689f input=60443fe0bb8fe3e0]*/
{
return pack_arguments_newref(3, a, b, args);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as varpos_array_no_fastcall
+_testclinic.TestClass.varpos_array_no_fastcall
*args: array
[clinic start generated code]*/
static PyObject *
-varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject * const *args,
- Py_ssize_t args_length)
-/*[clinic end generated code: output=f99d984346c60d42 input=368d8eea6de48c12]*/
+_testclinic_TestClass_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject * const *args,
+ Py_ssize_t args_length)
+/*[clinic end generated code: output=27c9da663e942617 input=9ba5ae1f1eb58777]*/
{
return _PyTuple_FromArray(args, args_length);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_varpos_array_no_fastcall
+_testclinic.TestClass.posonly_varpos_array_no_fastcall
a: object
b: object
[clinic start generated code]*/
static PyObject *
-posonly_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject * const *args,
- Py_ssize_t args_length)
-/*[clinic end generated code: output=1eec4da1fb5b5978 input=7330c8d819a23548]*/
+_testclinic_TestClass_posonly_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length)
+/*[clinic end generated code: output=71e676f1870b5a7e input=18eadf4c6eaab613]*/
{
return pack_arguments_2pos_varpos(a, b, args, args_length);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_req_opt_varpos_array_no_fastcall
+_testclinic.TestClass.posonly_req_opt_varpos_array_no_fastcall
a: object
b: object = False
[clinic start generated code]*/
static PyObject *
-posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type,
- PyObject *a, PyObject *b,
- PyObject * const *args,
- Py_ssize_t args_length)
-/*[clinic end generated code: output=88041c2176135218 input=7f5fd34ee5f9e0bf]*/
+_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length)
+/*[clinic end generated code: output=abb395cae91d48ac input=5bf791fdad70b480]*/
{
return pack_arguments_2pos_varpos(a, b, args, args_length);
}
/*[clinic input]
+@disable fastcall
@classmethod
-_testclinic.TestClass.__new__ as posonly_poskw_varpos_array_no_fastcall
+_testclinic.TestClass.posonly_poskw_varpos_array_no_fastcall
a: object
/
[clinic start generated code]*/
static PyObject *
-posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b,
- PyObject * const *args,
- Py_ssize_t args_length)
-/*[clinic end generated code: output=70eda18c3667681e input=2b0fcd7bd9bb865c]*/
+_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length)
+/*[clinic end generated code: output=aaddd9530048b229 input=9ed3842f4d472d45]*/
{
return pack_arguments_2pos_varpos(a, b, args, args_length);
}
_TESTCLINIC_TESTCLASS_DEFCLASS_VARPOS_METHODDEF
_TESTCLINIC_TESTCLASS_DEFCLASS_POSONLY_VARPOS_METHODDEF
- {"varpos_no_fastcall", _PyCFunction_CAST(varpos_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_varpos_no_fastcall", _PyCFunction_CAST(posonly_varpos_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_req_opt_varpos_no_fastcall", _PyCFunction_CAST(posonly_req_opt_varpos_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_poskw_varpos_no_fastcall", _PyCFunction_CAST(posonly_poskw_varpos_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
-
- {"varpos_array_no_fastcall",
- _PyCFunction_CAST(varpos_array_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_varpos_array_no_fastcall",
- _PyCFunction_CAST(posonly_varpos_array_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_req_opt_varpos_array_no_fastcall",
- _PyCFunction_CAST(posonly_req_opt_varpos_array_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
- {"posonly_poskw_varpos_array_no_fastcall",
- _PyCFunction_CAST(posonly_poskw_varpos_array_no_fastcall),
- METH_VARARGS|METH_KEYWORDS|METH_CLASS, ""},
+ _TESTCLINIC_TESTCLASS_VARPOS_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_VARPOS_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_REQ_OPT_VARPOS_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_POSKW_VARPOS_NO_FASTCALL_METHODDEF
+
+ _TESTCLINIC_TESTCLASS_VARPOS_ARRAY_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_VARPOS_ARRAY_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_REQ_OPT_VARPOS_ARRAY_NO_FASTCALL_METHODDEF
+ _TESTCLINIC_TESTCLASS_POSONLY_POSKW_VARPOS_ARRAY_NO_FASTCALL_METHODDEF
{NULL, NULL}
};
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_varpos_no_fastcall__doc__,
+"varpos_no_fastcall($type, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_VARPOS_NO_FASTCALL_METHODDEF \
+ {"varpos_no_fastcall", (PyCFunction)_testclinic_TestClass_varpos_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_varpos_no_fastcall__doc__},
+
static PyObject *
-varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args);
+_testclinic_TestClass_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *args);
static PyObject *
-varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_varpos_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject *__clinic_args = NULL;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
__clinic_args = Py_NewRef(args);
- return_value = varpos_no_fastcall_impl(type, __clinic_args);
+ return_value = _testclinic_TestClass_varpos_no_fastcall_impl((PyTypeObject *)type, __clinic_args);
-exit:
/* Cleanup for args */
Py_XDECREF(__clinic_args);
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_no_fastcall__doc__,
+"posonly_varpos_no_fastcall($type, a, b, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_VARPOS_NO_FASTCALL_METHODDEF \
+ {"posonly_varpos_no_fastcall", (PyCFunction)_testclinic_TestClass_posonly_varpos_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_posonly_varpos_no_fastcall__doc__},
+
static PyObject *
-posonly_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, PyObject *b,
- PyObject *args);
+_testclinic_TestClass_posonly_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args);
static PyObject *
-posonly_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_varpos_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject *a;
PyObject *b;
PyObject *__clinic_args = NULL;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
- if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) {
+ if (!_PyArg_CheckPositional("posonly_varpos_no_fastcall", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) {
goto exit;
}
a = PyTuple_GET_ITEM(args, 0);
if (!__clinic_args) {
goto exit;
}
- return_value = posonly_varpos_no_fastcall_impl(type, a, b, __clinic_args);
+ return_value = _testclinic_TestClass_posonly_varpos_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args);
exit:
/* Cleanup for args */
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall__doc__,
+"posonly_req_opt_varpos_no_fastcall($type, a, b=False, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_REQ_OPT_VARPOS_NO_FASTCALL_METHODDEF \
+ {"posonly_req_opt_varpos_no_fastcall", (PyCFunction)_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_posonly_req_opt_varpos_no_fastcall__doc__},
+
static PyObject *
-posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject *args);
+_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args);
static PyObject *
-posonly_req_opt_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject *a;
PyObject *b = Py_False;
PyObject *__clinic_args = NULL;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
- if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) {
+ if (!_PyArg_CheckPositional("posonly_req_opt_varpos_no_fastcall", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) {
goto exit;
}
a = PyTuple_GET_ITEM(args, 0);
if (!__clinic_args) {
goto exit;
}
- return_value = posonly_req_opt_varpos_no_fastcall_impl(type, a, b, __clinic_args);
+ return_value = _testclinic_TestClass_posonly_req_opt_varpos_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args);
exit:
/* Cleanup for args */
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_no_fastcall__doc__,
+"posonly_poskw_varpos_no_fastcall($type, a, /, b, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_POSKW_VARPOS_NO_FASTCALL_METHODDEF \
+ {"posonly_poskw_varpos_no_fastcall", _PyCFunction_CAST(_testclinic_TestClass_posonly_poskw_varpos_no_fastcall), METH_VARARGS|METH_KEYWORDS|METH_CLASS, _testclinic_TestClass_posonly_poskw_varpos_no_fastcall__doc__},
+
static PyObject *
-posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject *args);
+_testclinic_TestClass_posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject *args);
static PyObject *
-posonly_poskw_varpos_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_poskw_varpos_no_fastcall(PyObject *type, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
static const char * const _keywords[] = {"", "b", NULL};
static _PyArg_Parser _parser = {
.keywords = _keywords,
- .fname = "TestClass",
+ .fname = "posonly_poskw_varpos_no_fastcall",
.kwtuple = KWTUPLE,
};
#undef KWTUPLE
if (!__clinic_args) {
goto exit;
}
- return_value = posonly_poskw_varpos_no_fastcall_impl(type, a, b, __clinic_args);
+ return_value = _testclinic_TestClass_posonly_poskw_varpos_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args);
exit:
/* Cleanup for args */
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_varpos_array_no_fastcall__doc__,
+"varpos_array_no_fastcall($type, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_VARPOS_ARRAY_NO_FASTCALL_METHODDEF \
+ {"varpos_array_no_fastcall", (PyCFunction)_testclinic_TestClass_varpos_array_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_varpos_array_no_fastcall__doc__},
+
static PyObject *
-varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject * const *args,
- Py_ssize_t args_length);
+_testclinic_TestClass_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject * const *args,
+ Py_ssize_t args_length);
static PyObject *
-varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_varpos_array_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject * const *__clinic_args;
Py_ssize_t args_length;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
__clinic_args = _PyTuple_ITEMS(args);
args_length = PyTuple_GET_SIZE(args);
- return_value = varpos_array_no_fastcall_impl(type, __clinic_args, args_length);
+ return_value = _testclinic_TestClass_varpos_array_no_fastcall_impl((PyTypeObject *)type, __clinic_args, args_length);
-exit:
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_array_no_fastcall__doc__,
+"posonly_varpos_array_no_fastcall($type, a, b, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_VARPOS_ARRAY_NO_FASTCALL_METHODDEF \
+ {"posonly_varpos_array_no_fastcall", (PyCFunction)_testclinic_TestClass_posonly_varpos_array_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_posonly_varpos_array_no_fastcall__doc__},
+
static PyObject *
-posonly_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b, PyObject * const *args,
- Py_ssize_t args_length);
+_testclinic_TestClass_posonly_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length);
static PyObject *
-posonly_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_varpos_array_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject *a;
PyObject *b;
PyObject * const *__clinic_args;
Py_ssize_t args_length;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
- if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) {
+ if (!_PyArg_CheckPositional("posonly_varpos_array_no_fastcall", PyTuple_GET_SIZE(args), 2, PY_SSIZE_T_MAX)) {
goto exit;
}
a = PyTuple_GET_ITEM(args, 0);
b = PyTuple_GET_ITEM(args, 1);
__clinic_args = _PyTuple_ITEMS(args) + 2;
args_length = PyTuple_GET_SIZE(args) - 2;
- return_value = posonly_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length);
+ return_value = _testclinic_TestClass_posonly_varpos_array_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args, args_length);
exit:
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall__doc__,
+"posonly_req_opt_varpos_array_no_fastcall($type, a, b=False, /, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_REQ_OPT_VARPOS_ARRAY_NO_FASTCALL_METHODDEF \
+ {"posonly_req_opt_varpos_array_no_fastcall", (PyCFunction)_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall, METH_VARARGS|METH_CLASS, _testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall__doc__},
+
static PyObject *
-posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type,
- PyObject *a, PyObject *b,
- PyObject * const *args,
- Py_ssize_t args_length);
+_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length);
static PyObject *
-posonly_req_opt_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall(PyObject *type, PyObject *args)
{
PyObject *return_value = NULL;
- PyTypeObject *base_tp = &PyBaseObject_Type;
PyObject *a;
PyObject *b = Py_False;
PyObject * const *__clinic_args;
Py_ssize_t args_length;
- if ((type == base_tp || type->tp_init == base_tp->tp_init) &&
- !_PyArg_NoKeywords("TestClass", kwargs)) {
- goto exit;
- }
- if (!_PyArg_CheckPositional("TestClass", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) {
+ if (!_PyArg_CheckPositional("posonly_req_opt_varpos_array_no_fastcall", PyTuple_GET_SIZE(args), 1, PY_SSIZE_T_MAX)) {
goto exit;
}
a = PyTuple_GET_ITEM(args, 0);
skip_optional:
__clinic_args = PyTuple_GET_SIZE(args) > 2 ? _PyTuple_ITEMS(args) + 2 : _PyTuple_ITEMS(args);
args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2);
- return_value = posonly_req_opt_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length);
+ return_value = _testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args, args_length);
exit:
return return_value;
}
+PyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall__doc__,
+"posonly_poskw_varpos_array_no_fastcall($type, a, /, b, *args)\n"
+"--\n"
+"\n");
+
+#define _TESTCLINIC_TESTCLASS_POSONLY_POSKW_VARPOS_ARRAY_NO_FASTCALL_METHODDEF \
+ {"posonly_poskw_varpos_array_no_fastcall", _PyCFunction_CAST(_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall), METH_VARARGS|METH_KEYWORDS|METH_CLASS, _testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall__doc__},
+
static PyObject *
-posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type, PyObject *a,
- PyObject *b,
- PyObject * const *args,
- Py_ssize_t args_length);
+_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall_impl(PyTypeObject *type,
+ PyObject *a,
+ PyObject *b,
+ PyObject * const *args,
+ Py_ssize_t args_length);
static PyObject *
-posonly_poskw_varpos_array_no_fastcall(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall(PyObject *type, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
static const char * const _keywords[] = {"", "b", NULL};
static _PyArg_Parser _parser = {
.keywords = _keywords,
- .fname = "TestClass",
+ .fname = "posonly_poskw_varpos_array_no_fastcall",
.kwtuple = KWTUPLE,
};
#undef KWTUPLE
b = fastargs[1];
__clinic_args = PyTuple_GET_SIZE(args) > 2 ? _PyTuple_ITEMS(args) + 2 : _PyTuple_ITEMS(args);
args_length = Py_MAX(0, PyTuple_GET_SIZE(args) - 2);
- return_value = posonly_poskw_varpos_array_no_fastcall_impl(type, a, b, __clinic_args, args_length);
+ return_value = _testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall_impl((PyTypeObject *)type, a, b, __clinic_args, args_length);
exit:
return return_value;
}
-/*[clinic end generated code: output=a3726ee0a94090d1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ea0b8fb0949fa49f input=a9049054013a1b77]*/