gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)

Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).
This commit is contained in:
Victor Stinner 2022-05-03 20:25:41 +02:00 committed by GitHub
parent c278474df9
commit b270b82f11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 978 additions and 975 deletions

View file

@ -200,7 +200,7 @@ PyDoc_STRVAR(bytearray_translate__doc__,
"The remaining characters are mapped through the given translation table.");
#define BYTEARRAY_TRANSLATE_METHODDEF \
{"translate", (PyCFunction)(void(*)(void))bytearray_translate, METH_FASTCALL|METH_KEYWORDS, bytearray_translate__doc__},
{"translate", _PyCFunction_CAST(bytearray_translate), METH_FASTCALL|METH_KEYWORDS, bytearray_translate__doc__},
static PyObject *
bytearray_translate_impl(PyByteArrayObject *self, PyObject *table,
@ -245,7 +245,7 @@ PyDoc_STRVAR(bytearray_maketrans__doc__,
"The bytes objects frm and to must be of the same length.");
#define BYTEARRAY_MAKETRANS_METHODDEF \
{"maketrans", (PyCFunction)(void(*)(void))bytearray_maketrans, METH_FASTCALL|METH_STATIC, bytearray_maketrans__doc__},
{"maketrans", _PyCFunction_CAST(bytearray_maketrans), METH_FASTCALL|METH_STATIC, bytearray_maketrans__doc__},
static PyObject *
bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to);
@ -303,7 +303,7 @@ PyDoc_STRVAR(bytearray_replace__doc__,
"replaced.");
#define BYTEARRAY_REPLACE_METHODDEF \
{"replace", (PyCFunction)(void(*)(void))bytearray_replace, METH_FASTCALL, bytearray_replace__doc__},
{"replace", _PyCFunction_CAST(bytearray_replace), METH_FASTCALL, bytearray_replace__doc__},
static PyObject *
bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
@ -380,7 +380,7 @@ PyDoc_STRVAR(bytearray_split__doc__,
" -1 (the default value) means no limit.");
#define BYTEARRAY_SPLIT_METHODDEF \
{"split", (PyCFunction)(void(*)(void))bytearray_split, METH_FASTCALL|METH_KEYWORDS, bytearray_split__doc__},
{"split", _PyCFunction_CAST(bytearray_split), METH_FASTCALL|METH_KEYWORDS, bytearray_split__doc__},
static PyObject *
bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
@ -479,7 +479,7 @@ PyDoc_STRVAR(bytearray_rsplit__doc__,
"Splitting is done starting at the end of the bytearray and working to the front.");
#define BYTEARRAY_RSPLIT_METHODDEF \
{"rsplit", (PyCFunction)(void(*)(void))bytearray_rsplit, METH_FASTCALL|METH_KEYWORDS, bytearray_rsplit__doc__},
{"rsplit", _PyCFunction_CAST(bytearray_rsplit), METH_FASTCALL|METH_KEYWORDS, bytearray_rsplit__doc__},
static PyObject *
bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
@ -558,7 +558,7 @@ PyDoc_STRVAR(bytearray_insert__doc__,
" The item to be inserted.");
#define BYTEARRAY_INSERT_METHODDEF \
{"insert", (PyCFunction)(void(*)(void))bytearray_insert, METH_FASTCALL, bytearray_insert__doc__},
{"insert", _PyCFunction_CAST(bytearray_insert), METH_FASTCALL, bytearray_insert__doc__},
static PyObject *
bytearray_insert_impl(PyByteArrayObject *self, Py_ssize_t index, int item);
@ -649,7 +649,7 @@ PyDoc_STRVAR(bytearray_pop__doc__,
"If no index argument is given, will pop the last item.");
#define BYTEARRAY_POP_METHODDEF \
{"pop", (PyCFunction)(void(*)(void))bytearray_pop, METH_FASTCALL, bytearray_pop__doc__},
{"pop", _PyCFunction_CAST(bytearray_pop), METH_FASTCALL, bytearray_pop__doc__},
static PyObject *
bytearray_pop_impl(PyByteArrayObject *self, Py_ssize_t index);
@ -724,7 +724,7 @@ PyDoc_STRVAR(bytearray_strip__doc__,
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
#define BYTEARRAY_STRIP_METHODDEF \
{"strip", (PyCFunction)(void(*)(void))bytearray_strip, METH_FASTCALL, bytearray_strip__doc__},
{"strip", _PyCFunction_CAST(bytearray_strip), METH_FASTCALL, bytearray_strip__doc__},
static PyObject *
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes);
@ -758,7 +758,7 @@ PyDoc_STRVAR(bytearray_lstrip__doc__,
"If the argument is omitted or None, strip leading ASCII whitespace.");
#define BYTEARRAY_LSTRIP_METHODDEF \
{"lstrip", (PyCFunction)(void(*)(void))bytearray_lstrip, METH_FASTCALL, bytearray_lstrip__doc__},
{"lstrip", _PyCFunction_CAST(bytearray_lstrip), METH_FASTCALL, bytearray_lstrip__doc__},
static PyObject *
bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes);
@ -792,7 +792,7 @@ PyDoc_STRVAR(bytearray_rstrip__doc__,
"If the argument is omitted or None, strip trailing ASCII whitespace.");
#define BYTEARRAY_RSTRIP_METHODDEF \
{"rstrip", (PyCFunction)(void(*)(void))bytearray_rstrip, METH_FASTCALL, bytearray_rstrip__doc__},
{"rstrip", _PyCFunction_CAST(bytearray_rstrip), METH_FASTCALL, bytearray_rstrip__doc__},
static PyObject *
bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes);
@ -833,7 +833,7 @@ PyDoc_STRVAR(bytearray_decode__doc__,
" can handle UnicodeDecodeErrors.");
#define BYTEARRAY_DECODE_METHODDEF \
{"decode", (PyCFunction)(void(*)(void))bytearray_decode, METH_FASTCALL|METH_KEYWORDS, bytearray_decode__doc__},
{"decode", _PyCFunction_CAST(bytearray_decode), METH_FASTCALL|METH_KEYWORDS, bytearray_decode__doc__},
static PyObject *
bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
@ -918,7 +918,7 @@ PyDoc_STRVAR(bytearray_splitlines__doc__,
"true.");
#define BYTEARRAY_SPLITLINES_METHODDEF \
{"splitlines", (PyCFunction)(void(*)(void))bytearray_splitlines, METH_FASTCALL|METH_KEYWORDS, bytearray_splitlines__doc__},
{"splitlines", _PyCFunction_CAST(bytearray_splitlines), METH_FASTCALL|METH_KEYWORDS, bytearray_splitlines__doc__},
static PyObject *
bytearray_splitlines_impl(PyByteArrayObject *self, int keepends);
@ -1010,7 +1010,7 @@ PyDoc_STRVAR(bytearray_hex__doc__,
"\'b901:ef\'");
#define BYTEARRAY_HEX_METHODDEF \
{"hex", (PyCFunction)(void(*)(void))bytearray_hex, METH_FASTCALL|METH_KEYWORDS, bytearray_hex__doc__},
{"hex", _PyCFunction_CAST(bytearray_hex), METH_FASTCALL|METH_KEYWORDS, bytearray_hex__doc__},
static PyObject *
bytearray_hex_impl(PyByteArrayObject *self, PyObject *sep, int bytes_per_sep);
@ -1075,7 +1075,7 @@ PyDoc_STRVAR(bytearray_reduce_ex__doc__,
"Return state information for pickling.");
#define BYTEARRAY_REDUCE_EX_METHODDEF \
{"__reduce_ex__", (PyCFunction)(void(*)(void))bytearray_reduce_ex, METH_FASTCALL, bytearray_reduce_ex__doc__},
{"__reduce_ex__", _PyCFunction_CAST(bytearray_reduce_ex), METH_FASTCALL, bytearray_reduce_ex__doc__},
static PyObject *
bytearray_reduce_ex_impl(PyByteArrayObject *self, int proto);
@ -1120,4 +1120,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
{
return bytearray_sizeof_impl(self);
}
/*[clinic end generated code: output=a82659f581e55629 input=a9049054013a1b77]*/
/*[clinic end generated code: output=033e9eb5f2bb0139 input=a9049054013a1b77]*/

View file

@ -35,7 +35,7 @@ PyDoc_STRVAR(bytes_split__doc__,
" -1 (the default value) means no limit.");
#define BYTES_SPLIT_METHODDEF \
{"split", (PyCFunction)(void(*)(void))bytes_split, METH_FASTCALL|METH_KEYWORDS, bytes_split__doc__},
{"split", _PyCFunction_CAST(bytes_split), METH_FASTCALL|METH_KEYWORDS, bytes_split__doc__},
static PyObject *
bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
@ -186,7 +186,7 @@ PyDoc_STRVAR(bytes_rsplit__doc__,
"Splitting is done starting at the end of the bytes and working to the front.");
#define BYTES_RSPLIT_METHODDEF \
{"rsplit", (PyCFunction)(void(*)(void))bytes_rsplit, METH_FASTCALL|METH_KEYWORDS, bytes_rsplit__doc__},
{"rsplit", _PyCFunction_CAST(bytes_rsplit), METH_FASTCALL|METH_KEYWORDS, bytes_rsplit__doc__},
static PyObject *
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
@ -258,7 +258,7 @@ PyDoc_STRVAR(bytes_strip__doc__,
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
#define BYTES_STRIP_METHODDEF \
{"strip", (PyCFunction)(void(*)(void))bytes_strip, METH_FASTCALL, bytes_strip__doc__},
{"strip", _PyCFunction_CAST(bytes_strip), METH_FASTCALL, bytes_strip__doc__},
static PyObject *
bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
@ -292,7 +292,7 @@ PyDoc_STRVAR(bytes_lstrip__doc__,
"If the argument is omitted or None, strip leading ASCII whitespace.");
#define BYTES_LSTRIP_METHODDEF \
{"lstrip", (PyCFunction)(void(*)(void))bytes_lstrip, METH_FASTCALL, bytes_lstrip__doc__},
{"lstrip", _PyCFunction_CAST(bytes_lstrip), METH_FASTCALL, bytes_lstrip__doc__},
static PyObject *
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
@ -326,7 +326,7 @@ PyDoc_STRVAR(bytes_rstrip__doc__,
"If the argument is omitted or None, strip trailing ASCII whitespace.");
#define BYTES_RSTRIP_METHODDEF \
{"rstrip", (PyCFunction)(void(*)(void))bytes_rstrip, METH_FASTCALL, bytes_rstrip__doc__},
{"rstrip", _PyCFunction_CAST(bytes_rstrip), METH_FASTCALL, bytes_rstrip__doc__},
static PyObject *
bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
@ -364,7 +364,7 @@ PyDoc_STRVAR(bytes_translate__doc__,
"The remaining characters are mapped through the given translation table.");
#define BYTES_TRANSLATE_METHODDEF \
{"translate", (PyCFunction)(void(*)(void))bytes_translate, METH_FASTCALL|METH_KEYWORDS, bytes_translate__doc__},
{"translate", _PyCFunction_CAST(bytes_translate), METH_FASTCALL|METH_KEYWORDS, bytes_translate__doc__},
static PyObject *
bytes_translate_impl(PyBytesObject *self, PyObject *table,
@ -409,7 +409,7 @@ PyDoc_STRVAR(bytes_maketrans__doc__,
"The bytes objects frm and to must be of the same length.");
#define BYTES_MAKETRANS_METHODDEF \
{"maketrans", (PyCFunction)(void(*)(void))bytes_maketrans, METH_FASTCALL|METH_STATIC, bytes_maketrans__doc__},
{"maketrans", _PyCFunction_CAST(bytes_maketrans), METH_FASTCALL|METH_STATIC, bytes_maketrans__doc__},
static PyObject *
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to);
@ -467,7 +467,7 @@ PyDoc_STRVAR(bytes_replace__doc__,
"replaced.");
#define BYTES_REPLACE_METHODDEF \
{"replace", (PyCFunction)(void(*)(void))bytes_replace, METH_FASTCALL, bytes_replace__doc__},
{"replace", _PyCFunction_CAST(bytes_replace), METH_FASTCALL, bytes_replace__doc__},
static PyObject *
bytes_replace_impl(PyBytesObject *self, Py_buffer *old, Py_buffer *new,
@ -624,7 +624,7 @@ PyDoc_STRVAR(bytes_decode__doc__,
" can handle UnicodeDecodeErrors.");
#define BYTES_DECODE_METHODDEF \
{"decode", (PyCFunction)(void(*)(void))bytes_decode, METH_FASTCALL|METH_KEYWORDS, bytes_decode__doc__},
{"decode", _PyCFunction_CAST(bytes_decode), METH_FASTCALL|METH_KEYWORDS, bytes_decode__doc__},
static PyObject *
bytes_decode_impl(PyBytesObject *self, const char *encoding,
@ -696,7 +696,7 @@ PyDoc_STRVAR(bytes_splitlines__doc__,
"true.");
#define BYTES_SPLITLINES_METHODDEF \
{"splitlines", (PyCFunction)(void(*)(void))bytes_splitlines, METH_FASTCALL|METH_KEYWORDS, bytes_splitlines__doc__},
{"splitlines", _PyCFunction_CAST(bytes_splitlines), METH_FASTCALL|METH_KEYWORDS, bytes_splitlines__doc__},
static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends);
@ -788,7 +788,7 @@ PyDoc_STRVAR(bytes_hex__doc__,
"\'b901:ef\'");
#define BYTES_HEX_METHODDEF \
{"hex", (PyCFunction)(void(*)(void))bytes_hex, METH_FASTCALL|METH_KEYWORDS, bytes_hex__doc__},
{"hex", _PyCFunction_CAST(bytes_hex), METH_FASTCALL|METH_KEYWORDS, bytes_hex__doc__},
static PyObject *
bytes_hex_impl(PyBytesObject *self, PyObject *sep, int bytes_per_sep);
@ -896,4 +896,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=d706344859f40122 input=a9049054013a1b77]*/
/*[clinic end generated code: output=5727702e63a0a8b7 input=a9049054013a1b77]*/

View file

@ -168,7 +168,7 @@ PyDoc_STRVAR(code_replace__doc__,
"Return a copy of the code object with new values for the specified fields.");
#define CODE_REPLACE_METHODDEF \
{"replace", (PyCFunction)(void(*)(void))code_replace, METH_FASTCALL|METH_KEYWORDS, code_replace__doc__},
{"replace", _PyCFunction_CAST(code_replace), METH_FASTCALL|METH_KEYWORDS, code_replace__doc__},
static PyObject *
code_replace_impl(PyCodeObject *self, int co_argcount,
@ -409,7 +409,7 @@ PyDoc_STRVAR(code__varname_from_oparg__doc__,
"WARNING: this method is for internal use only and may change or go away.");
#define CODE__VARNAME_FROM_OPARG_METHODDEF \
{"_varname_from_oparg", (PyCFunction)(void(*)(void))code__varname_from_oparg, METH_FASTCALL|METH_KEYWORDS, code__varname_from_oparg__doc__},
{"_varname_from_oparg", _PyCFunction_CAST(code__varname_from_oparg), METH_FASTCALL|METH_KEYWORDS, code__varname_from_oparg__doc__},
static PyObject *
code__varname_from_oparg_impl(PyCodeObject *self, int oparg);
@ -436,4 +436,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n
exit:
return return_value;
}
/*[clinic end generated code: output=ebfeec29d2cff674 input=a9049054013a1b77]*/
/*[clinic end generated code: output=9c521b6c79f90ff7 input=a9049054013a1b77]*/

View file

@ -9,7 +9,7 @@ PyDoc_STRVAR(dict_fromkeys__doc__,
"Create a new dictionary with keys from iterable and values set to value.");
#define DICT_FROMKEYS_METHODDEF \
{"fromkeys", (PyCFunction)(void(*)(void))dict_fromkeys, METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
{"fromkeys", _PyCFunction_CAST(dict_fromkeys), METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
@ -52,7 +52,7 @@ PyDoc_STRVAR(dict_get__doc__,
"Return the value for key if key is in the dictionary, else default.");
#define DICT_GET_METHODDEF \
{"get", (PyCFunction)(void(*)(void))dict_get, METH_FASTCALL, dict_get__doc__},
{"get", _PyCFunction_CAST(dict_get), METH_FASTCALL, dict_get__doc__},
static PyObject *
dict_get_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
@ -88,7 +88,7 @@ PyDoc_STRVAR(dict_setdefault__doc__,
"Return the value for key if key is in the dictionary, else default.");
#define DICT_SETDEFAULT_METHODDEF \
{"setdefault", (PyCFunction)(void(*)(void))dict_setdefault, METH_FASTCALL, dict_setdefault__doc__},
{"setdefault", _PyCFunction_CAST(dict_setdefault), METH_FASTCALL, dict_setdefault__doc__},
static PyObject *
dict_setdefault_impl(PyDictObject *self, PyObject *key,
@ -126,7 +126,7 @@ PyDoc_STRVAR(dict_pop__doc__,
"raise a KeyError.");
#define DICT_POP_METHODDEF \
{"pop", (PyCFunction)(void(*)(void))dict_pop, METH_FASTCALL, dict_pop__doc__},
{"pop", _PyCFunction_CAST(dict_pop), METH_FASTCALL, dict_pop__doc__},
static PyObject *
dict_pop_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
@ -191,4 +191,4 @@ dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored))
{
return dict___reversed___impl(self);
}
/*[clinic end generated code: output=7b77c16e43d6735a input=a9049054013a1b77]*/
/*[clinic end generated code: output=582766ac0154c8bf input=a9049054013a1b77]*/

View file

@ -83,7 +83,7 @@ PyDoc_STRVAR(float___round____doc__,
"When an argument is passed, work like built-in round(x, ndigits).");
#define FLOAT___ROUND___METHODDEF \
{"__round__", (PyCFunction)(void(*)(void))float___round__, METH_FASTCALL, float___round____doc__},
{"__round__", _PyCFunction_CAST(float___round__), METH_FASTCALL, float___round____doc__},
static PyObject *
float___round___impl(PyObject *self, PyObject *o_ndigits);
@ -321,4 +321,4 @@ float___format__(PyObject *self, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=604cb27bf751ea16 input=a9049054013a1b77]*/
/*[clinic end generated code: output=a6e6467624a92a43 input=a9049054013a1b77]*/

View file

@ -9,7 +9,7 @@ PyDoc_STRVAR(list_insert__doc__,
"Insert object before index.");
#define LIST_INSERT_METHODDEF \
{"insert", (PyCFunction)(void(*)(void))list_insert, METH_FASTCALL, list_insert__doc__},
{"insert", _PyCFunction_CAST(list_insert), METH_FASTCALL, list_insert__doc__},
static PyObject *
list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object);
@ -106,7 +106,7 @@ PyDoc_STRVAR(list_pop__doc__,
"Raises IndexError if list is empty or index is out of range.");
#define LIST_POP_METHODDEF \
{"pop", (PyCFunction)(void(*)(void))list_pop, METH_FASTCALL, list_pop__doc__},
{"pop", _PyCFunction_CAST(list_pop), METH_FASTCALL, list_pop__doc__},
static PyObject *
list_pop_impl(PyListObject *self, Py_ssize_t index);
@ -157,7 +157,7 @@ PyDoc_STRVAR(list_sort__doc__,
"The reverse flag can be set to sort in descending order.");
#define LIST_SORT_METHODDEF \
{"sort", (PyCFunction)(void(*)(void))list_sort, METH_FASTCALL|METH_KEYWORDS, list_sort__doc__},
{"sort", _PyCFunction_CAST(list_sort), METH_FASTCALL|METH_KEYWORDS, list_sort__doc__},
static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse);
@ -224,7 +224,7 @@ PyDoc_STRVAR(list_index__doc__,
"Raises ValueError if the value is not present.");
#define LIST_INDEX_METHODDEF \
{"index", (PyCFunction)(void(*)(void))list_index, METH_FASTCALL, list_index__doc__},
{"index", _PyCFunction_CAST(list_index), METH_FASTCALL, list_index__doc__},
static PyObject *
list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start,
@ -353,4 +353,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored))
{
return list___reversed___impl(self);
}
/*[clinic end generated code: output=acb2f87736311930 input=a9049054013a1b77]*/
/*[clinic end generated code: output=eab97a76b1568a03 input=a9049054013a1b77]*/

View file

@ -96,7 +96,7 @@ PyDoc_STRVAR(int___round____doc__,
"Rounding with an ndigits argument also returns an integer.");
#define INT___ROUND___METHODDEF \
{"__round__", (PyCFunction)(void(*)(void))int___round__, METH_FASTCALL, int___round____doc__},
{"__round__", _PyCFunction_CAST(int___round__), METH_FASTCALL, int___round____doc__},
static PyObject *
int___round___impl(PyObject *self, PyObject *o_ndigits);
@ -247,7 +247,7 @@ PyDoc_STRVAR(int_to_bytes__doc__,
" is raised.");
#define INT_TO_BYTES_METHODDEF \
{"to_bytes", (PyCFunction)(void(*)(void))int_to_bytes, METH_FASTCALL|METH_KEYWORDS, int_to_bytes__doc__},
{"to_bytes", _PyCFunction_CAST(int_to_bytes), METH_FASTCALL|METH_KEYWORDS, int_to_bytes__doc__},
static PyObject *
int_to_bytes_impl(PyObject *self, Py_ssize_t length, PyObject *byteorder,
@ -338,7 +338,7 @@ PyDoc_STRVAR(int_from_bytes__doc__,
" Indicates whether two\'s complement is used to represent the integer.");
#define INT_FROM_BYTES_METHODDEF \
{"from_bytes", (PyCFunction)(void(*)(void))int_from_bytes, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, int_from_bytes__doc__},
{"from_bytes", _PyCFunction_CAST(int_from_bytes), METH_FASTCALL|METH_KEYWORDS|METH_CLASS, int_from_bytes__doc__},
static PyObject *
int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
@ -391,4 +391,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
/*[clinic end generated code: output=16a375d93769b227 input=a9049054013a1b77]*/
/*[clinic end generated code: output=899e57c41861a8e9 input=a9049054013a1b77]*/

View file

@ -58,7 +58,7 @@ PyDoc_STRVAR(memoryview_cast__doc__,
"Cast a memoryview to a new format or shape.");
#define MEMORYVIEW_CAST_METHODDEF \
{"cast", (PyCFunction)(void(*)(void))memoryview_cast, METH_FASTCALL|METH_KEYWORDS, memoryview_cast__doc__},
{"cast", _PyCFunction_CAST(memoryview_cast), METH_FASTCALL|METH_KEYWORDS, memoryview_cast__doc__},
static PyObject *
memoryview_cast_impl(PyMemoryViewObject *self, PyObject *format,
@ -147,7 +147,7 @@ PyDoc_STRVAR(memoryview_tobytes__doc__,
"to C first. order=None is the same as order=\'C\'.");
#define MEMORYVIEW_TOBYTES_METHODDEF \
{"tobytes", (PyCFunction)(void(*)(void))memoryview_tobytes, METH_FASTCALL|METH_KEYWORDS, memoryview_tobytes__doc__},
{"tobytes", _PyCFunction_CAST(memoryview_tobytes), METH_FASTCALL|METH_KEYWORDS, memoryview_tobytes__doc__},
static PyObject *
memoryview_tobytes_impl(PyMemoryViewObject *self, const char *order);
@ -218,7 +218,7 @@ PyDoc_STRVAR(memoryview_hex__doc__,
"\'b901:ef\'");
#define MEMORYVIEW_HEX_METHODDEF \
{"hex", (PyCFunction)(void(*)(void))memoryview_hex, METH_FASTCALL|METH_KEYWORDS, memoryview_hex__doc__},
{"hex", _PyCFunction_CAST(memoryview_hex), METH_FASTCALL|METH_KEYWORDS, memoryview_hex__doc__},
static PyObject *
memoryview_hex_impl(PyMemoryViewObject *self, PyObject *sep,
@ -258,4 +258,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=1b879bb934d18c66 input=a9049054013a1b77]*/
/*[clinic end generated code: output=48be570b5e6038e3 input=a9049054013a1b77]*/

View file

@ -9,7 +9,7 @@ PyDoc_STRVAR(OrderedDict_fromkeys__doc__,
"Create a new ordered dictionary with keys from iterable and values set to value.");
#define ORDEREDDICT_FROMKEYS_METHODDEF \
{"fromkeys", (PyCFunction)(void(*)(void))OrderedDict_fromkeys, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, OrderedDict_fromkeys__doc__},
{"fromkeys", _PyCFunction_CAST(OrderedDict_fromkeys), METH_FASTCALL|METH_KEYWORDS|METH_CLASS, OrderedDict_fromkeys__doc__},
static PyObject *
OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value);
@ -50,7 +50,7 @@ PyDoc_STRVAR(OrderedDict_setdefault__doc__,
"Return the value for key if key is in the dictionary, else default.");
#define ORDEREDDICT_SETDEFAULT_METHODDEF \
{"setdefault", (PyCFunction)(void(*)(void))OrderedDict_setdefault, METH_FASTCALL|METH_KEYWORDS, OrderedDict_setdefault__doc__},
{"setdefault", _PyCFunction_CAST(OrderedDict_setdefault), METH_FASTCALL|METH_KEYWORDS, OrderedDict_setdefault__doc__},
static PyObject *
OrderedDict_setdefault_impl(PyODictObject *self, PyObject *key,
@ -93,7 +93,7 @@ PyDoc_STRVAR(OrderedDict_pop__doc__,
"raise a KeyError.");
#define ORDEREDDICT_POP_METHODDEF \
{"pop", (PyCFunction)(void(*)(void))OrderedDict_pop, METH_FASTCALL|METH_KEYWORDS, OrderedDict_pop__doc__},
{"pop", _PyCFunction_CAST(OrderedDict_pop), METH_FASTCALL|METH_KEYWORDS, OrderedDict_pop__doc__},
static PyObject *
OrderedDict_pop_impl(PyODictObject *self, PyObject *key,
@ -135,7 +135,7 @@ PyDoc_STRVAR(OrderedDict_popitem__doc__,
"Pairs are returned in LIFO order if last is true or FIFO order if false.");
#define ORDEREDDICT_POPITEM_METHODDEF \
{"popitem", (PyCFunction)(void(*)(void))OrderedDict_popitem, METH_FASTCALL|METH_KEYWORDS, OrderedDict_popitem__doc__},
{"popitem", _PyCFunction_CAST(OrderedDict_popitem), METH_FASTCALL|METH_KEYWORDS, OrderedDict_popitem__doc__},
static PyObject *
OrderedDict_popitem_impl(PyODictObject *self, int last);
@ -177,7 +177,7 @@ PyDoc_STRVAR(OrderedDict_move_to_end__doc__,
"Raise KeyError if the element does not exist.");
#define ORDEREDDICT_MOVE_TO_END_METHODDEF \
{"move_to_end", (PyCFunction)(void(*)(void))OrderedDict_move_to_end, METH_FASTCALL|METH_KEYWORDS, OrderedDict_move_to_end__doc__},
{"move_to_end", _PyCFunction_CAST(OrderedDict_move_to_end), METH_FASTCALL|METH_KEYWORDS, OrderedDict_move_to_end__doc__},
static PyObject *
OrderedDict_move_to_end_impl(PyODictObject *self, PyObject *key, int last);
@ -211,4 +211,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=e0afaad5b4bb47fe input=a9049054013a1b77]*/
/*[clinic end generated code: output=4182a5dab66963d0 input=a9049054013a1b77]*/

View file

@ -11,7 +11,7 @@ PyDoc_STRVAR(tuple_index__doc__,
"Raises ValueError if the value is not present.");
#define TUPLE_INDEX_METHODDEF \
{"index", (PyCFunction)(void(*)(void))tuple_index, METH_FASTCALL, tuple_index__doc__},
{"index", _PyCFunction_CAST(tuple_index), METH_FASTCALL, tuple_index__doc__},
static PyObject *
tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
@ -112,4 +112,4 @@ tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
{
return tuple___getnewargs___impl(self);
}
/*[clinic end generated code: output=72cc0bc4f7358116 input=a9049054013a1b77]*/
/*[clinic end generated code: output=044496dc917f8a97 input=a9049054013a1b77]*/

View file

@ -89,7 +89,7 @@ PyDoc_STRVAR(unicode_center__doc__,
"Padding is done using the specified fill character (default is a space).");
#define UNICODE_CENTER_METHODDEF \
{"center", (PyCFunction)(void(*)(void))unicode_center, METH_FASTCALL, unicode_center__doc__},
{"center", _PyCFunction_CAST(unicode_center), METH_FASTCALL, unicode_center__doc__},
static PyObject *
unicode_center_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
@ -145,7 +145,7 @@ PyDoc_STRVAR(unicode_encode__doc__,
" codecs.register_error that can handle UnicodeEncodeErrors.");
#define UNICODE_ENCODE_METHODDEF \
{"encode", (PyCFunction)(void(*)(void))unicode_encode, METH_FASTCALL|METH_KEYWORDS, unicode_encode__doc__},
{"encode", _PyCFunction_CAST(unicode_encode), METH_FASTCALL|METH_KEYWORDS, unicode_encode__doc__},
static PyObject *
unicode_encode_impl(PyObject *self, const char *encoding, const char *errors);
@ -215,7 +215,7 @@ PyDoc_STRVAR(unicode_expandtabs__doc__,
"If tabsize is not given, a tab size of 8 characters is assumed.");
#define UNICODE_EXPANDTABS_METHODDEF \
{"expandtabs", (PyCFunction)(void(*)(void))unicode_expandtabs, METH_FASTCALL|METH_KEYWORDS, unicode_expandtabs__doc__},
{"expandtabs", _PyCFunction_CAST(unicode_expandtabs), METH_FASTCALL|METH_KEYWORDS, unicode_expandtabs__doc__},
static PyObject *
unicode_expandtabs_impl(PyObject *self, int tabsize);
@ -523,7 +523,7 @@ PyDoc_STRVAR(unicode_ljust__doc__,
"Padding is done using the specified fill character (default is a space).");
#define UNICODE_LJUST_METHODDEF \
{"ljust", (PyCFunction)(void(*)(void))unicode_ljust, METH_FASTCALL, unicode_ljust__doc__},
{"ljust", _PyCFunction_CAST(unicode_ljust), METH_FASTCALL, unicode_ljust__doc__},
static PyObject *
unicode_ljust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
@ -590,7 +590,7 @@ PyDoc_STRVAR(unicode_strip__doc__,
"If chars is given and not None, remove characters in chars instead.");
#define UNICODE_STRIP_METHODDEF \
{"strip", (PyCFunction)(void(*)(void))unicode_strip, METH_FASTCALL, unicode_strip__doc__},
{"strip", _PyCFunction_CAST(unicode_strip), METH_FASTCALL, unicode_strip__doc__},
static PyObject *
unicode_strip_impl(PyObject *self, PyObject *chars);
@ -624,7 +624,7 @@ PyDoc_STRVAR(unicode_lstrip__doc__,
"If chars is given and not None, remove characters in chars instead.");
#define UNICODE_LSTRIP_METHODDEF \
{"lstrip", (PyCFunction)(void(*)(void))unicode_lstrip, METH_FASTCALL, unicode_lstrip__doc__},
{"lstrip", _PyCFunction_CAST(unicode_lstrip), METH_FASTCALL, unicode_lstrip__doc__},
static PyObject *
unicode_lstrip_impl(PyObject *self, PyObject *chars);
@ -658,7 +658,7 @@ PyDoc_STRVAR(unicode_rstrip__doc__,
"If chars is given and not None, remove characters in chars instead.");
#define UNICODE_RSTRIP_METHODDEF \
{"rstrip", (PyCFunction)(void(*)(void))unicode_rstrip, METH_FASTCALL, unicode_rstrip__doc__},
{"rstrip", _PyCFunction_CAST(unicode_rstrip), METH_FASTCALL, unicode_rstrip__doc__},
static PyObject *
unicode_rstrip_impl(PyObject *self, PyObject *chars);
@ -697,7 +697,7 @@ PyDoc_STRVAR(unicode_replace__doc__,
"replaced.");
#define UNICODE_REPLACE_METHODDEF \
{"replace", (PyCFunction)(void(*)(void))unicode_replace, METH_FASTCALL, unicode_replace__doc__},
{"replace", _PyCFunction_CAST(unicode_replace), METH_FASTCALL, unicode_replace__doc__},
static PyObject *
unicode_replace_impl(PyObject *self, PyObject *old, PyObject *new,
@ -832,7 +832,7 @@ PyDoc_STRVAR(unicode_rjust__doc__,
"Padding is done using the specified fill character (default is a space).");
#define UNICODE_RJUST_METHODDEF \
{"rjust", (PyCFunction)(void(*)(void))unicode_rjust, METH_FASTCALL, unicode_rjust__doc__},
{"rjust", _PyCFunction_CAST(unicode_rjust), METH_FASTCALL, unicode_rjust__doc__},
static PyObject *
unicode_rjust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
@ -893,7 +893,7 @@ PyDoc_STRVAR(unicode_split__doc__,
"the regular expression module.");
#define UNICODE_SPLIT_METHODDEF \
{"split", (PyCFunction)(void(*)(void))unicode_split, METH_FASTCALL|METH_KEYWORDS, unicode_split__doc__},
{"split", _PyCFunction_CAST(unicode_split), METH_FASTCALL|METH_KEYWORDS, unicode_split__doc__},
static PyObject *
unicode_split_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit);
@ -992,7 +992,7 @@ PyDoc_STRVAR(unicode_rsplit__doc__,
"Splitting starts at the end of the string and works to the front.");
#define UNICODE_RSPLIT_METHODDEF \
{"rsplit", (PyCFunction)(void(*)(void))unicode_rsplit, METH_FASTCALL|METH_KEYWORDS, unicode_rsplit__doc__},
{"rsplit", _PyCFunction_CAST(unicode_rsplit), METH_FASTCALL|METH_KEYWORDS, unicode_rsplit__doc__},
static PyObject *
unicode_rsplit_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit);
@ -1050,7 +1050,7 @@ PyDoc_STRVAR(unicode_splitlines__doc__,
"true.");
#define UNICODE_SPLITLINES_METHODDEF \
{"splitlines", (PyCFunction)(void(*)(void))unicode_splitlines, METH_FASTCALL|METH_KEYWORDS, unicode_splitlines__doc__},
{"splitlines", _PyCFunction_CAST(unicode_splitlines), METH_FASTCALL|METH_KEYWORDS, unicode_splitlines__doc__},
static PyObject *
unicode_splitlines_impl(PyObject *self, int keepends);
@ -1116,7 +1116,7 @@ PyDoc_STRVAR(unicode_maketrans__doc__,
"must be a string, whose characters will be mapped to None in the result.");
#define UNICODE_MAKETRANS_METHODDEF \
{"maketrans", (PyCFunction)(void(*)(void))unicode_maketrans, METH_FASTCALL|METH_STATIC, unicode_maketrans__doc__},
{"maketrans", _PyCFunction_CAST(unicode_maketrans), METH_FASTCALL|METH_STATIC, unicode_maketrans__doc__},
static PyObject *
unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z);
@ -1353,4 +1353,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=e8566b060f558f72 input=a9049054013a1b77]*/
/*[clinic end generated code: output=b5dd7cefead9a8e7 input=a9049054013a1b77]*/

View file

@ -11,7 +11,7 @@ PyDoc_STRVAR(stringlib_expandtabs__doc__,
"If tabsize is not given, a tab size of 8 characters is assumed.");
#define STRINGLIB_EXPANDTABS_METHODDEF \
{"expandtabs", (PyCFunction)(void(*)(void))stringlib_expandtabs, METH_FASTCALL|METH_KEYWORDS, stringlib_expandtabs__doc__},
{"expandtabs", _PyCFunction_CAST(stringlib_expandtabs), METH_FASTCALL|METH_KEYWORDS, stringlib_expandtabs__doc__},
static PyObject *
stringlib_expandtabs_impl(PyObject *self, int tabsize);
@ -53,7 +53,7 @@ PyDoc_STRVAR(stringlib_ljust__doc__,
"Padding is done using the specified fill character.");
#define STRINGLIB_LJUST_METHODDEF \
{"ljust", (PyCFunction)(void(*)(void))stringlib_ljust, METH_FASTCALL, stringlib_ljust__doc__},
{"ljust", _PyCFunction_CAST(stringlib_ljust), METH_FASTCALL, stringlib_ljust__doc__},
static PyObject *
stringlib_ljust_impl(PyObject *self, Py_ssize_t width, char fillchar);
@ -109,7 +109,7 @@ PyDoc_STRVAR(stringlib_rjust__doc__,
"Padding is done using the specified fill character.");
#define STRINGLIB_RJUST_METHODDEF \
{"rjust", (PyCFunction)(void(*)(void))stringlib_rjust, METH_FASTCALL, stringlib_rjust__doc__},
{"rjust", _PyCFunction_CAST(stringlib_rjust), METH_FASTCALL, stringlib_rjust__doc__},
static PyObject *
stringlib_rjust_impl(PyObject *self, Py_ssize_t width, char fillchar);
@ -165,7 +165,7 @@ PyDoc_STRVAR(stringlib_center__doc__,
"Padding is done using the specified fill character.");
#define STRINGLIB_CENTER_METHODDEF \
{"center", (PyCFunction)(void(*)(void))stringlib_center, METH_FASTCALL, stringlib_center__doc__},
{"center", _PyCFunction_CAST(stringlib_center), METH_FASTCALL, stringlib_center__doc__},
static PyObject *
stringlib_center_impl(PyObject *self, Py_ssize_t width, char fillchar);
@ -249,4 +249,4 @@ stringlib_zfill(PyObject *self, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=2d9abc7b1cffeca6 input=a9049054013a1b77]*/
/*[clinic end generated code: output=46d058103bffedf7 input=a9049054013a1b77]*/