summaryrefslogtreecommitdiffstats
path: root/Python/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 09:27:36 (GMT)
committerGitHub <noreply@github.com>2018-11-27 09:27:36 (GMT)
commit4a934d490fac779d8954a8292369c4506bab23fa (patch)
treec481c9a26efba1d156bb04959a12e2aac3d2deff /Python/clinic
parentb619b097923155a7034c05c4018bf06af9f994d0 (diff)
downloadcpython-4a934d490fac779d8954a8292369c4506bab23fa.zip
cpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.gz
cpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.bz2
bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)
Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
Diffstat (limited to 'Python/clinic')
-rw-r--r--Python/clinic/_warnings.c.h4
-rw-r--r--Python/clinic/bltinmodule.c.h30
-rw-r--r--Python/clinic/context.c.h6
-rw-r--r--Python/clinic/import.c.h8
-rw-r--r--Python/clinic/marshal.c.h6
-rw-r--r--Python/clinic/sysmodule.c.h4
6 files changed, 29 insertions, 29 deletions
diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h
index 68fad23..d1e50de 100644
--- a/Python/clinic/_warnings.c.h
+++ b/Python/clinic/_warnings.c.h
@@ -9,7 +9,7 @@ PyDoc_STRVAR(warnings_warn__doc__,
"Issue a warning, or maybe ignore it or raise an exception.");
#define WARNINGS_WARN_METHODDEF \
- {"warn", (PyCFunction)warnings_warn, METH_FASTCALL|METH_KEYWORDS, warnings_warn__doc__},
+ {"warn", (PyCFunction)(void(*)(void))warnings_warn, METH_FASTCALL|METH_KEYWORDS, warnings_warn__doc__},
static PyObject *
warnings_warn_impl(PyObject *module, PyObject *message, PyObject *category,
@@ -35,4 +35,4 @@ warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec
exit:
return return_value;
}
-/*[clinic end generated code: output=86369ece63001d78 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a4fbe6e2d1cc2091 input=a9049054013a1b77]*/
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index 121bbd4..4a79861 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -82,7 +82,7 @@ PyDoc_STRVAR(builtin_format__doc__,
"details.");
#define BUILTIN_FORMAT_METHODDEF \
- {"format", (PyCFunction)builtin_format, METH_FASTCALL, builtin_format__doc__},
+ {"format", (PyCFunction)(void(*)(void))builtin_format, METH_FASTCALL, builtin_format__doc__},
static PyObject *
builtin_format_impl(PyObject *module, PyObject *value, PyObject *format_spec);
@@ -150,7 +150,7 @@ PyDoc_STRVAR(builtin_compile__doc__,
"in addition to any features explicitly specified.");
#define BUILTIN_COMPILE_METHODDEF \
- {"compile", (PyCFunction)builtin_compile, METH_FASTCALL|METH_KEYWORDS, builtin_compile__doc__},
+ {"compile", (PyCFunction)(void(*)(void))builtin_compile, METH_FASTCALL|METH_KEYWORDS, builtin_compile__doc__},
static PyObject *
builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
@@ -187,7 +187,7 @@ PyDoc_STRVAR(builtin_divmod__doc__,
"Return the tuple (x//y, x%y). Invariant: div*y + mod == x.");
#define BUILTIN_DIVMOD_METHODDEF \
- {"divmod", (PyCFunction)builtin_divmod, METH_FASTCALL, builtin_divmod__doc__},
+ {"divmod", (PyCFunction)(void(*)(void))builtin_divmod, METH_FASTCALL, builtin_divmod__doc__},
static PyObject *
builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
@@ -223,7 +223,7 @@ PyDoc_STRVAR(builtin_eval__doc__,
"If only globals is given, locals defaults to it.");
#define BUILTIN_EVAL_METHODDEF \
- {"eval", (PyCFunction)builtin_eval, METH_FASTCALL, builtin_eval__doc__},
+ {"eval", (PyCFunction)(void(*)(void))builtin_eval, METH_FASTCALL, builtin_eval__doc__},
static PyObject *
builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
@@ -261,7 +261,7 @@ PyDoc_STRVAR(builtin_exec__doc__,
"If only globals is given, locals defaults to it.");
#define BUILTIN_EXEC_METHODDEF \
- {"exec", (PyCFunction)builtin_exec, METH_FASTCALL, builtin_exec__doc__},
+ {"exec", (PyCFunction)(void(*)(void))builtin_exec, METH_FASTCALL, builtin_exec__doc__},
static PyObject *
builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
@@ -316,7 +316,7 @@ PyDoc_STRVAR(builtin_hasattr__doc__,
"This is done by calling getattr(obj, name) and catching AttributeError.");
#define BUILTIN_HASATTR_METHODDEF \
- {"hasattr", (PyCFunction)builtin_hasattr, METH_FASTCALL, builtin_hasattr__doc__},
+ {"hasattr", (PyCFunction)(void(*)(void))builtin_hasattr, METH_FASTCALL, builtin_hasattr__doc__},
static PyObject *
builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
@@ -360,7 +360,7 @@ PyDoc_STRVAR(builtin_setattr__doc__,
"setattr(x, \'y\', v) is equivalent to ``x.y = v\'\'");
#define BUILTIN_SETATTR_METHODDEF \
- {"setattr", (PyCFunction)builtin_setattr, METH_FASTCALL, builtin_setattr__doc__},
+ {"setattr", (PyCFunction)(void(*)(void))builtin_setattr, METH_FASTCALL, builtin_setattr__doc__},
static PyObject *
builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
@@ -394,7 +394,7 @@ PyDoc_STRVAR(builtin_delattr__doc__,
"delattr(x, \'y\') is equivalent to ``del x.y\'\'");
#define BUILTIN_DELATTR_METHODDEF \
- {"delattr", (PyCFunction)builtin_delattr, METH_FASTCALL, builtin_delattr__doc__},
+ {"delattr", (PyCFunction)(void(*)(void))builtin_delattr, METH_FASTCALL, builtin_delattr__doc__},
static PyObject *
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
@@ -503,7 +503,7 @@ PyDoc_STRVAR(builtin_pow__doc__,
"invoked using the three argument form.");
#define BUILTIN_POW_METHODDEF \
- {"pow", (PyCFunction)builtin_pow, METH_FASTCALL, builtin_pow__doc__},
+ {"pow", (PyCFunction)(void(*)(void))builtin_pow, METH_FASTCALL, builtin_pow__doc__},
static PyObject *
builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
@@ -540,7 +540,7 @@ PyDoc_STRVAR(builtin_input__doc__,
"On *nix systems, readline is used if available.");
#define BUILTIN_INPUT_METHODDEF \
- {"input", (PyCFunction)builtin_input, METH_FASTCALL, builtin_input__doc__},
+ {"input", (PyCFunction)(void(*)(void))builtin_input, METH_FASTCALL, builtin_input__doc__},
static PyObject *
builtin_input_impl(PyObject *module, PyObject *prompt);
@@ -583,7 +583,7 @@ PyDoc_STRVAR(builtin_round__doc__,
"the return value has the same type as the number. ndigits may be negative.");
#define BUILTIN_ROUND_METHODDEF \
- {"round", (PyCFunction)builtin_round, METH_FASTCALL|METH_KEYWORDS, builtin_round__doc__},
+ {"round", (PyCFunction)(void(*)(void))builtin_round, METH_FASTCALL|METH_KEYWORDS, builtin_round__doc__},
static PyObject *
builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits);
@@ -618,7 +618,7 @@ PyDoc_STRVAR(builtin_sum__doc__,
"reject non-numeric types.");
#define BUILTIN_SUM_METHODDEF \
- {"sum", (PyCFunction)builtin_sum, METH_FASTCALL|METH_KEYWORDS, builtin_sum__doc__},
+ {"sum", (PyCFunction)(void(*)(void))builtin_sum, METH_FASTCALL|METH_KEYWORDS, builtin_sum__doc__},
static PyObject *
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
@@ -653,7 +653,7 @@ PyDoc_STRVAR(builtin_isinstance__doc__,
"or ...`` etc.");
#define BUILTIN_ISINSTANCE_METHODDEF \
- {"isinstance", (PyCFunction)builtin_isinstance, METH_FASTCALL, builtin_isinstance__doc__},
+ {"isinstance", (PyCFunction)(void(*)(void))builtin_isinstance, METH_FASTCALL, builtin_isinstance__doc__},
static PyObject *
builtin_isinstance_impl(PyObject *module, PyObject *obj,
@@ -688,7 +688,7 @@ PyDoc_STRVAR(builtin_issubclass__doc__,
"or ...`` etc.");
#define BUILTIN_ISSUBCLASS_METHODDEF \
- {"issubclass", (PyCFunction)builtin_issubclass, METH_FASTCALL, builtin_issubclass__doc__},
+ {"issubclass", (PyCFunction)(void(*)(void))builtin_issubclass, METH_FASTCALL, builtin_issubclass__doc__},
static PyObject *
builtin_issubclass_impl(PyObject *module, PyObject *cls,
@@ -711,4 +711,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=eb6d08a32e7c83b6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fa8d97ac8695363b input=a9049054013a1b77]*/
diff --git a/Python/clinic/context.c.h b/Python/clinic/context.c.h
index 683b9d7..32b1883 100644
--- a/Python/clinic/context.c.h
+++ b/Python/clinic/context.c.h
@@ -12,7 +12,7 @@ PyDoc_STRVAR(_contextvars_Context_get__doc__,
"return None.");
#define _CONTEXTVARS_CONTEXT_GET_METHODDEF \
- {"get", (PyCFunction)_contextvars_Context_get, METH_FASTCALL, _contextvars_Context_get__doc__},
+ {"get", (PyCFunction)(void(*)(void))_contextvars_Context_get, METH_FASTCALL, _contextvars_Context_get__doc__},
static PyObject *
_contextvars_Context_get_impl(PyContext *self, PyObject *key,
@@ -123,7 +123,7 @@ PyDoc_STRVAR(_contextvars_ContextVar_get__doc__,
" * raise a LookupError.");
#define _CONTEXTVARS_CONTEXTVAR_GET_METHODDEF \
- {"get", (PyCFunction)_contextvars_ContextVar_get, METH_FASTCALL, _contextvars_ContextVar_get__doc__},
+ {"get", (PyCFunction)(void(*)(void))_contextvars_ContextVar_get, METH_FASTCALL, _contextvars_ContextVar_get__doc__},
static PyObject *
_contextvars_ContextVar_get_impl(PyContextVar *self, PyObject *default_value);
@@ -170,4 +170,4 @@ PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
-/*[clinic end generated code: output=33414d13716d0648 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9c93e22bcadbaa2b input=a9049054013a1b77]*/
diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h
index 27b83ec..1eae8f2 100644
--- a/Python/clinic/import.c.h
+++ b/Python/clinic/import.c.h
@@ -75,7 +75,7 @@ PyDoc_STRVAR(_imp__fix_co_filename__doc__,
" File path to use.");
#define _IMP__FIX_CO_FILENAME_METHODDEF \
- {"_fix_co_filename", (PyCFunction)_imp__fix_co_filename, METH_FASTCALL, _imp__fix_co_filename__doc__},
+ {"_fix_co_filename", (PyCFunction)(void(*)(void))_imp__fix_co_filename, METH_FASTCALL, _imp__fix_co_filename__doc__},
static PyObject *
_imp__fix_co_filename_impl(PyObject *module, PyCodeObject *code,
@@ -269,7 +269,7 @@ PyDoc_STRVAR(_imp_create_dynamic__doc__,
"Create an extension module.");
#define _IMP_CREATE_DYNAMIC_METHODDEF \
- {"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_FASTCALL, _imp_create_dynamic__doc__},
+ {"create_dynamic", (PyCFunction)(void(*)(void))_imp_create_dynamic, METH_FASTCALL, _imp_create_dynamic__doc__},
static PyObject *
_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file);
@@ -360,7 +360,7 @@ PyDoc_STRVAR(_imp_source_hash__doc__,
"\n");
#define _IMP_SOURCE_HASH_METHODDEF \
- {"source_hash", (PyCFunction)_imp_source_hash, METH_FASTCALL|METH_KEYWORDS, _imp_source_hash__doc__},
+ {"source_hash", (PyCFunction)(void(*)(void))_imp_source_hash, METH_FASTCALL|METH_KEYWORDS, _imp_source_hash__doc__},
static PyObject *
_imp_source_hash_impl(PyObject *module, long key, Py_buffer *source);
@@ -396,4 +396,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=f0660cd1de6b3a73 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ad747b76e105fff2 input=a9049054013a1b77]*/
diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h
index 1ae9332..0df4935 100644
--- a/Python/clinic/marshal.c.h
+++ b/Python/clinic/marshal.c.h
@@ -20,7 +20,7 @@ PyDoc_STRVAR(marshal_dump__doc__,
"to the file. The object will not be properly read back by load().");
#define MARSHAL_DUMP_METHODDEF \
- {"dump", (PyCFunction)marshal_dump, METH_FASTCALL, marshal_dump__doc__},
+ {"dump", (PyCFunction)(void(*)(void))marshal_dump, METH_FASTCALL, marshal_dump__doc__},
static PyObject *
marshal_dump_impl(PyObject *module, PyObject *value, PyObject *file,
@@ -78,7 +78,7 @@ PyDoc_STRVAR(marshal_dumps__doc__,
"unsupported type.");
#define MARSHAL_DUMPS_METHODDEF \
- {"dumps", (PyCFunction)marshal_dumps, METH_FASTCALL, marshal_dumps__doc__},
+ {"dumps", (PyCFunction)(void(*)(void))marshal_dumps, METH_FASTCALL, marshal_dumps__doc__},
static PyObject *
marshal_dumps_impl(PyObject *module, PyObject *value, int version);
@@ -134,4 +134,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=584eb2222d86fdc3 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=cbb6128201bee7e0 input=a9049054013a1b77]*/
diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h
index 3e14805..f9415ae 100644
--- a/Python/clinic/sysmodule.c.h
+++ b/Python/clinic/sysmodule.c.h
@@ -13,7 +13,7 @@ PyDoc_STRVAR(sys_set_coroutine_origin_tracking_depth__doc__,
"to disable.");
#define SYS_SET_COROUTINE_ORIGIN_TRACKING_DEPTH_METHODDEF \
- {"set_coroutine_origin_tracking_depth", (PyCFunction)sys_set_coroutine_origin_tracking_depth, METH_FASTCALL|METH_KEYWORDS, sys_set_coroutine_origin_tracking_depth__doc__},
+ {"set_coroutine_origin_tracking_depth", (PyCFunction)(void(*)(void))sys_set_coroutine_origin_tracking_depth, METH_FASTCALL|METH_KEYWORDS, sys_set_coroutine_origin_tracking_depth__doc__},
static PyObject *
sys_set_coroutine_origin_tracking_depth_impl(PyObject *module, int depth);
@@ -63,4 +63,4 @@ sys_get_coroutine_origin_tracking_depth(PyObject *module, PyObject *Py_UNUSED(ig
exit:
return return_value;
}
-/*[clinic end generated code: output=4a3ac42b97d710ff input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dfd3eb5b137a9861 input=a9049054013a1b77]*/