Revert "Backport METH_FASTCALL from Python 3.7 (#328)"

This reverts commit cf73bbd678.
This commit is contained in:
Justine Tunney 2022-05-12 06:49:54 -07:00
parent e7611a8476
commit 2ea1dc405c
102 changed files with 3299 additions and 2894 deletions

View file

@ -17,7 +17,7 @@ audioop_getsample_impl(PyObject *module, Py_buffer *fragment, int width,
Py_ssize_t index);
static PyObject *
audioop_getsample(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_getsample(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -28,6 +28,10 @@ audioop_getsample(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &index)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("getsample", kwnames)) {
goto exit;
}
return_value = audioop_getsample_impl(module, &fragment, width, index);
exit:
@ -52,7 +56,7 @@ static PyObject *
audioop_max_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_max(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_max(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -62,6 +66,10 @@ audioop_max(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("max", kwnames)) {
goto exit;
}
return_value = audioop_max_impl(module, &fragment, width);
exit:
@ -86,7 +94,7 @@ static PyObject *
audioop_minmax_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_minmax(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_minmax(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -96,6 +104,10 @@ audioop_minmax(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("minmax", kwnames)) {
goto exit;
}
return_value = audioop_minmax_impl(module, &fragment, width);
exit:
@ -120,7 +132,7 @@ static PyObject *
audioop_avg_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_avg(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_avg(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -130,6 +142,10 @@ audioop_avg(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("avg", kwnames)) {
goto exit;
}
return_value = audioop_avg_impl(module, &fragment, width);
exit:
@ -154,7 +170,7 @@ static PyObject *
audioop_rms_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_rms(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_rms(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -164,6 +180,10 @@ audioop_rms(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("rms", kwnames)) {
goto exit;
}
return_value = audioop_rms_impl(module, &fragment, width);
exit:
@ -189,7 +209,7 @@ audioop_findfit_impl(PyObject *module, Py_buffer *fragment,
Py_buffer *reference);
static PyObject *
audioop_findfit(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_findfit(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -199,6 +219,10 @@ audioop_findfit(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &reference)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("findfit", kwnames)) {
goto exit;
}
return_value = audioop_findfit_impl(module, &fragment, &reference);
exit:
@ -228,7 +252,7 @@ audioop_findfactor_impl(PyObject *module, Py_buffer *fragment,
Py_buffer *reference);
static PyObject *
audioop_findfactor(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_findfactor(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -238,6 +262,10 @@ audioop_findfactor(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &reference)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("findfactor", kwnames)) {
goto exit;
}
return_value = audioop_findfactor_impl(module, &fragment, &reference);
exit:
@ -267,7 +295,7 @@ audioop_findmax_impl(PyObject *module, Py_buffer *fragment,
Py_ssize_t length);
static PyObject *
audioop_findmax(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_findmax(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -277,6 +305,10 @@ audioop_findmax(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &length)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("findmax", kwnames)) {
goto exit;
}
return_value = audioop_findmax_impl(module, &fragment, length);
exit:
@ -301,7 +333,7 @@ static PyObject *
audioop_avgpp_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_avgpp(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_avgpp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -311,6 +343,10 @@ audioop_avgpp(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("avgpp", kwnames)) {
goto exit;
}
return_value = audioop_avgpp_impl(module, &fragment, width);
exit:
@ -335,7 +371,7 @@ static PyObject *
audioop_maxpp_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_maxpp(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_maxpp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -345,6 +381,10 @@ audioop_maxpp(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("maxpp", kwnames)) {
goto exit;
}
return_value = audioop_maxpp_impl(module, &fragment, width);
exit:
@ -369,7 +409,7 @@ static PyObject *
audioop_cross_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_cross(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_cross(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -379,6 +419,10 @@ audioop_cross(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("cross", kwnames)) {
goto exit;
}
return_value = audioop_cross_impl(module, &fragment, width);
exit:
@ -404,7 +448,7 @@ audioop_mul_impl(PyObject *module, Py_buffer *fragment, int width,
double factor);
static PyObject *
audioop_mul(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_mul(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -415,6 +459,10 @@ audioop_mul(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &factor)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("mul", kwnames)) {
goto exit;
}
return_value = audioop_mul_impl(module, &fragment, width, factor);
exit:
@ -440,7 +488,7 @@ audioop_tomono_impl(PyObject *module, Py_buffer *fragment, int width,
double lfactor, double rfactor);
static PyObject *
audioop_tomono(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_tomono(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -452,6 +500,10 @@ audioop_tomono(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &lfactor, &rfactor)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("tomono", kwnames)) {
goto exit;
}
return_value = audioop_tomono_impl(module, &fragment, width, lfactor, rfactor);
exit:
@ -477,7 +529,7 @@ audioop_tostereo_impl(PyObject *module, Py_buffer *fragment, int width,
double lfactor, double rfactor);
static PyObject *
audioop_tostereo(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_tostereo(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -489,6 +541,10 @@ audioop_tostereo(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &lfactor, &rfactor)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("tostereo", kwnames)) {
goto exit;
}
return_value = audioop_tostereo_impl(module, &fragment, width, lfactor, rfactor);
exit:
@ -514,7 +570,7 @@ audioop_add_impl(PyObject *module, Py_buffer *fragment1,
Py_buffer *fragment2, int width);
static PyObject *
audioop_add(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_add(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment1 = {NULL, NULL};
@ -525,6 +581,10 @@ audioop_add(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment1, &fragment2, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("add", kwnames)) {
goto exit;
}
return_value = audioop_add_impl(module, &fragment1, &fragment2, width);
exit:
@ -553,7 +613,7 @@ static PyObject *
audioop_bias_impl(PyObject *module, Py_buffer *fragment, int width, int bias);
static PyObject *
audioop_bias(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_bias(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -564,6 +624,10 @@ audioop_bias(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &bias)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("bias", kwnames)) {
goto exit;
}
return_value = audioop_bias_impl(module, &fragment, width, bias);
exit:
@ -588,7 +652,7 @@ static PyObject *
audioop_reverse_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_reverse(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_reverse(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -598,6 +662,10 @@ audioop_reverse(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("reverse", kwnames)) {
goto exit;
}
return_value = audioop_reverse_impl(module, &fragment, width);
exit:
@ -622,7 +690,7 @@ static PyObject *
audioop_byteswap_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_byteswap(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_byteswap(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -632,6 +700,10 @@ audioop_byteswap(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("byteswap", kwnames)) {
goto exit;
}
return_value = audioop_byteswap_impl(module, &fragment, width);
exit:
@ -657,7 +729,7 @@ audioop_lin2lin_impl(PyObject *module, Py_buffer *fragment, int width,
int newwidth);
static PyObject *
audioop_lin2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_lin2lin(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -668,6 +740,10 @@ audioop_lin2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &newwidth)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("lin2lin", kwnames)) {
goto exit;
}
return_value = audioop_lin2lin_impl(module, &fragment, width, newwidth);
exit:
@ -695,7 +771,7 @@ audioop_ratecv_impl(PyObject *module, Py_buffer *fragment, int width,
int weightA, int weightB);
static PyObject *
audioop_ratecv(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_ratecv(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -711,6 +787,10 @@ audioop_ratecv(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &nchannels, &inrate, &outrate, &state, &weightA, &weightB)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("ratecv", kwnames)) {
goto exit;
}
return_value = audioop_ratecv_impl(module, &fragment, width, nchannels, inrate, outrate, state, weightA, weightB);
exit:
@ -735,7 +815,7 @@ static PyObject *
audioop_lin2ulaw_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_lin2ulaw(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_lin2ulaw(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -745,6 +825,10 @@ audioop_lin2ulaw(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("lin2ulaw", kwnames)) {
goto exit;
}
return_value = audioop_lin2ulaw_impl(module, &fragment, width);
exit:
@ -769,7 +853,7 @@ static PyObject *
audioop_ulaw2lin_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_ulaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_ulaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -779,6 +863,10 @@ audioop_ulaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("ulaw2lin", kwnames)) {
goto exit;
}
return_value = audioop_ulaw2lin_impl(module, &fragment, width);
exit:
@ -803,7 +891,7 @@ static PyObject *
audioop_lin2alaw_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_lin2alaw(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_lin2alaw(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -813,6 +901,10 @@ audioop_lin2alaw(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("lin2alaw", kwnames)) {
goto exit;
}
return_value = audioop_lin2alaw_impl(module, &fragment, width);
exit:
@ -837,7 +929,7 @@ static PyObject *
audioop_alaw2lin_impl(PyObject *module, Py_buffer *fragment, int width);
static PyObject *
audioop_alaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_alaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -847,6 +939,10 @@ audioop_alaw2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("alaw2lin", kwnames)) {
goto exit;
}
return_value = audioop_alaw2lin_impl(module, &fragment, width);
exit:
@ -872,7 +968,7 @@ audioop_lin2adpcm_impl(PyObject *module, Py_buffer *fragment, int width,
PyObject *state);
static PyObject *
audioop_lin2adpcm(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_lin2adpcm(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -883,6 +979,10 @@ audioop_lin2adpcm(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &state)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("lin2adpcm", kwnames)) {
goto exit;
}
return_value = audioop_lin2adpcm_impl(module, &fragment, width, state);
exit:
@ -908,7 +1008,7 @@ audioop_adpcm2lin_impl(PyObject *module, Py_buffer *fragment, int width,
PyObject *state);
static PyObject *
audioop_adpcm2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
audioop_adpcm2lin(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_buffer fragment = {NULL, NULL};
@ -919,6 +1019,10 @@ audioop_adpcm2lin(PyObject *module, PyObject **args, Py_ssize_t nargs)
&fragment, &width, &state)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("adpcm2lin", kwnames)) {
goto exit;
}
return_value = audioop_adpcm2lin_impl(module, &fragment, width, state);
exit:
@ -929,4 +1033,4 @@ exit:
return return_value;
}
/*[clinic end generated code: output=e2076026235d7f0f input=a9049054013a1b77]*/
/*[clinic end generated code: output=ee7c63ec28a11b78 input=a9049054013a1b77]*/