summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-12-15 11:11:11 (GMT)
committerGitHub <noreply@github.com>2017-12-15 11:11:11 (GMT)
commita5552f023e1d8cbafee1e51d316cc581deb2295f (patch)
treef7cb07017f409fb035ec999efed8ddae18446865 /Objects
parent3325a6780c81f1ea51190370b5454879c4862a37 (diff)
downloadcpython-a5552f023e1d8cbafee1e51d316cc581deb2295f.zip
cpython-a5552f023e1d8cbafee1e51d316cc581deb2295f.tar.gz
cpython-a5552f023e1d8cbafee1e51d316cc581deb2295f.tar.bz2
bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/call.c46
-rw-r--r--Objects/clinic/bytearrayobject.c.h28
-rw-r--r--Objects/clinic/bytesobject.c.h22
-rw-r--r--Objects/clinic/dictobject.c.h8
-rw-r--r--Objects/clinic/floatobject.c.h6
-rw-r--r--Objects/clinic/listobject.c.h10
-rw-r--r--Objects/clinic/longobject.c.h6
-rw-r--r--Objects/clinic/odictobject.c.h10
-rw-r--r--Objects/clinic/tupleobject.c.h4
-rw-r--r--Objects/clinic/unicodeobject.c.h28
-rw-r--r--Objects/descrobject.c2
-rw-r--r--Objects/typeobject.c2
-rw-r--r--Objects/unicodeobject.c2
13 files changed, 89 insertions, 85 deletions
diff --git a/Objects/call.c b/Objects/call.c
index 7b46dbc..b53a98c 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -81,7 +81,7 @@ _Py_CheckFunctionResult(PyObject *callable, PyObject *result, const char *where)
/* --- Core PyObject call functions ------------------------------- */
PyObject *
-_PyObject_FastCallDict(PyObject *callable, PyObject **args, Py_ssize_t nargs,
+_PyObject_FastCallDict(PyObject *callable, PyObject *const *args, Py_ssize_t nargs,
PyObject *kwargs)
{
/* _PyObject_FastCallDict() must not be called with an exception set,
@@ -134,7 +134,7 @@ _PyObject_FastCallDict(PyObject *callable, PyObject **args, Py_ssize_t nargs,
PyObject *
-_PyObject_FastCallKeywords(PyObject *callable, PyObject **stack, Py_ssize_t nargs,
+_PyObject_FastCallKeywords(PyObject *callable, PyObject *const *stack, Py_ssize_t nargs,
PyObject *kwnames)
{
/* _PyObject_FastCallKeywords() must not be called with an exception set,
@@ -254,7 +254,7 @@ PyObject_Call(PyObject *callable, PyObject *args, PyObject *kwargs)
/* --- PyFunction call functions ---------------------------------- */
static PyObject* _Py_HOT_FUNCTION
-function_code_fastcall(PyCodeObject *co, PyObject **args, Py_ssize_t nargs,
+function_code_fastcall(PyCodeObject *co, PyObject *const *args, Py_ssize_t nargs,
PyObject *globals)
{
PyFrameObject *f;
@@ -296,7 +296,7 @@ function_code_fastcall(PyCodeObject *co, PyObject **args, Py_ssize_t nargs,
PyObject *
-_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
+_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs,
PyObject *kwargs)
{
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
@@ -383,7 +383,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
}
PyObject *
-_PyFunction_FastCallKeywords(PyObject *func, PyObject **stack,
+_PyFunction_FastCallKeywords(PyObject *func, PyObject *const *stack,
Py_ssize_t nargs, PyObject *kwnames)
{
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
@@ -443,8 +443,9 @@ _PyFunction_FastCallKeywords(PyObject *func, PyObject **stack,
/* --- PyCFunction call functions --------------------------------- */
PyObject *
-_PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **args,
- Py_ssize_t nargs, PyObject *kwargs)
+_PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self,
+ PyObject *const *args, Py_ssize_t nargs,
+ PyObject *kwargs)
{
/* _PyMethodDef_RawFastCallDict() must not be called with an exception set,
because it can clear it (directly or indirectly) and so the
@@ -532,7 +533,7 @@ _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **arg
case METH_FASTCALL | METH_KEYWORDS:
{
- PyObject **stack;
+ PyObject *const *stack;
PyObject *kwnames;
_PyCFunctionFastWithKeywords fastmeth = (_PyCFunctionFastWithKeywords)meth;
@@ -542,7 +543,7 @@ _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **arg
result = (*fastmeth) (self, stack, nargs, kwnames);
if (stack != args) {
- PyMem_Free(stack);
+ PyMem_Free((PyObject **)stack);
}
Py_XDECREF(kwnames);
break;
@@ -569,7 +570,8 @@ exit:
PyObject *
-_PyCFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
+_PyCFunction_FastCallDict(PyObject *func,
+ PyObject *const *args, Py_ssize_t nargs,
PyObject *kwargs)
{
PyObject *result;
@@ -586,8 +588,9 @@ _PyCFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
PyObject *
-_PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self, PyObject **args,
- Py_ssize_t nargs, PyObject *kwnames)
+_PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self,
+ PyObject *const *args, Py_ssize_t nargs,
+ PyObject *kwnames)
{
/* _PyMethodDef_RawFastCallKeywords() must not be called with an exception set,
because it can clear it (directly or indirectly) and so the
@@ -715,8 +718,9 @@ exit:
PyObject *
-_PyCFunction_FastCallKeywords(PyObject *func, PyObject **args,
- Py_ssize_t nargs, PyObject *kwnames)
+_PyCFunction_FastCallKeywords(PyObject *func,
+ PyObject *const *args, Py_ssize_t nargs,
+ PyObject *kwnames)
{
PyObject *result;
@@ -834,8 +838,8 @@ PyObject_CallObject(PyObject *callable, PyObject *args)
/* Positional arguments are obj followed by args:
call callable(obj, *args, **kwargs) */
PyObject *
-_PyObject_FastCall_Prepend(PyObject *callable,
- PyObject *obj, PyObject **args, Py_ssize_t nargs)
+_PyObject_FastCall_Prepend(PyObject *callable, PyObject *obj,
+ PyObject *const *args, Py_ssize_t nargs)
{
PyObject *small_stack[_PY_FASTCALL_SMALL_STACK];
PyObject **args2;
@@ -1268,7 +1272,7 @@ PyObject_CallFunctionObjArgs(PyObject *callable, ...)
/* Issue #29234: Inlining _PyStack_AsTuple() into callers increases their
stack consumption, Disable inlining to optimize the stack consumption. */
PyObject* _Py_NO_INLINE
-_PyStack_AsTuple(PyObject **stack, Py_ssize_t nargs)
+_PyStack_AsTuple(PyObject *const *stack, Py_ssize_t nargs)
{
PyObject *args;
Py_ssize_t i;
@@ -1288,7 +1292,7 @@ _PyStack_AsTuple(PyObject **stack, Py_ssize_t nargs)
PyObject*
-_PyStack_AsTupleSlice(PyObject **stack, Py_ssize_t nargs,
+_PyStack_AsTupleSlice(PyObject *const *stack, Py_ssize_t nargs,
Py_ssize_t start, Py_ssize_t end)
{
PyObject *args;
@@ -1313,7 +1317,7 @@ _PyStack_AsTupleSlice(PyObject **stack, Py_ssize_t nargs,
PyObject *
-_PyStack_AsDict(PyObject **values, PyObject *kwnames)
+_PyStack_AsDict(PyObject *const *values, PyObject *kwnames)
{
Py_ssize_t nkwargs;
PyObject *kwdict;
@@ -1340,8 +1344,8 @@ _PyStack_AsDict(PyObject **values, PyObject *kwnames)
int
-_PyStack_UnpackDict(PyObject **args, Py_ssize_t nargs, PyObject *kwargs,
- PyObject ***p_stack, PyObject **p_kwnames)
+_PyStack_UnpackDict(PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs,
+ PyObject *const **p_stack, PyObject **p_kwnames)
{
PyObject **stack, **kwstack;
Py_ssize_t nkwargs;
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h
index d45592b..d888832 100644
--- a/Objects/clinic/bytearrayobject.c.h
+++ b/Objects/clinic/bytearrayobject.c.h
@@ -58,7 +58,7 @@ bytearray_translate_impl(PyByteArrayObject *self, PyObject *table,
PyObject *deletechars);
static PyObject *
-bytearray_translate(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytearray_translate(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", "delete", NULL};
@@ -94,7 +94,7 @@ static PyObject *
bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to);
static PyObject *
-bytearray_maketrans(void *null, PyObject **args, Py_ssize_t nargs)
+bytearray_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer frm = {NULL, NULL};
@@ -140,7 +140,7 @@ bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
Py_buffer *new, Py_ssize_t count);
static PyObject *
-bytearray_replace(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_replace(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer old = {NULL, NULL};
@@ -188,7 +188,7 @@ bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit);
static PyObject *
-bytearray_split(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytearray_split(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -263,7 +263,7 @@ bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
Py_ssize_t maxsplit);
static PyObject *
-bytearray_rsplit(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytearray_rsplit(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -317,7 +317,7 @@ static PyObject *
bytearray_insert_impl(PyByteArrayObject *self, Py_ssize_t index, int item);
static PyObject *
-bytearray_insert(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_insert(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t index;
@@ -394,7 +394,7 @@ static PyObject *
bytearray_pop_impl(PyByteArrayObject *self, Py_ssize_t index);
static PyObject *
-bytearray_pop(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_pop(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t index = -1;
@@ -454,7 +454,7 @@ static PyObject *
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes);
static PyObject *
-bytearray_strip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_strip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -485,7 +485,7 @@ static PyObject *
bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes);
static PyObject *
-bytearray_lstrip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_lstrip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -516,7 +516,7 @@ static PyObject *
bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes);
static PyObject *
-bytearray_rstrip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_rstrip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -555,7 +555,7 @@ bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
const char *errors);
static PyObject *
-bytearray_decode(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytearray_decode(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"encoding", "errors", NULL};
@@ -602,7 +602,7 @@ static PyObject *
bytearray_splitlines_impl(PyByteArrayObject *self, int keepends);
static PyObject *
-bytearray_splitlines(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytearray_splitlines(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"keepends", NULL};
@@ -680,7 +680,7 @@ static PyObject *
bytearray_reduce_ex_impl(PyByteArrayObject *self, int proto);
static PyObject *
-bytearray_reduce_ex(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs)
+bytearray_reduce_ex(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int proto = 0;
@@ -712,4 +712,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
{
return bytearray_sizeof_impl(self);
}
-/*[clinic end generated code: output=c2804d009182328c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bb9051a369adb328 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h
index 9c358b5..c781948 100644
--- a/Objects/clinic/bytesobject.c.h
+++ b/Objects/clinic/bytesobject.c.h
@@ -23,7 +23,7 @@ static PyObject *
bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
static PyObject *
-bytes_split(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytes_split(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -142,7 +142,7 @@ static PyObject *
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
static PyObject *
-bytes_rsplit(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytes_rsplit(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -190,7 +190,7 @@ static PyObject *
bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
-bytes_strip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
+bytes_strip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -221,7 +221,7 @@ static PyObject *
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
-bytes_lstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
+bytes_lstrip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -252,7 +252,7 @@ static PyObject *
bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
-bytes_rstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
+bytes_rstrip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
@@ -288,7 +288,7 @@ bytes_translate_impl(PyBytesObject *self, PyObject *table,
PyObject *deletechars);
static PyObject *
-bytes_translate(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytes_translate(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", "delete", NULL};
@@ -324,7 +324,7 @@ static PyObject *
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to);
static PyObject *
-bytes_maketrans(void *null, PyObject **args, Py_ssize_t nargs)
+bytes_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer frm = {NULL, NULL};
@@ -370,7 +370,7 @@ bytes_replace_impl(PyBytesObject *self, Py_buffer *old, Py_buffer *new,
Py_ssize_t count);
static PyObject *
-bytes_replace(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
+bytes_replace(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer old = {NULL, NULL};
@@ -419,7 +419,7 @@ bytes_decode_impl(PyBytesObject *self, const char *encoding,
const char *errors);
static PyObject *
-bytes_decode(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytes_decode(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"encoding", "errors", NULL};
@@ -453,7 +453,7 @@ static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends);
static PyObject *
-bytes_splitlines(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+bytes_splitlines(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"keepends", NULL};
@@ -499,4 +499,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=fc9e02359cc56d36 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=470acd12b2534765 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h
index 538d52e..58677cd 100644
--- a/Objects/clinic/dictobject.c.h
+++ b/Objects/clinic/dictobject.c.h
@@ -15,7 +15,7 @@ static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
static PyObject *
-dict_fromkeys(PyTypeObject *type, PyObject **args, Py_ssize_t nargs)
+dict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *iterable;
@@ -54,7 +54,7 @@ static PyObject *
dict_get_impl(PyDictObject *self, PyObject *key, PyObject *default_value);
static PyObject *
-dict_get(PyDictObject *self, PyObject **args, Py_ssize_t nargs)
+dict_get(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
@@ -87,7 +87,7 @@ dict_setdefault_impl(PyDictObject *self, PyObject *key,
PyObject *default_value);
static PyObject *
-dict_setdefault(PyDictObject *self, PyObject **args, Py_ssize_t nargs)
+dict_setdefault(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
@@ -103,4 +103,4 @@ dict_setdefault(PyDictObject *self, PyObject **args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=8d09902e60b7ab02 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d7508c5091609a23 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h
index 9325154..ac3ff0c 100644
--- a/Objects/clinic/floatobject.c.h
+++ b/Objects/clinic/floatobject.c.h
@@ -53,7 +53,7 @@ static PyObject *
float___round___impl(PyObject *self, PyObject *o_ndigits);
static PyObject *
-float___round__(PyObject *self, PyObject **args, Py_ssize_t nargs)
+float___round__(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *o_ndigits = NULL;
@@ -263,7 +263,7 @@ float___set_format___impl(PyTypeObject *type, const char *typestr,
const char *fmt);
static PyObject *
-float___set_format__(PyTypeObject *type, PyObject **args, Py_ssize_t nargs)
+float___set_format__(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *typestr;
@@ -305,4 +305,4 @@ float___format__(PyObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=90c06ea9d72130cc input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a3c366a156be61f9 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h
index d22ce22..63da672 100644
--- a/Objects/clinic/listobject.c.h
+++ b/Objects/clinic/listobject.c.h
@@ -15,7 +15,7 @@ static PyObject *
list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object);
static PyObject *
-list_insert(PyListObject *self, PyObject **args, Py_ssize_t nargs)
+list_insert(PyListObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t index;
@@ -100,7 +100,7 @@ static PyObject *
list_pop_impl(PyListObject *self, Py_ssize_t index);
static PyObject *
-list_pop(PyListObject *self, PyObject **args, Py_ssize_t nargs)
+list_pop(PyListObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t index = -1;
@@ -128,7 +128,7 @@ static PyObject *
list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse);
static PyObject *
-list_sort(PyListObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+list_sort(PyListObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"key", "reverse", NULL};
@@ -180,7 +180,7 @@ list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop);
static PyObject *
-list_index(PyListObject *self, PyObject **args, Py_ssize_t nargs)
+list_index(PyListObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *value;
@@ -285,4 +285,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored))
{
return list___reversed___impl(self);
}
-/*[clinic end generated code: output=4a4f72a5e7ff5068 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d8cb29e6e6d79844 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h
index 1b706d6..14f5515 100644
--- a/Objects/clinic/longobject.c.h
+++ b/Objects/clinic/longobject.c.h
@@ -146,7 +146,7 @@ int_to_bytes_impl(PyObject *self, Py_ssize_t length, PyObject *byteorder,
int is_signed);
static PyObject *
-int_to_bytes(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"length", "byteorder", "signed", NULL};
@@ -193,7 +193,7 @@ int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
PyObject *byteorder, int is_signed);
static PyObject *
-int_from_bytes(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"bytes", "byteorder", "signed", NULL};
@@ -211,4 +211,4 @@ int_from_bytes(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyObject *
exit:
return return_value;
}
-/*[clinic end generated code: output=c9adfdc329651cc4 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fd64beb83bd16df3 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h
index 6c1cb91..15a8bec 100644
--- a/Objects/clinic/odictobject.c.h
+++ b/Objects/clinic/odictobject.c.h
@@ -15,7 +15,7 @@ static PyObject *
OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value);
static PyObject *
-OrderedDict_fromkeys(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+OrderedDict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"iterable", "value", NULL};
@@ -49,7 +49,7 @@ OrderedDict_setdefault_impl(PyODictObject *self, PyObject *key,
PyObject *default_value);
static PyObject *
-OrderedDict_setdefault(PyODictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+OrderedDict_setdefault(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"key", "default", NULL};
@@ -82,7 +82,7 @@ static PyObject *
OrderedDict_popitem_impl(PyODictObject *self, int last);
static PyObject *
-OrderedDict_popitem(PyODictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+OrderedDict_popitem(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"last", NULL};
@@ -114,7 +114,7 @@ static PyObject *
OrderedDict_move_to_end_impl(PyODictObject *self, PyObject *key, int last);
static PyObject *
-OrderedDict_move_to_end(PyODictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+OrderedDict_move_to_end(PyODictObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"key", "last", NULL};
@@ -131,4 +131,4 @@ OrderedDict_move_to_end(PyODictObject *self, PyObject **args, Py_ssize_t nargs,
exit:
return return_value;
}
-/*[clinic end generated code: output=b2f82eca6e8c8084 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7f23d569eda2a558 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/tupleobject.c.h b/Objects/clinic/tupleobject.c.h
index c453e58..bef9005 100644
--- a/Objects/clinic/tupleobject.c.h
+++ b/Objects/clinic/tupleobject.c.h
@@ -18,7 +18,7 @@ tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop);
static PyObject *
-tuple_index(PyTupleObject *self, PyObject **args, Py_ssize_t nargs)
+tuple_index(PyTupleObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *value;
@@ -95,4 +95,4 @@ tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
{
return tuple___getnewargs___impl(self);
}
-/*[clinic end generated code: output=d24a9893b3a740c6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=0fbf4321fb4365ac input=a9049054013a1b77]*/
diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h
index 0936527..643ef04 100644
--- a/Objects/clinic/unicodeobject.c.h
+++ b/Objects/clinic/unicodeobject.c.h
@@ -77,7 +77,7 @@ static PyObject *
unicode_center_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
static PyObject *
-unicode_center(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_center(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t width;
@@ -115,7 +115,7 @@ static PyObject *
unicode_encode_impl(PyObject *self, const char *encoding, const char *errors);
static PyObject *
-unicode_encode(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+unicode_encode(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"encoding", "errors", NULL};
@@ -148,7 +148,7 @@ static PyObject *
unicode_expandtabs_impl(PyObject *self, int tabsize);
static PyObject *
-unicode_expandtabs(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+unicode_expandtabs(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"tabsize", NULL};
@@ -425,7 +425,7 @@ static PyObject *
unicode_ljust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
static PyObject *
-unicode_ljust(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_ljust(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t width;
@@ -474,7 +474,7 @@ static PyObject *
unicode_strip_impl(PyObject *self, PyObject *chars);
static PyObject *
-unicode_strip(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_strip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *chars = Py_None;
@@ -505,7 +505,7 @@ static PyObject *
unicode_lstrip_impl(PyObject *self, PyObject *chars);
static PyObject *
-unicode_lstrip(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_lstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *chars = NULL;
@@ -536,7 +536,7 @@ static PyObject *
unicode_rstrip_impl(PyObject *self, PyObject *chars);
static PyObject *
-unicode_rstrip(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_rstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *chars = NULL;
@@ -573,7 +573,7 @@ unicode_replace_impl(PyObject *self, PyObject *old, PyObject *new,
Py_ssize_t count);
static PyObject *
-unicode_replace(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_replace(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *old;
@@ -605,7 +605,7 @@ static PyObject *
unicode_rjust_impl(PyObject *self, Py_ssize_t width, Py_UCS4 fillchar);
static PyObject *
-unicode_rjust(PyObject *self, PyObject **args, Py_ssize_t nargs)
+unicode_rjust(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t width;
@@ -642,7 +642,7 @@ static PyObject *
unicode_split_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit);
static PyObject *
-unicode_split(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+unicode_split(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -715,7 +715,7 @@ static PyObject *
unicode_rsplit_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit);
static PyObject *
-unicode_rsplit(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+unicode_rsplit(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"sep", "maxsplit", NULL};
@@ -749,7 +749,7 @@ static PyObject *
unicode_splitlines_impl(PyObject *self, int keepends);
static PyObject *
-unicode_splitlines(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+unicode_splitlines(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"keepends", NULL};
@@ -805,7 +805,7 @@ static PyObject *
unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z);
static PyObject *
-unicode_maketrans(void *null, PyObject **args, Py_ssize_t nargs)
+unicode_maketrans(void *null, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *x;
@@ -930,4 +930,4 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return unicode_sizeof_impl(self);
}
-/*[clinic end generated code: output=816292e81a8a732e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1ad4e81b68194264 input=a9049054013a1b77]*/
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 71d5224..a253018 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -256,7 +256,7 @@ methoddescr_call(PyMethodDescrObject *descr, PyObject *args, PyObject *kwargs)
// same to methoddescr_call(), but use FASTCALL convention.
PyObject *
_PyMethodDescr_FastCallKeywords(PyObject *descrobj,
- PyObject **args, Py_ssize_t nargs,
+ PyObject *const *args, Py_ssize_t nargs,
PyObject *kwnames)
{
assert(Py_TYPE(descrobj) == &PyMethodDescr_Type);
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 5403ecb..aa90701 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3298,7 +3298,7 @@ type___subclasses___impl(PyTypeObject *self)
}
static PyObject *
-type_prepare(PyObject *self, PyObject **args, Py_ssize_t nargs,
+type_prepare(PyObject *self, PyObject *const *args, Py_ssize_t nargs,
PyObject *kwnames)
{
return PyDict_New();
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c7480a0..c8600a8 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9835,7 +9835,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
}
PyObject *
-_PyUnicode_JoinArray(PyObject *separator, PyObject **items, Py_ssize_t seqlen)
+_PyUnicode_JoinArray(PyObject *separator, PyObject *const *items, Py_ssize_t seqlen)
{
PyObject *res = NULL; /* the result */
PyObject *sep = NULL;