diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-07 15:20:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-07 15:20:03 (GMT) |
commit | 2954f8399914c77e048f9e3358abfadb7a3f76e9 (patch) | |
tree | c8398eb8aa516e897bbafe9e43cb115d0365bcb0 /Python | |
parent | 50600a78cb6b0e4ea47033a2fd5e982c20a5d946 (diff) | |
parent | 1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb (diff) | |
download | cpython-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')
-rw-r--r-- | Python/bltinmodule.c | 117 | ||||
-rw-r--r-- | Python/clinic/bltinmodule.c.h | 71 | ||||
-rw-r--r-- | Python/clinic/import.c.h | 54 | ||||
-rw-r--r-- | Python/import.c | 56 |
4 files changed, 148 insertions, 150 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 7d35cdb..220c92d 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -242,8 +242,8 @@ Return the absolute value of the argument. [clinic start generated code]*/ static PyObject * -builtin_abs(PyModuleDef *module, PyObject *x) -/*[clinic end generated code: output=6833047c493ecea2 input=bed4ca14e29c20d1]*/ +builtin_abs(PyObject *module, PyObject *x) +/*[clinic end generated code: output=b1b433b9e51356f5 input=bed4ca14e29c20d1]*/ { return PyNumber_Absolute(x); } @@ -260,8 +260,8 @@ If the iterable is empty, return True. [clinic start generated code]*/ static PyObject * -builtin_all(PyModuleDef *module, PyObject *iterable) -/*[clinic end generated code: output=089e6d1b7bde27b1 input=1a7c5d1bc3438a21]*/ +builtin_all(PyObject *module, PyObject *iterable) +/*[clinic end generated code: output=ca2a7127276f79b3 input=1a7c5d1bc3438a21]*/ { PyObject *it, *item; PyObject *(*iternext)(PyObject *); @@ -309,8 +309,8 @@ If the iterable is empty, return False. [clinic start generated code]*/ static PyObject * -builtin_any(PyModuleDef *module, PyObject *iterable) -/*[clinic end generated code: output=1be994b2c2307492 input=41d7451c23384f24]*/ +builtin_any(PyObject *module, PyObject *iterable) +/*[clinic end generated code: output=fa65684748caa60e input=41d7451c23384f24]*/ { PyObject *it, *item; PyObject *(*iternext)(PyObject *); @@ -361,8 +361,8 @@ to that returned by repr() in Python 2. [clinic start generated code]*/ static PyObject * -builtin_ascii(PyModuleDef *module, PyObject *obj) -/*[clinic end generated code: output=d4e862c48af2a933 input=4c62732e1b3a3cc9]*/ +builtin_ascii(PyObject *module, PyObject *obj) +/*[clinic end generated code: output=6d37b3f0984c7eb9 input=4c62732e1b3a3cc9]*/ { return PyObject_ASCII(obj); } @@ -381,8 +381,8 @@ Return the binary representation of an integer. [clinic start generated code]*/ static PyObject * -builtin_bin(PyModuleDef *module, PyObject *number) -/*[clinic end generated code: output=25ee26c6cf3bbb54 input=53f8a0264bacaf90]*/ +builtin_bin(PyObject *module, PyObject *number) +/*[clinic end generated code: output=b6fc4ad5e649f4f7 input=53f8a0264bacaf90]*/ { return PyNumber_ToBase(number, 2); } @@ -401,8 +401,8 @@ __call__() method. [clinic start generated code]*/ static PyObject * -builtin_callable(PyModuleDef *module, PyObject *obj) -/*[clinic end generated code: output=f4df2ce92364b656 input=1423bab99cc41f58]*/ +builtin_callable(PyObject *module, PyObject *obj) +/*[clinic end generated code: output=2b095d59d934cb7e input=1423bab99cc41f58]*/ { return PyBool_FromLong((long)PyCallable_Check(obj)); } @@ -574,9 +574,8 @@ format_spec defaults to the empty string [clinic start generated code]*/ static PyObject * -builtin_format_impl(PyModuleDef *module, PyObject *value, - PyObject *format_spec) -/*[clinic end generated code: output=4341fd78a5f01764 input=6325e751a1b29b86]*/ +builtin_format_impl(PyObject *module, PyObject *value, PyObject *format_spec) +/*[clinic end generated code: output=2f40bdfa4954b077 input=6325e751a1b29b86]*/ { return PyObject_Format(value, format_spec); } @@ -591,8 +590,8 @@ Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff. [clinic start generated code]*/ static PyObject * -builtin_chr_impl(PyModuleDef *module, int i) -/*[clinic end generated code: output=67fe4d87e690f373 input=3f604ef45a70750d]*/ +builtin_chr_impl(PyObject *module, int i) +/*[clinic end generated code: output=c733afcd200afcb7 input=3f604ef45a70750d]*/ { return PyUnicode_FromOrdinal(i); } @@ -672,10 +671,10 @@ in addition to any features explicitly specified. [clinic start generated code]*/ static PyObject * -builtin_compile_impl(PyModuleDef *module, PyObject *source, - PyObject *filename, const char *mode, int flags, - int dont_inherit, int optimize) -/*[clinic end generated code: output=31881762c1bb90c4 input=9d53e8cfb3c86414]*/ +builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename, + const char *mode, int flags, int dont_inherit, + int optimize) +/*[clinic end generated code: output=1fa176e33452bb63 input=9d53e8cfb3c86414]*/ { PyObject *source_copy; const char *str; @@ -800,8 +799,8 @@ Return the tuple (x//y, x%y). Invariant: div*y + mod == x. [clinic start generated code]*/ static PyObject * -builtin_divmod_impl(PyModuleDef *module, PyObject *x, PyObject *y) -/*[clinic end generated code: output=9ad0076120ebf9ac input=175ad9c84ff41a85]*/ +builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y) +/*[clinic end generated code: output=b06d8a5f6e0c745e input=175ad9c84ff41a85]*/ { return PyNumber_Divmod(x, y); } @@ -825,9 +824,9 @@ If only globals is given, locals defaults to it. [clinic start generated code]*/ static PyObject * -builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals, +builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals, PyObject *locals) -/*[clinic end generated code: output=7284501fb7b4d666 input=11ee718a8640e527]*/ +/*[clinic end generated code: output=0a0824aa70093116 input=11ee718a8640e527]*/ { PyObject *result, *source_copy; const char *str; @@ -908,9 +907,9 @@ If only globals is given, locals defaults to it. [clinic start generated code]*/ static PyObject * -builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals, +builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals, PyObject *locals) -/*[clinic end generated code: output=83d574ef9d5d0b46 input=01ca3e1c01692829]*/ +/*[clinic end generated code: output=3c90efc6ab68ef5d input=01ca3e1c01692829]*/ { PyObject *v; @@ -1024,8 +1023,8 @@ global scope and vice-versa. [clinic start generated code]*/ static PyObject * -builtin_globals_impl(PyModuleDef *module) -/*[clinic end generated code: output=4958645e96dd8138 input=9327576f92bb48ba]*/ +builtin_globals_impl(PyObject *module) +/*[clinic end generated code: output=e5dd1527067b94d2 input=9327576f92bb48ba]*/ { PyObject *d; @@ -1048,8 +1047,8 @@ This is done by calling getattr(obj, name) and catching AttributeError. [clinic start generated code]*/ static PyObject * -builtin_hasattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name) -/*[clinic end generated code: output=81154fdd63634696 input=0faec9787d979542]*/ +builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name) +/*[clinic end generated code: output=a7aff2090a4151e5 input=0faec9787d979542]*/ { PyObject *v; @@ -1325,9 +1324,9 @@ setattr(x, 'y', v) is equivalent to ``x.y = v'' [clinic start generated code]*/ static PyObject * -builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name, +builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name, PyObject *value) -/*[clinic end generated code: output=d881c655c0f7e34f input=bd2b7ca6875a1899]*/ +/*[clinic end generated code: output=dc2ce1d1add9acb4 input=bd2b7ca6875a1899]*/ { if (PyObject_SetAttr(obj, name, value) != 0) return NULL; @@ -1349,8 +1348,8 @@ delattr(x, 'y') is equivalent to ``del x.y'' [clinic start generated code]*/ static PyObject * -builtin_delattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name) -/*[clinic end generated code: output=ef653e698a0b4187 input=db16685d6b4b9410]*/ +builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name) +/*[clinic end generated code: output=85134bc58dff79fa input=db16685d6b4b9410]*/ { if (PyObject_SetAttr(obj, name, (PyObject *)NULL) != 0) return NULL; @@ -1372,8 +1371,8 @@ reverse is not necessarily true. [clinic start generated code]*/ static PyObject * -builtin_hash(PyModuleDef *module, PyObject *obj) -/*[clinic end generated code: output=1f32ff154c1f751a input=58c48be822bf9c54]*/ +builtin_hash(PyObject *module, PyObject *obj) +/*[clinic end generated code: output=237668e9d7688db7 input=58c48be822bf9c54]*/ { Py_hash_t x; @@ -1397,8 +1396,8 @@ Return the hexadecimal representation of an integer. [clinic start generated code]*/ static PyObject * -builtin_hex(PyModuleDef *module, PyObject *number) -/*[clinic end generated code: output=618489ce3cbc5858 input=e645aff5fc7d540e]*/ +builtin_hex(PyObject *module, PyObject *number) +/*[clinic end generated code: output=e46b612169099408 input=e645aff5fc7d540e]*/ { return PyNumber_ToBase(number, 16); } @@ -1441,8 +1440,8 @@ Return the number of items in a container. [clinic start generated code]*/ static PyObject * -builtin_len(PyModuleDef *module, PyObject *obj) -/*[clinic end generated code: output=8e5837b6f81d915b input=bc55598da9e9c9b5]*/ +builtin_len(PyObject *module, PyObject *obj) +/*[clinic end generated code: output=fa7a270d314dfb6c input=bc55598da9e9c9b5]*/ { Py_ssize_t res; @@ -1464,8 +1463,8 @@ covered by any backwards compatibility guarantees. [clinic start generated code]*/ static PyObject * -builtin_locals_impl(PyModuleDef *module) -/*[clinic end generated code: output=8b5a41f12e19d13a input=7874018d478d5c4b]*/ +builtin_locals_impl(PyObject *module) +/*[clinic end generated code: output=b46c94015ce11448 input=7874018d478d5c4b]*/ { PyObject *d; @@ -1623,8 +1622,8 @@ Return the octal representation of an integer. [clinic start generated code]*/ static PyObject * -builtin_oct(PyModuleDef *module, PyObject *number) -/*[clinic end generated code: output=18f701bc6d8f804a input=ad6b274af4016c72]*/ +builtin_oct(PyObject *module, PyObject *number) +/*[clinic end generated code: output=40a34656b6875352 input=ad6b274af4016c72]*/ { return PyNumber_ToBase(number, 8); } @@ -1640,8 +1639,8 @@ Return the Unicode code point for a one-character string. [clinic start generated code]*/ static PyObject * -builtin_ord(PyModuleDef *module, PyObject *c) -/*[clinic end generated code: output=04fd27272d9462f6 input=3064e5d6203ad012]*/ +builtin_ord(PyObject *module, PyObject *c) +/*[clinic end generated code: output=4fa5e87a323bae71 input=3064e5d6203ad012]*/ { long ord; Py_ssize_t size; @@ -1700,8 +1699,8 @@ invoked using the three argument form. [clinic start generated code]*/ static PyObject * -builtin_pow_impl(PyModuleDef *module, PyObject *x, PyObject *y, PyObject *z) -/*[clinic end generated code: output=1fba268adba9b45f input=653d57d38d41fc07]*/ +builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z) +/*[clinic end generated code: output=50a14d5d130d404b input=653d57d38d41fc07]*/ { return PyNumber_Power(x, y, z); } @@ -1819,8 +1818,8 @@ On *nix systems, readline is used if available. [clinic start generated code]*/ static PyObject * -builtin_input_impl(PyModuleDef *module, PyObject *prompt) -/*[clinic end generated code: output=b77731f59e1515c4 input=5e8bb70c2908fe3c]*/ +builtin_input_impl(PyObject *module, PyObject *prompt) +/*[clinic end generated code: output=83db5a191e7a0d60 input=5e8bb70c2908fe3c]*/ { PyObject *fin = _PySys_GetObjectId(&PyId_stdin); PyObject *fout = _PySys_GetObjectId(&PyId_stdout); @@ -2005,8 +2004,8 @@ For many object types, including most builtins, eval(repr(obj)) == obj. [clinic start generated code]*/ static PyObject * -builtin_repr(PyModuleDef *module, PyObject *obj) -/*[clinic end generated code: output=dc41784fa4341834 input=1c9e6d66d3e3be04]*/ +builtin_repr(PyObject *module, PyObject *obj) +/*[clinic end generated code: output=7ed3778c44fd0194 input=1c9e6d66d3e3be04]*/ { return PyObject_Repr(obj); } @@ -2175,8 +2174,8 @@ reject non-numeric types. [clinic start generated code]*/ static PyObject * -builtin_sum_impl(PyModuleDef *module, PyObject *iterable, PyObject *start) -/*[clinic end generated code: output=33655b248b21d581 input=3b5b7a9d7611c73a]*/ +builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start) +/*[clinic end generated code: output=df758cec7d1d302f input=3b5b7a9d7611c73a]*/ { PyObject *result = start; PyObject *temp, *item, *iter; @@ -2352,9 +2351,9 @@ or ...`` etc. [clinic start generated code]*/ static PyObject * -builtin_isinstance_impl(PyModuleDef *module, PyObject *obj, +builtin_isinstance_impl(PyObject *module, PyObject *obj, PyObject *class_or_tuple) -/*[clinic end generated code: output=f960b7c12dbbeda0 input=ffa743db1daf7549]*/ +/*[clinic end generated code: output=6faf01472c13b003 input=ffa743db1daf7549]*/ { int retval; @@ -2380,9 +2379,9 @@ or ...`` etc. [clinic start generated code]*/ static PyObject * -builtin_issubclass_impl(PyModuleDef *module, PyObject *cls, +builtin_issubclass_impl(PyObject *module, PyObject *cls, PyObject *class_or_tuple) -/*[clinic end generated code: output=8b012a151940bbf2 input=af5f35e9ceaddaf6]*/ +/*[clinic end generated code: output=358412410cd7a250 input=af5f35e9ceaddaf6]*/ { int retval; 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]*/ diff --git a/Python/import.c b/Python/import.c index d4c358f..d791624 100644 --- a/Python/import.c +++ b/Python/import.c @@ -234,8 +234,8 @@ On platforms without threads, return False. [clinic start generated code]*/ static PyObject * -_imp_lock_held_impl(PyModuleDef *module) -/*[clinic end generated code: output=d7a8cc3a5169081a input=9b088f9b217d9bdf]*/ +_imp_lock_held_impl(PyObject *module) +/*[clinic end generated code: output=8b89384b5e1963fc input=9b088f9b217d9bdf]*/ { #ifdef WITH_THREAD return PyBool_FromLong(import_lock_thread != -1); @@ -254,8 +254,8 @@ modules. On platforms without threads, this function does nothing. [clinic start generated code]*/ static PyObject * -_imp_acquire_lock_impl(PyModuleDef *module) -/*[clinic end generated code: output=cc143b1d16422cae input=4a2d4381866d5fdc]*/ +_imp_acquire_lock_impl(PyObject *module) +/*[clinic end generated code: output=1aff58cb0ee1b026 input=4a2d4381866d5fdc]*/ { #ifdef WITH_THREAD _PyImport_AcquireLock(); @@ -273,8 +273,8 @@ On platforms without threads, this function does nothing. [clinic start generated code]*/ static PyObject * -_imp_release_lock_impl(PyModuleDef *module) -/*[clinic end generated code: output=74d28e38ebe2b224 input=934fb11516dd778b]*/ +_imp_release_lock_impl(PyObject *module) +/*[clinic end generated code: output=7faab6d0be178b0a input=934fb11516dd778b]*/ { #ifdef WITH_THREAD if (_PyImport_ReleaseLock() < 0) { @@ -916,9 +916,9 @@ Changes code.co_filename to specify the passed-in file path. [clinic start generated code]*/ static PyObject * -_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code, +_imp__fix_co_filename_impl(PyObject *module, PyCodeObject *code, PyObject *path) -/*[clinic end generated code: output=f4db56aac0a1327f input=895ba50e78b82f05]*/ +/*[clinic end generated code: output=1d002f100235587d input=895ba50e78b82f05]*/ { update_compiled_module(code, path); @@ -1030,8 +1030,8 @@ Create an extension module. [clinic start generated code]*/ static PyObject * -_imp_create_builtin(PyModuleDef *module, PyObject *spec) -/*[clinic end generated code: output=5038f467617226bd input=37f966f890384e47]*/ +_imp_create_builtin(PyObject *module, PyObject *spec) +/*[clinic end generated code: output=ace7ff22271e6f39 input=37f966f890384e47]*/ { struct _inittab *p; PyObject *name; @@ -1846,8 +1846,8 @@ Returns the list of file suffixes used to identify extension modules. [clinic start generated code]*/ static PyObject * -_imp_extension_suffixes_impl(PyModuleDef *module) -/*[clinic end generated code: output=d44c1566ef362229 input=ecdeeecfcb6f839e]*/ +_imp_extension_suffixes_impl(PyObject *module) +/*[clinic end generated code: output=0bf346e25a8f0cd3 input=ecdeeecfcb6f839e]*/ { PyObject *list; const char *suffix; @@ -1885,8 +1885,8 @@ Initializes a frozen module. [clinic start generated code]*/ static PyObject * -_imp_init_frozen_impl(PyModuleDef *module, PyObject *name) -/*[clinic end generated code: output=a9de493bdd711878 input=13019adfc04f3fb3]*/ +_imp_init_frozen_impl(PyObject *module, PyObject *name) +/*[clinic end generated code: output=fc0511ed869fd69c input=13019adfc04f3fb3]*/ { int ret; PyObject *m; @@ -1913,8 +1913,8 @@ Create a code object for a frozen module. [clinic start generated code]*/ static PyObject * -_imp_get_frozen_object_impl(PyModuleDef *module, PyObject *name) -/*[clinic end generated code: output=3114c970a47f2e3c input=ed689bc05358fdbd]*/ +_imp_get_frozen_object_impl(PyObject *module, PyObject *name) +/*[clinic end generated code: output=2568cc5b7aa0da63 input=ed689bc05358fdbd]*/ { return get_frozen_object(name); } @@ -1929,8 +1929,8 @@ Returns True if the module name is of a frozen package. [clinic start generated code]*/ static PyObject * -_imp_is_frozen_package_impl(PyModuleDef *module, PyObject *name) -/*[clinic end generated code: output=3e4cab802b56d649 input=81b6cdecd080fbb8]*/ +_imp_is_frozen_package_impl(PyObject *module, PyObject *name) +/*[clinic end generated code: output=e70cbdb45784a1c9 input=81b6cdecd080fbb8]*/ { return is_frozen_package(name); } @@ -1945,8 +1945,8 @@ Returns True if the module name corresponds to a built-in module. [clinic start generated code]*/ static PyObject * -_imp_is_builtin_impl(PyModuleDef *module, PyObject *name) -/*[clinic end generated code: output=2deec9cac6fb9a7e input=86befdac021dd1c7]*/ +_imp_is_builtin_impl(PyObject *module, PyObject *name) +/*[clinic end generated code: output=3bfd1162e2d3be82 input=86befdac021dd1c7]*/ { return PyLong_FromLong(is_builtin(name)); } @@ -1961,8 +1961,8 @@ Returns True if the module name corresponds to a frozen module. [clinic start generated code]*/ static PyObject * -_imp_is_frozen_impl(PyModuleDef *module, PyObject *name) -/*[clinic end generated code: output=7de8e260c8e36aed input=7301dbca1897d66b]*/ +_imp_is_frozen_impl(PyObject *module, PyObject *name) +/*[clinic end generated code: output=01f408f5ec0f2577 input=7301dbca1897d66b]*/ { const struct _frozen *p; @@ -2011,8 +2011,8 @@ Create an extension module. [clinic start generated code]*/ static PyObject * -_imp_create_dynamic_impl(PyModuleDef *module, PyObject *spec, PyObject *file) -/*[clinic end generated code: output=935cde5b3872d56d input=c31b954f4cf4e09d]*/ +_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file) +/*[clinic end generated code: output=83249b827a4fde77 input=c31b954f4cf4e09d]*/ { PyObject *mod, *name, *path; FILE *fp; @@ -2066,8 +2066,8 @@ Initialize an extension module. [clinic start generated code]*/ static int -_imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod) -/*[clinic end generated code: output=4b84f1301b22d4bd input=9fdbfcb250280d3a]*/ +_imp_exec_dynamic_impl(PyObject *module, PyObject *mod) +/*[clinic end generated code: output=f5720ac7b465877d input=9fdbfcb250280d3a]*/ { return exec_builtin_or_dynamic(mod); } @@ -2085,8 +2085,8 @@ Initialize a built-in module. [clinic start generated code]*/ static int -_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod) -/*[clinic end generated code: output=215e99876a27e284 input=7beed5a2f12a60ca]*/ +_imp_exec_builtin_impl(PyObject *module, PyObject *mod) +/*[clinic end generated code: output=0262447b240c038e input=7beed5a2f12a60ca]*/ { return exec_builtin_or_dynamic(mod); } |