mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.
This commit is contained in:
parent
687592def9
commit
89964c48d1
38 changed files with 537 additions and 280 deletions
|
@ -574,8 +574,9 @@ 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=fae3e927cc715466 input=e23f2f11e0098c64]*/
|
||||
builtin_format_impl(PyModuleDef *module, PyObject *value,
|
||||
PyObject *format_spec)
|
||||
/*[clinic end generated code: output=4341fd78a5f01764 input=e23f2f11e0098c64]*/
|
||||
{
|
||||
return PyObject_Format(value, format_spec);
|
||||
}
|
||||
|
@ -654,8 +655,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=4f41a315386bab9f input=c6212a9d21472f7e]*/
|
||||
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=c6212a9d21472f7e]*/
|
||||
{
|
||||
Py_buffer view = {NULL, NULL};
|
||||
const char *str;
|
||||
|
@ -805,8 +808,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, PyObject *locals)
|
||||
/*[clinic end generated code: output=90642b79dd8b08d6 input=31e42c1d2125b50b]*/
|
||||
builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals)
|
||||
/*[clinic end generated code: output=7284501fb7b4d666 input=31e42c1d2125b50b]*/
|
||||
{
|
||||
PyObject *result, *tmp = NULL;
|
||||
Py_buffer view = {NULL, NULL};
|
||||
|
@ -889,8 +893,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, PyObject *locals)
|
||||
/*[clinic end generated code: output=e8e0bbcde826a048 input=536e057b5e00d89e]*/
|
||||
builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals)
|
||||
/*[clinic end generated code: output=83d574ef9d5d0b46 input=536e057b5e00d89e]*/
|
||||
{
|
||||
PyObject *v;
|
||||
|
||||
|
@ -1303,8 +1308,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, PyObject *value)
|
||||
/*[clinic end generated code: output=c5e0a3a3971333ed input=fbe7e53403116b93]*/
|
||||
builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name,
|
||||
PyObject *value)
|
||||
/*[clinic end generated code: output=d881c655c0f7e34f input=fbe7e53403116b93]*/
|
||||
{
|
||||
if (PyObject_SetAttr(obj, name, value) != 0)
|
||||
return NULL;
|
||||
|
@ -2328,8 +2334,9 @@ or ...`` etc.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
builtin_isinstance_impl(PyModuleDef *module, PyObject *obj, PyObject *class_or_tuple)
|
||||
/*[clinic end generated code: output=5e234dc3872d75a2 input=cf9eb0ad6bb9bad6]*/
|
||||
builtin_isinstance_impl(PyModuleDef *module, PyObject *obj,
|
||||
PyObject *class_or_tuple)
|
||||
/*[clinic end generated code: output=f960b7c12dbbeda0 input=cf9eb0ad6bb9bad6]*/
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
@ -2355,8 +2362,9 @@ or ...`` etc.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
builtin_issubclass_impl(PyModuleDef *module, PyObject *cls, PyObject *class_or_tuple)
|
||||
/*[clinic end generated code: output=6346a85ba15dbd7d input=923d03fa41fc352a]*/
|
||||
builtin_issubclass_impl(PyModuleDef *module, PyObject *cls,
|
||||
PyObject *class_or_tuple)
|
||||
/*[clinic end generated code: output=8b012a151940bbf2 input=923d03fa41fc352a]*/
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
|
|
@ -83,7 +83,8 @@ 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(PyModuleDef *module, PyObject *value,
|
||||
PyObject *format_spec);
|
||||
|
||||
static PyObject *
|
||||
builtin_format(PyModuleDef *module, PyObject *args)
|
||||
|
@ -152,7 +153,9 @@ 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(PyModuleDef *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)
|
||||
|
@ -221,7 +224,8 @@ 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, PyObject *locals);
|
||||
builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals);
|
||||
|
||||
static PyObject *
|
||||
builtin_eval(PyModuleDef *module, PyObject *args)
|
||||
|
@ -257,7 +261,8 @@ 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, PyObject *locals);
|
||||
builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
|
||||
PyObject *locals);
|
||||
|
||||
static PyObject *
|
||||
builtin_exec(PyModuleDef *module, PyObject *args)
|
||||
|
@ -353,7 +358,8 @@ 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, PyObject *value);
|
||||
builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name,
|
||||
PyObject *value);
|
||||
|
||||
static PyObject *
|
||||
builtin_setattr(PyModuleDef *module, PyObject *args)
|
||||
|
@ -605,7 +611,8 @@ PyDoc_STRVAR(builtin_isinstance__doc__,
|
|||
{"isinstance", (PyCFunction)builtin_isinstance, METH_VARARGS, builtin_isinstance__doc__},
|
||||
|
||||
static PyObject *
|
||||
builtin_isinstance_impl(PyModuleDef *module, PyObject *obj, PyObject *class_or_tuple);
|
||||
builtin_isinstance_impl(PyModuleDef *module, PyObject *obj,
|
||||
PyObject *class_or_tuple);
|
||||
|
||||
static PyObject *
|
||||
builtin_isinstance(PyModuleDef *module, PyObject *args)
|
||||
|
@ -638,7 +645,8 @@ PyDoc_STRVAR(builtin_issubclass__doc__,
|
|||
{"issubclass", (PyCFunction)builtin_issubclass, METH_VARARGS, builtin_issubclass__doc__},
|
||||
|
||||
static PyObject *
|
||||
builtin_issubclass_impl(PyModuleDef *module, PyObject *cls, PyObject *class_or_tuple);
|
||||
builtin_issubclass_impl(PyModuleDef *module, PyObject *cls,
|
||||
PyObject *class_or_tuple);
|
||||
|
||||
static PyObject *
|
||||
builtin_issubclass(PyModuleDef *module, PyObject *args)
|
||||
|
@ -656,4 +664,4 @@ builtin_issubclass(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=12db4cde92eb11b3 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=b308ab64aa4d4ff8 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -78,7 +78,8 @@ 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, PyObject *path);
|
||||
_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code,
|
||||
PyObject *path);
|
||||
|
||||
static PyObject *
|
||||
_imp__fix_co_filename(PyModuleDef *module, PyObject *args)
|
||||
|
@ -295,7 +296,8 @@ PyDoc_STRVAR(_imp_load_dynamic__doc__,
|
|||
{"load_dynamic", (PyCFunction)_imp_load_dynamic, METH_VARARGS, _imp_load_dynamic__doc__},
|
||||
|
||||
static PyObject *
|
||||
_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path, PyObject *file);
|
||||
_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path,
|
||||
PyObject *file);
|
||||
|
||||
static PyObject *
|
||||
_imp_load_dynamic(PyModuleDef *module, PyObject *args)
|
||||
|
@ -320,4 +322,4 @@ exit:
|
|||
#ifndef _IMP_LOAD_DYNAMIC_METHODDEF
|
||||
#define _IMP_LOAD_DYNAMIC_METHODDEF
|
||||
#endif /* !defined(_IMP_LOAD_DYNAMIC_METHODDEF) */
|
||||
/*[clinic end generated code: output=d41c392510815c5b input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=b64fe33fe76591cf input=a9049054013a1b77]*/
|
||||
|
|
|
@ -904,8 +904,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, PyObject *path)
|
||||
/*[clinic end generated code: output=7afe5ba6b9d383e4 input=895ba50e78b82f05]*/
|
||||
_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code,
|
||||
PyObject *path)
|
||||
/*[clinic end generated code: output=f4db56aac0a1327f input=895ba50e78b82f05]*/
|
||||
|
||||
{
|
||||
update_compiled_module(code, path);
|
||||
|
@ -1934,8 +1935,9 @@ Loads an extension module.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path, PyObject *file)
|
||||
/*[clinic end generated code: output=8b7ae431d795e1ba input=af64f06e4bad3526]*/
|
||||
_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path,
|
||||
PyObject *file)
|
||||
/*[clinic end generated code: output=e84e5f7f0f39bc54 input=af64f06e4bad3526]*/
|
||||
{
|
||||
PyObject *mod;
|
||||
FILE *fp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue