summaryrefslogtreecommitdiffstats
path: root/Python/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-07-07 15:20:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-07-07 15:20:03 (GMT)
commit2954f8399914c77e048f9e3358abfadb7a3f76e9 (patch)
treec8398eb8aa516e897bbafe9e43cb115d0365bcb0 /Python/clinic
parent50600a78cb6b0e4ea47033a2fd5e982c20a5d946 (diff)
parent1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb (diff)
downloadcpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.zip
cpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.tar.gz
cpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.tar.bz2
- Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic. Patch by Petr Viktorin.
Diffstat (limited to 'Python/clinic')
-rw-r--r--Python/clinic/bltinmodule.c.h71
-rw-r--r--Python/clinic/import.c.h54
2 files changed, 62 insertions, 63 deletions
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index 6df3ef5..529274f 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -83,11 +83,10 @@ PyDoc_STRVAR(builtin_format__doc__,
{"format", (PyCFunction)builtin_format, METH_VARARGS, builtin_format__doc__},
static PyObject *
-builtin_format_impl(PyModuleDef *module, PyObject *value,
- PyObject *format_spec);
+builtin_format_impl(PyObject *module, PyObject *value, PyObject *format_spec);
static PyObject *
-builtin_format(PyModuleDef *module, PyObject *args)
+builtin_format(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *value;
@@ -113,10 +112,10 @@ PyDoc_STRVAR(builtin_chr__doc__,
{"chr", (PyCFunction)builtin_chr, METH_O, builtin_chr__doc__},
static PyObject *
-builtin_chr_impl(PyModuleDef *module, int i);
+builtin_chr_impl(PyObject *module, int i);
static PyObject *
-builtin_chr(PyModuleDef *module, PyObject *arg)
+builtin_chr(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int i;
@@ -152,12 +151,12 @@ PyDoc_STRVAR(builtin_compile__doc__,
{"compile", (PyCFunction)builtin_compile, METH_VARARGS|METH_KEYWORDS, builtin_compile__doc__},
static PyObject *
-builtin_compile_impl(PyModuleDef *module, PyObject *source,
- PyObject *filename, const char *mode, int flags,
- int dont_inherit, int optimize);
+builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
+ const char *mode, int flags, int dont_inherit,
+ int optimize);
static PyObject *
-builtin_compile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+builtin_compile(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", NULL};
@@ -188,10 +187,10 @@ PyDoc_STRVAR(builtin_divmod__doc__,
{"divmod", (PyCFunction)builtin_divmod, METH_VARARGS, builtin_divmod__doc__},
static PyObject *
-builtin_divmod_impl(PyModuleDef *module, PyObject *x, PyObject *y);
+builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
static PyObject *
-builtin_divmod(PyModuleDef *module, PyObject *args)
+builtin_divmod(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *x;
@@ -224,11 +223,11 @@ PyDoc_STRVAR(builtin_eval__doc__,
{"eval", (PyCFunction)builtin_eval, METH_VARARGS, builtin_eval__doc__},
static PyObject *
-builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
-builtin_eval(PyModuleDef *module, PyObject *args)
+builtin_eval(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *source;
@@ -262,11 +261,11 @@ PyDoc_STRVAR(builtin_exec__doc__,
{"exec", (PyCFunction)builtin_exec, METH_VARARGS, builtin_exec__doc__},
static PyObject *
-builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
-builtin_exec(PyModuleDef *module, PyObject *args)
+builtin_exec(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *source;
@@ -297,10 +296,10 @@ PyDoc_STRVAR(builtin_globals__doc__,
{"globals", (PyCFunction)builtin_globals, METH_NOARGS, builtin_globals__doc__},
static PyObject *
-builtin_globals_impl(PyModuleDef *module);
+builtin_globals_impl(PyObject *module);
static PyObject *
-builtin_globals(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+builtin_globals(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return builtin_globals_impl(module);
}
@@ -317,10 +316,10 @@ PyDoc_STRVAR(builtin_hasattr__doc__,
{"hasattr", (PyCFunction)builtin_hasattr, METH_VARARGS, builtin_hasattr__doc__},
static PyObject *
-builtin_hasattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name);
+builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
-builtin_hasattr(PyModuleDef *module, PyObject *args)
+builtin_hasattr(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *obj;
@@ -361,11 +360,11 @@ PyDoc_STRVAR(builtin_setattr__doc__,
{"setattr", (PyCFunction)builtin_setattr, METH_VARARGS, builtin_setattr__doc__},
static PyObject *
-builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name,
+builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
PyObject *value);
static PyObject *
-builtin_setattr(PyModuleDef *module, PyObject *args)
+builtin_setattr(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *obj;
@@ -395,10 +394,10 @@ PyDoc_STRVAR(builtin_delattr__doc__,
{"delattr", (PyCFunction)builtin_delattr, METH_VARARGS, builtin_delattr__doc__},
static PyObject *
-builtin_delattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name);
+builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
-builtin_delattr(PyModuleDef *module, PyObject *args)
+builtin_delattr(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *obj;
@@ -462,10 +461,10 @@ PyDoc_STRVAR(builtin_locals__doc__,
{"locals", (PyCFunction)builtin_locals, METH_NOARGS, builtin_locals__doc__},
static PyObject *
-builtin_locals_impl(PyModuleDef *module);
+builtin_locals_impl(PyObject *module);
static PyObject *
-builtin_locals(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+builtin_locals(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return builtin_locals_impl(module);
}
@@ -504,10 +503,10 @@ PyDoc_STRVAR(builtin_pow__doc__,
{"pow", (PyCFunction)builtin_pow, METH_VARARGS, builtin_pow__doc__},
static PyObject *
-builtin_pow_impl(PyModuleDef *module, PyObject *x, PyObject *y, PyObject *z);
+builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
static PyObject *
-builtin_pow(PyModuleDef *module, PyObject *args)
+builtin_pow(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *x;
@@ -541,10 +540,10 @@ PyDoc_STRVAR(builtin_input__doc__,
{"input", (PyCFunction)builtin_input, METH_VARARGS, builtin_input__doc__},
static PyObject *
-builtin_input_impl(PyModuleDef *module, PyObject *prompt);
+builtin_input_impl(PyObject *module, PyObject *prompt);
static PyObject *
-builtin_input(PyModuleDef *module, PyObject *args)
+builtin_input(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *prompt = NULL;
@@ -585,10 +584,10 @@ PyDoc_STRVAR(builtin_sum__doc__,
{"sum", (PyCFunction)builtin_sum, METH_VARARGS, builtin_sum__doc__},
static PyObject *
-builtin_sum_impl(PyModuleDef *module, PyObject *iterable, PyObject *start);
+builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
static PyObject *
-builtin_sum(PyModuleDef *module, PyObject *args)
+builtin_sum(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *iterable;
@@ -619,11 +618,11 @@ PyDoc_STRVAR(builtin_isinstance__doc__,
{"isinstance", (PyCFunction)builtin_isinstance, METH_VARARGS, builtin_isinstance__doc__},
static PyObject *
-builtin_isinstance_impl(PyModuleDef *module, PyObject *obj,
+builtin_isinstance_impl(PyObject *module, PyObject *obj,
PyObject *class_or_tuple);
static PyObject *
-builtin_isinstance(PyModuleDef *module, PyObject *args)
+builtin_isinstance(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *obj;
@@ -654,11 +653,11 @@ PyDoc_STRVAR(builtin_issubclass__doc__,
{"issubclass", (PyCFunction)builtin_issubclass, METH_VARARGS, builtin_issubclass__doc__},
static PyObject *
-builtin_issubclass_impl(PyModuleDef *module, PyObject *cls,
+builtin_issubclass_impl(PyObject *module, PyObject *cls,
PyObject *class_or_tuple);
static PyObject *
-builtin_issubclass(PyModuleDef *module, PyObject *args)
+builtin_issubclass(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *cls;
@@ -674,4 +673,4 @@ builtin_issubclass(PyModuleDef *module, PyObject *args)
exit:
return return_value;
}
-/*[clinic end generated code: output=940f25126caf8166 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=6ab37e6c6d2e7b19 input=a9049054013a1b77]*/
diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h
index 9b9f812..b3460b0 100644
--- a/Python/clinic/import.c.h
+++ b/Python/clinic/import.c.h
@@ -14,10 +14,10 @@ PyDoc_STRVAR(_imp_lock_held__doc__,
{"lock_held", (PyCFunction)_imp_lock_held, METH_NOARGS, _imp_lock_held__doc__},
static PyObject *
-_imp_lock_held_impl(PyModuleDef *module);
+_imp_lock_held_impl(PyObject *module);
static PyObject *
-_imp_lock_held(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+_imp_lock_held(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _imp_lock_held_impl(module);
}
@@ -35,10 +35,10 @@ PyDoc_STRVAR(_imp_acquire_lock__doc__,
{"acquire_lock", (PyCFunction)_imp_acquire_lock, METH_NOARGS, _imp_acquire_lock__doc__},
static PyObject *
-_imp_acquire_lock_impl(PyModuleDef *module);
+_imp_acquire_lock_impl(PyObject *module);
static PyObject *
-_imp_acquire_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+_imp_acquire_lock(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _imp_acquire_lock_impl(module);
}
@@ -55,10 +55,10 @@ PyDoc_STRVAR(_imp_release_lock__doc__,
{"release_lock", (PyCFunction)_imp_release_lock, METH_NOARGS, _imp_release_lock__doc__},
static PyObject *
-_imp_release_lock_impl(PyModuleDef *module);
+_imp_release_lock_impl(PyObject *module);
static PyObject *
-_imp_release_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+_imp_release_lock(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _imp_release_lock_impl(module);
}
@@ -78,11 +78,11 @@ PyDoc_STRVAR(_imp__fix_co_filename__doc__,
{"_fix_co_filename", (PyCFunction)_imp__fix_co_filename, METH_VARARGS, _imp__fix_co_filename__doc__},
static PyObject *
-_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code,
+_imp__fix_co_filename_impl(PyObject *module, PyCodeObject *code,
PyObject *path);
static PyObject *
-_imp__fix_co_filename(PyModuleDef *module, PyObject *args)
+_imp__fix_co_filename(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyCodeObject *code;
@@ -117,10 +117,10 @@ PyDoc_STRVAR(_imp_extension_suffixes__doc__,
{"extension_suffixes", (PyCFunction)_imp_extension_suffixes, METH_NOARGS, _imp_extension_suffixes__doc__},
static PyObject *
-_imp_extension_suffixes_impl(PyModuleDef *module);
+_imp_extension_suffixes_impl(PyObject *module);
static PyObject *
-_imp_extension_suffixes(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+_imp_extension_suffixes(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _imp_extension_suffixes_impl(module);
}
@@ -135,10 +135,10 @@ PyDoc_STRVAR(_imp_init_frozen__doc__,
{"init_frozen", (PyCFunction)_imp_init_frozen, METH_O, _imp_init_frozen__doc__},
static PyObject *
-_imp_init_frozen_impl(PyModuleDef *module, PyObject *name);
+_imp_init_frozen_impl(PyObject *module, PyObject *name);
static PyObject *
-_imp_init_frozen(PyModuleDef *module, PyObject *arg)
+_imp_init_frozen(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *name;
@@ -162,10 +162,10 @@ PyDoc_STRVAR(_imp_get_frozen_object__doc__,
{"get_frozen_object", (PyCFunction)_imp_get_frozen_object, METH_O, _imp_get_frozen_object__doc__},
static PyObject *
-_imp_get_frozen_object_impl(PyModuleDef *module, PyObject *name);
+_imp_get_frozen_object_impl(PyObject *module, PyObject *name);
static PyObject *
-_imp_get_frozen_object(PyModuleDef *module, PyObject *arg)
+_imp_get_frozen_object(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *name;
@@ -189,10 +189,10 @@ PyDoc_STRVAR(_imp_is_frozen_package__doc__,
{"is_frozen_package", (PyCFunction)_imp_is_frozen_package, METH_O, _imp_is_frozen_package__doc__},
static PyObject *
-_imp_is_frozen_package_impl(PyModuleDef *module, PyObject *name);
+_imp_is_frozen_package_impl(PyObject *module, PyObject *name);
static PyObject *
-_imp_is_frozen_package(PyModuleDef *module, PyObject *arg)
+_imp_is_frozen_package(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *name;
@@ -216,10 +216,10 @@ PyDoc_STRVAR(_imp_is_builtin__doc__,
{"is_builtin", (PyCFunction)_imp_is_builtin, METH_O, _imp_is_builtin__doc__},
static PyObject *
-_imp_is_builtin_impl(PyModuleDef *module, PyObject *name);
+_imp_is_builtin_impl(PyObject *module, PyObject *name);
static PyObject *
-_imp_is_builtin(PyModuleDef *module, PyObject *arg)
+_imp_is_builtin(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *name;
@@ -243,10 +243,10 @@ PyDoc_STRVAR(_imp_is_frozen__doc__,
{"is_frozen", (PyCFunction)_imp_is_frozen, METH_O, _imp_is_frozen__doc__},
static PyObject *
-_imp_is_frozen_impl(PyModuleDef *module, PyObject *name);
+_imp_is_frozen_impl(PyObject *module, PyObject *name);
static PyObject *
-_imp_is_frozen(PyModuleDef *module, PyObject *arg)
+_imp_is_frozen(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *name;
@@ -272,10 +272,10 @@ PyDoc_STRVAR(_imp_create_dynamic__doc__,
{"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_VARARGS, _imp_create_dynamic__doc__},
static PyObject *
-_imp_create_dynamic_impl(PyModuleDef *module, PyObject *spec, PyObject *file);
+_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file);
static PyObject *
-_imp_create_dynamic(PyModuleDef *module, PyObject *args)
+_imp_create_dynamic(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *spec;
@@ -306,10 +306,10 @@ PyDoc_STRVAR(_imp_exec_dynamic__doc__,
{"exec_dynamic", (PyCFunction)_imp_exec_dynamic, METH_O, _imp_exec_dynamic__doc__},
static int
-_imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod);
+_imp_exec_dynamic_impl(PyObject *module, PyObject *mod);
static PyObject *
-_imp_exec_dynamic(PyModuleDef *module, PyObject *mod)
+_imp_exec_dynamic(PyObject *module, PyObject *mod)
{
PyObject *return_value = NULL;
int _return_value;
@@ -336,10 +336,10 @@ PyDoc_STRVAR(_imp_exec_builtin__doc__,
{"exec_builtin", (PyCFunction)_imp_exec_builtin, METH_O, _imp_exec_builtin__doc__},
static int
-_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod);
+_imp_exec_builtin_impl(PyObject *module, PyObject *mod);
static PyObject *
-_imp_exec_builtin(PyModuleDef *module, PyObject *mod)
+_imp_exec_builtin(PyObject *module, PyObject *mod)
{
PyObject *return_value = NULL;
int _return_value;
@@ -361,4 +361,4 @@ exit:
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
#define _IMP_EXEC_DYNAMIC_METHODDEF
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=22a7225925755674 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d24d7f73702a907f input=a9049054013a1b77]*/