bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746)

This commit is contained in:
Serhiy Storchaka 2017-12-15 13:11:11 +02:00 committed by GitHub
parent 3325a6780c
commit a5552f023e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 669 additions and 662 deletions

View file

@ -88,7 +88,7 @@ static PyObject *
builtin_format_impl(PyObject *module, PyObject *value, PyObject *format_spec);
static PyObject *
builtin_format(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_format(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *value;
@ -158,7 +158,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
int optimize);
static PyObject *
builtin_compile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", NULL};
@ -193,7 +193,7 @@ static PyObject *
builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
static PyObject *
builtin_divmod(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_divmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *x;
@ -230,7 +230,7 @@ builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
builtin_eval(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *source;
@ -268,7 +268,7 @@ builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
builtin_exec(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *source;
@ -322,7 +322,7 @@ static PyObject *
builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
builtin_hasattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_hasattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
@ -367,7 +367,7 @@ builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
PyObject *value);
static PyObject *
builtin_setattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_setattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
@ -400,7 +400,7 @@ static PyObject *
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
builtin_delattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_delattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
@ -509,7 +509,7 @@ static PyObject *
builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
static PyObject *
builtin_pow(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *x;
@ -546,7 +546,7 @@ static PyObject *
builtin_input_impl(PyObject *module, PyObject *prompt);
static PyObject *
builtin_input(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_input(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *prompt = NULL;
@ -589,7 +589,7 @@ static PyObject *
builtin_round_impl(PyObject *module, PyObject *number, PyObject *ndigits);
static PyObject *
builtin_round(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
builtin_round(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"number", "ndigits", NULL};
@ -624,7 +624,7 @@ static PyObject *
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
static PyObject *
builtin_sum(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_sum(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *iterable;
@ -659,7 +659,7 @@ builtin_isinstance_impl(PyObject *module, PyObject *obj,
PyObject *class_or_tuple);
static PyObject *
builtin_isinstance(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_isinstance(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
@ -694,7 +694,7 @@ builtin_issubclass_impl(PyObject *module, PyObject *cls,
PyObject *class_or_tuple);
static PyObject *
builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs)
builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *cls;
@ -710,4 +710,4 @@ builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=d46a224ac804eef1 input=a9049054013a1b77]*/
/*[clinic end generated code: output=9f17c7a87d740374 input=a9049054013a1b77]*/