a: object
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
test_vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args)
-/*[clinic end generated code: output=0c11c475e240869e input=9cfa748bbff09877]*/
+/*[clinic end generated code: output=0c11c475e240869e input=2c49a482f68545c0]*/
PyDoc_STRVAR(test_vararg_and_posonly__doc__,
"test_vararg_and_posonly($module, a, /, *args)\n"
a: object
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
test_vararg_impl(PyObject *module, PyObject *a, PyObject *args)
-/*[clinic end generated code: output=e7d7da6a7e008125 input=81d33815ad1bae6e]*/
+/*[clinic end generated code: output=e7d7da6a7e008125 input=7448995636d9186a]*/
/*[clinic input]
test_vararg_with_default
a: object
- *args: object
+ *args: tuple
b: bool = False
[clinic start generated code]*/
static PyObject *
test_vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
int b)
-/*[clinic end generated code: output=46781f9920ecedcf input=6e110b54acd9b22d]*/
+/*[clinic end generated code: output=46781f9920ecedcf input=3a0f9f557ce1f712]*/
/*[clinic input]
test_vararg_with_only_defaults
- *args: object
+ *args: tuple
b: bool = False
c: object = ' '
static PyObject *
test_vararg_with_only_defaults_impl(PyObject *module, PyObject *args, int b,
PyObject *c)
-/*[clinic end generated code: output=d03daf5067039c03 input=fa56a709a035666e]*/
+/*[clinic end generated code: output=d03daf5067039c03 input=6983e66817f82924]*/
/*[clinic input]
test_paramname_module
/*[clinic input]
Test.__init__
- *args: object
+ *args: tuple
Varargs init method. For example, nargs is translated to PyTuple_GET_SIZE.
[clinic start generated code]*/
static int
Test___init___impl(TestObj *self, PyObject *args)
-/*[clinic end generated code: output=f172425cec373cd6 input=2a8bd0033c9ac772]*/
+/*[clinic end generated code: output=f172425cec373cd6 input=4b8388c4e6baab6f]*/
PyDoc_STRVAR(Test___init____doc__,
"Test(*args)\n"
/*[clinic input]
@classmethod
Test.__new__
- *args: object
+ *args: tuple
Varargs new method. For example, nargs is translated to PyTuple_GET_SIZE.
[clinic start generated code]*/
static PyObject *
Test_impl(PyTypeObject *type, PyObject *args)
-/*[clinic end generated code: output=ee1e8892a67abd4a input=70ad829df3dd9b84]*/
+/*[clinic end generated code: output=ee1e8892a67abd4a input=a8259521129cad20]*/
PyDoc_STRVAR(Test__doc__,
"Test(*args)\n"
/*[clinic input]
varpos
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
varpos_impl(PyObject *module, PyObject *args)
-/*[clinic end generated code: output=7b0b9545872bdca4 input=f87cd674145d394c]*/
+/*[clinic end generated code: output=7b0b9545872bdca4 input=ae7ccecd997aaff4]*/
{
return Py_NewRef(args);
}
a: object
b: object
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_varpos_impl(PyObject *module, PyObject *a, PyObject *b,
PyObject *args)
-/*[clinic end generated code: output=5dae5eb2a0d623cd input=c9fd7895cfbaabba]*/
+/*[clinic end generated code: output=5dae5eb2a0d623cd input=6dd74417b62cbe67]*/
{
return pack_arguments_newref(3, a, b, args);
}
a: object
b: object = False
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_req_opt_varpos_impl(PyObject *module, PyObject *a, PyObject *b,
PyObject *args)
-/*[clinic end generated code: output=67f82f90838e166a input=a49bd64740171e1c]*/
+/*[clinic end generated code: output=67f82f90838e166a input=e08ed48926a5b760]*/
{
return pack_arguments_newref(3, a, b, args);
}
a: object
/
b: object
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_poskw_varpos_impl(PyObject *module, PyObject *a, PyObject *b,
PyObject *args)
-/*[clinic end generated code: output=bffdb7649941c939 input=b3d7a734e0625f68]*/
+/*[clinic end generated code: output=bffdb7649941c939 input=e5a2c4cab6745ca1]*/
{
return pack_arguments_newref(3, a, b, args);
}
poskw_varpos
a: object
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
poskw_varpos_impl(PyObject *module, PyObject *a, PyObject *args)
-/*[clinic end generated code: output=2413ddfb5ef22794 input=a1dff12d00422484]*/
+/*[clinic end generated code: output=2413ddfb5ef22794 input=e78114436a07aefe]*/
{
return pack_arguments_newref(2, a, args);
}
poskw_varpos_kwonly_opt
a: object
- *args: object
+ *args: tuple
b: bool = False
[clinic start generated code]*/
static PyObject *
poskw_varpos_kwonly_opt_impl(PyObject *module, PyObject *a, PyObject *args,
int b)
-/*[clinic end generated code: output=f36d35ba6133463b input=1721d43dc5f6d856]*/
+/*[clinic end generated code: output=f36d35ba6133463b input=ebecfb189f4a3380]*/
{
PyObject *obj_b = b ? Py_True : Py_False;
return pack_arguments_newref(3, a, args, obj_b);
poskw_varpos_kwonly_opt2
a: object
- *args: object
+ *args: tuple
b: object = False
c: object = False
static PyObject *
poskw_varpos_kwonly_opt2_impl(PyObject *module, PyObject *a, PyObject *args,
PyObject *b, PyObject *c)
-/*[clinic end generated code: output=846cef62c6c40463 input=bb4b8d1577a8a408]*/
+/*[clinic end generated code: output=846cef62c6c40463 input=1aff29829431f711]*/
{
return pack_arguments_newref(4, a, args, b, c);
}
/*[clinic input]
varpos_kwonly_opt
- *args: object
+ *args: tuple
b: object = False
[clinic start generated code]*/
static PyObject *
varpos_kwonly_opt_impl(PyObject *module, PyObject *args, PyObject *b)
-/*[clinic end generated code: output=3b7bf98b091f5731 input=380fb00deec847e8]*/
+/*[clinic end generated code: output=3b7bf98b091f5731 input=1bec50dc49fca2eb]*/
{
return pack_arguments_newref(2, args, b);
}
/*[clinic input]
varpos_kwonly_req_opt
- *args: object
+ *args: tuple
a: object
b: object = False
c: object = False
static PyObject *
varpos_kwonly_req_opt_impl(PyObject *module, PyObject *args, PyObject *a,
PyObject *b, PyObject *c)
-/*[clinic end generated code: output=165274e1fd037ae9 input=530794afd0690c22]*/
+/*[clinic end generated code: output=165274e1fd037ae9 input=355271f6119bb6c8]*/
{
return pack_arguments_newref(4, args, a, b, c);
}
pos1: object
pos2: object
- *varargs: object
+ *varargs: tuple
kw1: object = None
kw2: object = None
static PyObject *
gh_32092_oob_impl(PyObject *module, PyObject *pos1, PyObject *pos2,
PyObject *varargs, PyObject *kw1, PyObject *kw2)
-/*[clinic end generated code: output=ee259c130054653f input=46d15c881608f8ff]*/
+/*[clinic end generated code: output=ee259c130054653f input=63aeeca881979b91]*/
{
Py_RETURN_NONE;
}
gh_32092_kw_pass
pos: object
- *args: object
+ *args: tuple
kw: object = None
Proof-of-concept of GH-32092 keyword args passing bug.
static PyObject *
gh_32092_kw_pass_impl(PyObject *module, PyObject *pos, PyObject *args,
PyObject *kw)
-/*[clinic end generated code: output=4a2bbe4f7c8604e9 input=5c0bd5b9079a0cce]*/
+/*[clinic end generated code: output=4a2bbe4f7c8604e9 input=258987971f3ee97a]*/
{
Py_RETURN_NONE;
}
/*[clinic input]
gh_99233_refcount
- *args: object
+ *args: tuple
Proof-of-concept of GH-99233 refcount error bug.
static PyObject *
gh_99233_refcount_impl(PyObject *module, PyObject *args)
-/*[clinic end generated code: output=585855abfbca9a7f input=eecfdc2092d90dc3]*/
+/*[clinic end generated code: output=585855abfbca9a7f input=f5204359fd852613]*/
{
Py_RETURN_NONE;
}
null_or_tuple_for_varargs
name: object
- *constraints: object
+ *constraints: tuple
covariant: bool = False
See https://github.com/python/cpython/issues/110864
static PyObject *
null_or_tuple_for_varargs_impl(PyObject *module, PyObject *name,
PyObject *constraints, int covariant)
-/*[clinic end generated code: output=a785b35421358983 input=c9bce186637956b3]*/
+/*[clinic end generated code: output=a785b35421358983 input=4df930e019f32878]*/
{
assert(name != NULL);
assert(constraints != NULL);
/*[clinic input]
_testclinic.TestClass.defclass_varpos
cls: defining_class
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
_testclinic_TestClass_defclass_varpos_impl(PyObject *self, PyTypeObject *cls,
PyObject *args)
-/*[clinic end generated code: output=fad33f2d3a8d778d input=47071dcda393a7e1]*/
+/*[clinic end generated code: output=fad33f2d3a8d778d input=332043286e393d38]*/
{
return PyTuple_Pack(2, cls, args);
}
a: object
b: object
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
PyTypeObject *cls,
PyObject *a, PyObject *b,
PyObject *args)
-/*[clinic end generated code: output=1740fcf48d230b07 input=40f2e56286d4a7ef]*/
+/*[clinic end generated code: output=1740fcf48d230b07 input=191da4557203c413]*/
{
return pack_arguments_newref(4, cls, a, b, args);
}
@classmethod
_testclinic.TestClass.__new__ as varpos_no_fastcall
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
varpos_no_fastcall_impl(PyTypeObject *type, PyObject *args)
-/*[clinic end generated code: output=04e94f2898bb2dde input=b0447ebab3e81001]*/
+/*[clinic end generated code: output=04e94f2898bb2dde input=c5d3d30a6589f97f]*/
{
return Py_NewRef(args);
}
a: object
b: object
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a, PyObject *b,
PyObject *args)
-/*[clinic end generated code: output=b0a0425719f69f5a input=d2ec37a06b3c2389]*/
+/*[clinic end generated code: output=b0a0425719f69f5a input=10f29f2c2c6bfdc4]*/
{
return pack_arguments_newref(3, a, b, args);
}
a: object
b: object = False
/
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_req_opt_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
PyObject *b, PyObject *args)
-/*[clinic end generated code: output=3c44915b1a554e2d input=e9e74686a5e6a06d]*/
+/*[clinic end generated code: output=3c44915b1a554e2d input=d319302a8748147c]*/
{
return pack_arguments_newref(3, a, b, args);
}
a: object
/
b: object
- *args: object
+ *args: tuple
[clinic start generated code]*/
static PyObject *
posonly_poskw_varpos_no_fastcall_impl(PyTypeObject *type, PyObject *a,
PyObject *b, PyObject *args)
-/*[clinic end generated code: output=6ad74bed4bdc7f96 input=fa931c38184213aa]*/
+/*[clinic end generated code: output=6ad74bed4bdc7f96 input=1f8c113e749414a3]*/
{
return pack_arguments_newref(3, a, b, args);
}
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
-#include "pycore_tuple.h" // _PyTuple_FromArray()
PyDoc_STRVAR(builtin___import____doc__,
"__import__($module, /, name, globals=None, locals=None, fromlist=(),\n"
{"print", _PyCFunction_CAST(builtin_print), METH_FASTCALL|METH_KEYWORDS, builtin_print__doc__},
static PyObject *
-builtin_print_impl(PyObject *module, PyObject *args, PyObject *sep,
- PyObject *end, PyObject *file, int flush);
+builtin_print_impl(PyObject *module, PyObject * const *args,
+ Py_ssize_t args_length, PyObject *sep, PyObject *end,
+ PyObject *file, int flush);
static PyObject *
builtin_print(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
PyObject *argsbuf[4];
PyObject * const *fastargs;
Py_ssize_t noptargs = 0 + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
- PyObject *__clinic_args = NULL;
+ PyObject * const *__clinic_args;
+ Py_ssize_t args_length;
PyObject *sep = Py_None;
PyObject *end = Py_None;
PyObject *file = Py_None;
goto exit;
}
skip_optional_kwonly:
- __clinic_args = _PyTuple_FromArray(args, nargs);
- if (__clinic_args == NULL) {
- goto exit;
- }
- return_value = builtin_print_impl(module, __clinic_args, sep, end, file, flush);
+ __clinic_args = args;
+ args_length = nargs;
+ return_value = builtin_print_impl(module, __clinic_args, args_length, sep, end, file, flush);
exit:
- /* Cleanup for args */
- Py_XDECREF(__clinic_args);
-
return return_value;
}
exit:
return return_value;
}
-/*[clinic end generated code: output=76b27cf4164f257e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5c510ec462507656 input=a9049054013a1b77]*/