mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic. Patch by Petr Viktorin.
This commit is contained in:
parent
b8a2f51ceb
commit
1a2b24f02d
71 changed files with 1814 additions and 1835 deletions
|
|
@ -407,9 +407,9 @@ Return the value of sample index from the fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_getsample_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_getsample_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
Py_ssize_t index)
|
||||
/*[clinic end generated code: output=3995e189fdc8ec16 input=88edbe2871393549]*/
|
||||
/*[clinic end generated code: output=8fe1b1775134f39a input=88edbe2871393549]*/
|
||||
{
|
||||
int val;
|
||||
|
||||
|
|
@ -434,8 +434,8 @@ Return the maximum of the absolute value of all samples in a fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_max_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=85047ee1001f2305 input=32bea5ea0ac8c223]*/
|
||||
audioop_max_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=e6c5952714f1c3f0 input=32bea5ea0ac8c223]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
unsigned int absval, max = 0;
|
||||
|
|
@ -462,8 +462,8 @@ Return the minimum and maximum values of all samples in the sound fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_minmax_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=ae8f5513c64fd569 input=89848e9b927a0696]*/
|
||||
audioop_minmax_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=473fda66b15c836e input=89848e9b927a0696]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
/* -1 trick below is needed on Windows to support -0x80000000 without
|
||||
|
|
@ -491,8 +491,8 @@ Return the average over all samples in the fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_avg_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=7fccd645c95f4860 input=1114493c7611334d]*/
|
||||
audioop_avg_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=4410a4c12c3586e6 input=1114493c7611334d]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
int avg;
|
||||
|
|
@ -520,8 +520,8 @@ Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n).
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_rms_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=7b398702c81b709d input=4cc57c6c94219d78]*/
|
||||
audioop_rms_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=1e7871c826445698 input=4cc57c6c94219d78]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
unsigned int res;
|
||||
|
|
@ -594,9 +594,9 @@ Try to match reference as well as possible to a portion of fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_findfit_impl(PyModuleDef *module, Py_buffer *fragment,
|
||||
audioop_findfit_impl(PyObject *module, Py_buffer *fragment,
|
||||
Py_buffer *reference)
|
||||
/*[clinic end generated code: output=609eedf5d823d6dd input=62c305605e183c9a]*/
|
||||
/*[clinic end generated code: output=5752306d83cbbada input=62c305605e183c9a]*/
|
||||
{
|
||||
const short *cp1, *cp2;
|
||||
Py_ssize_t len1, len2;
|
||||
|
|
@ -663,9 +663,9 @@ Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_findfactor_impl(PyModuleDef *module, Py_buffer *fragment,
|
||||
audioop_findfactor_impl(PyObject *module, Py_buffer *fragment,
|
||||
Py_buffer *reference)
|
||||
/*[clinic end generated code: output=5566a8c55de54f99 input=816680301d012b21]*/
|
||||
/*[clinic end generated code: output=14ea95652c1afcf8 input=816680301d012b21]*/
|
||||
{
|
||||
const short *cp1, *cp2;
|
||||
Py_ssize_t len;
|
||||
|
|
@ -705,9 +705,9 @@ Search fragment for a slice of specified number of samples with maximum energy.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_findmax_impl(PyModuleDef *module, Py_buffer *fragment,
|
||||
audioop_findmax_impl(PyObject *module, Py_buffer *fragment,
|
||||
Py_ssize_t length)
|
||||
/*[clinic end generated code: output=01fe796fad2573bb input=2f304801ed42383c]*/
|
||||
/*[clinic end generated code: output=f008128233523040 input=2f304801ed42383c]*/
|
||||
{
|
||||
const short *cp1;
|
||||
Py_ssize_t len1;
|
||||
|
|
@ -759,8 +759,8 @@ Return the average peak-peak value over all samples in the fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_avgpp_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=06c8380fd6e34207 input=0b3cceeae420a7d9]*/
|
||||
audioop_avgpp_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=269596b0d5ae0b2b input=0b3cceeae420a7d9]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
int prevval, prevextremevalid = 0, prevextreme = 0;
|
||||
|
|
@ -816,8 +816,8 @@ Return the maximum peak-peak value in the sound fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_maxpp_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=c300c0bd7e8535c0 input=671a13e1518f80a1]*/
|
||||
audioop_maxpp_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=5b918ed5dbbdb978 input=671a13e1518f80a1]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
int prevval, prevextremevalid = 0, prevextreme = 0;
|
||||
|
|
@ -869,8 +869,8 @@ Return the number of zero crossings in the fragment passed as an argument.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_cross_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=99e6572d7d7cdbf1 input=b1b3f15b83f6b41a]*/
|
||||
audioop_cross_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=5938dcdd74a1f431 input=b1b3f15b83f6b41a]*/
|
||||
{
|
||||
Py_ssize_t i;
|
||||
int prevval;
|
||||
|
|
@ -900,9 +900,9 @@ Return a fragment that has all samples in the original fragment multiplied by th
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_mul_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_mul_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
double factor)
|
||||
/*[clinic end generated code: output=1c7c31191ac86b10 input=c726667baa157d3c]*/
|
||||
/*[clinic end generated code: output=6cd48fe796da0ea4 input=c726667baa157d3c]*/
|
||||
{
|
||||
signed char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -942,9 +942,9 @@ Convert a stereo fragment to a mono fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_tomono_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_tomono_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
double lfactor, double rfactor)
|
||||
/*[clinic end generated code: output=553f547c5e29e3b6 input=c4ec949b3f4dddfa]*/
|
||||
/*[clinic end generated code: output=235c8277216d4e4e input=c4ec949b3f4dddfa]*/
|
||||
{
|
||||
signed char *cp, *ncp;
|
||||
Py_ssize_t len, i;
|
||||
|
|
@ -991,9 +991,9 @@ Generate a stereo fragment from a mono fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_tostereo_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_tostereo_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
double lfactor, double rfactor)
|
||||
/*[clinic end generated code: output=697bb6ba41e9dd2c input=27b6395ebfdff37a]*/
|
||||
/*[clinic end generated code: output=046f13defa5f1595 input=27b6395ebfdff37a]*/
|
||||
{
|
||||
signed char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1039,9 +1039,9 @@ Return a fragment which is the addition of the two samples passed as parameters.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_add_impl(PyModuleDef *module, Py_buffer *fragment1,
|
||||
audioop_add_impl(PyObject *module, Py_buffer *fragment1,
|
||||
Py_buffer *fragment2, int width)
|
||||
/*[clinic end generated code: output=fe6c12f143e0b027 input=4a8d4bae4c1605c7]*/
|
||||
/*[clinic end generated code: output=60140af4d1aab6f2 input=4a8d4bae4c1605c7]*/
|
||||
{
|
||||
signed char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1098,9 +1098,8 @@ Return a fragment that is the original fragment with a bias added to each sample
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_bias_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
int bias)
|
||||
/*[clinic end generated code: output=ac1f4dda20a01c26 input=2b5cce5c3bb4838c]*/
|
||||
audioop_bias_impl(PyObject *module, Py_buffer *fragment, int width, int bias)
|
||||
/*[clinic end generated code: output=6e0aa8f68f045093 input=2b5cce5c3bb4838c]*/
|
||||
{
|
||||
signed char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1158,8 +1157,8 @@ Reverse the samples in a fragment and returns the modified fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_reverse_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=6ec3c91337f5925e input=668f890cf9f9d225]*/
|
||||
audioop_reverse_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=b44135698418da14 input=668f890cf9f9d225]*/
|
||||
{
|
||||
unsigned char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1191,8 +1190,8 @@ Convert big-endian samples to little-endian and vice versa.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_byteswap_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=bfe4aa584b7a3f5b input=fae7611ceffa5c82]*/
|
||||
audioop_byteswap_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=50838a9e4b87cd4d input=fae7611ceffa5c82]*/
|
||||
{
|
||||
unsigned char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1226,9 +1225,9 @@ Convert samples between 1-, 2-, 3- and 4-byte formats.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_lin2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_lin2lin_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
int newwidth)
|
||||
/*[clinic end generated code: output=cb6ca950d1df9898 input=5ce08c8aa2f24d96]*/
|
||||
/*[clinic end generated code: output=17b14109248f1d99 input=5ce08c8aa2f24d96]*/
|
||||
{
|
||||
unsigned char *ncp;
|
||||
Py_ssize_t i, j;
|
||||
|
|
@ -1284,10 +1283,10 @@ Convert the frame rate of the input fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_ratecv_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
int nchannels, int inrate, int outrate, PyObject *state,
|
||||
int weightA, int weightB)
|
||||
/*[clinic end generated code: output=59e1787bfa49b9d9 input=aff3acdc94476191]*/
|
||||
/*[clinic end generated code: output=624038e843243139 input=aff3acdc94476191]*/
|
||||
{
|
||||
char *cp, *ncp;
|
||||
Py_ssize_t len;
|
||||
|
|
@ -1465,8 +1464,8 @@ Convert samples in the audio fragment to u-LAW encoding.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_lin2ulaw_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=26263cc877c5e1bc input=2450d1b870b6bac2]*/
|
||||
audioop_lin2ulaw_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=14fb62b16fe8ea8e input=2450d1b870b6bac2]*/
|
||||
{
|
||||
unsigned char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1498,8 +1497,8 @@ Convert sound fragments in u-LAW encoding to linearly encoded sound fragments.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_ulaw2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=9864cb34e3a1d876 input=45d53ddce5be7d06]*/
|
||||
audioop_ulaw2lin_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=378356b047521ba2 input=45d53ddce5be7d06]*/
|
||||
{
|
||||
unsigned char *cp;
|
||||
signed char *ncp;
|
||||
|
|
@ -1538,8 +1537,8 @@ Convert samples in the audio fragment to a-LAW encoding.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_lin2alaw_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=d5bf14bd0fe6fdcd input=ffb1ef8bb39da945]*/
|
||||
audioop_lin2alaw_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=d076f130121a82f0 input=ffb1ef8bb39da945]*/
|
||||
{
|
||||
unsigned char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1571,8 +1570,8 @@ Convert sound fragments in a-LAW encoding to linearly encoded sound fragments.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_alaw2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=d2b604ddd036e1cd input=4140626046cd1772]*/
|
||||
audioop_alaw2lin_impl(PyObject *module, Py_buffer *fragment, int width)
|
||||
/*[clinic end generated code: output=85c365ec559df647 input=4140626046cd1772]*/
|
||||
{
|
||||
unsigned char *cp;
|
||||
signed char *ncp;
|
||||
|
|
@ -1613,9 +1612,9 @@ Convert samples to 4 bit Intel/DVI ADPCM encoding.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_lin2adpcm_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_lin2adpcm_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
PyObject *state)
|
||||
/*[clinic end generated code: output=93f0996f592b5ce5 input=12919d549b90c90a]*/
|
||||
/*[clinic end generated code: output=cc19f159f16c6793 input=12919d549b90c90a]*/
|
||||
{
|
||||
signed char *ncp;
|
||||
Py_ssize_t i;
|
||||
|
|
@ -1741,9 +1740,9 @@ Decode an Intel/DVI ADPCM coded fragment to a linear fragment.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
audioop_adpcm2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
|
||||
audioop_adpcm2lin_impl(PyObject *module, Py_buffer *fragment, int width,
|
||||
PyObject *state)
|
||||
/*[clinic end generated code: output=236cf6dc2c829181 input=f5221144f5ca9ef0]*/
|
||||
/*[clinic end generated code: output=3440ea105acb3456 input=f5221144f5ca9ef0]*/
|
||||
{
|
||||
signed char *cp;
|
||||
signed char *ncp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue