Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/veryhigh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ the same library that the Python runtime is using.
set to *NULL*.


.. c:function:: PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, PyObject **args, int argcount, PyObject **kws, int kwcount, PyObject **defs, int defcount, PyObject *kwdefs, PyObject *closure)
.. c:function:: PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, PyObject *const *args, int argcount, PyObject *const *kws, int kwcount, PyObject *const *defs, int defcount, PyObject *kwdefs, PyObject *closure)

Evaluate a precompiled code object, given a particular environment for its
evaluation. This environment consists of a dictionary of global variables,
Expand Down
16 changes: 8 additions & 8 deletions Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ PyAPI_FUNC(PyObject *) PyObject_Call(PyObject *callable,

#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject*) _PyStack_AsTuple(
PyObject **stack,
PyObject *const *stack,
Py_ssize_t nargs);

PyAPI_FUNC(PyObject*) _PyStack_AsTupleSlice(
PyObject **stack,
PyObject *const *stack,
Py_ssize_t nargs,
Py_ssize_t start,
Py_ssize_t end);
Expand All @@ -177,7 +177,7 @@ PyAPI_FUNC(PyObject*) _PyStack_AsTupleSlice(
an exception, the caller is responsible to implement an explicit keys on
kwnames. */
PyAPI_FUNC(PyObject *) _PyStack_AsDict(
PyObject **values,
PyObject *const *values,
PyObject *kwnames);

/* Convert (args, nargs, kwargs: dict) into a (stack, nargs, kwnames: tuple).
Expand All @@ -192,10 +192,10 @@ PyAPI_FUNC(PyObject *) _PyStack_AsDict(
The type of keyword keys is not checked, these checks should be done
later (ex: _PyArg_ParseStackAndKeywords). */
PyAPI_FUNC(int) _PyStack_UnpackDict(
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwargs,
PyObject ***p_stack,
PyObject *const **p_stack,
PyObject **p_kwnames);

/* Suggested size (number of positional arguments) for arrays of PyObject*
Expand Down Expand Up @@ -224,7 +224,7 @@ PyAPI_FUNC(int) _PyObject_HasFastCall(PyObject *callable);
error. */
PyAPI_FUNC(PyObject *) _PyObject_FastCallDict(
PyObject *callable,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwargs);

Expand All @@ -245,7 +245,7 @@ PyAPI_FUNC(PyObject *) _PyObject_FastCallDict(
error. */
PyAPI_FUNC(PyObject *) _PyObject_FastCallKeywords(
PyObject *callable,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwnames);

Expand All @@ -264,7 +264,7 @@ PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend(
PyAPI_FUNC(PyObject *) _PyObject_FastCall_Prepend(
PyObject *callable,
PyObject *obj,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs);

PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *callable,
Expand Down
2 changes: 1 addition & 1 deletion Include/descrobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
#ifndef Py_LIMITED_API

PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords(
PyObject *descrobj, PyObject **stack, Py_ssize_t nargs, PyObject *kwnames);
PyObject *descrobj, PyObject *const *stack, Py_ssize_t nargs, PyObject *kwnames);
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
struct wrapperbase *, void *);
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
Expand Down
12 changes: 6 additions & 6 deletions Include/eval.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyObject *, PyObject *, PyObject *);
PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
PyObject *globals,
PyObject *locals,
PyObject **args, int argc,
PyObject **kwds, int kwdc,
PyObject **defs, int defc,
PyObject *const *args, int argc,
PyObject *const *kwds, int kwdc,
PyObject *const *defs, int defc,
PyObject *kwdefs, PyObject *closure);

#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyEval_EvalCodeWithName(
PyObject *co,
PyObject *globals, PyObject *locals,
PyObject **args, Py_ssize_t argcount,
PyObject **kwnames, PyObject **kwargs,
PyObject *const *args, Py_ssize_t argcount,
PyObject *const *kwnames, PyObject *const *kwargs,
Py_ssize_t kwcount, int kwstep,
PyObject **defs, Py_ssize_t defcount,
PyObject *const *defs, Py_ssize_t defcount,
PyObject *kwdefs, PyObject *closure,
PyObject *name, PyObject *qualname);

Expand Down
4 changes: 2 additions & 2 deletions Include/funcobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ PyAPI_FUNC(int) PyFunction_SetAnnotations(PyObject *, PyObject *);
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
PyObject *func,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwargs);

PyAPI_FUNC(PyObject *) _PyFunction_FastCallKeywords(
PyObject *func,
PyObject **stack,
PyObject *const *stack,
Py_ssize_t nargs,
PyObject *kwnames);
#endif
Expand Down
12 changes: 6 additions & 6 deletions Include/methodobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type;
#define PyCFunction_Check(op) (Py_TYPE(op) == &PyCFunction_Type)

typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
typedef PyObject *(*_PyCFunctionFast) (PyObject *, PyObject **, Py_ssize_t);
typedef PyObject *(*_PyCFunctionFast) (PyObject *, PyObject *const *, Py_ssize_t);
typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
PyObject *);
typedef PyObject *(*_PyCFunctionFastWithKeywords) (PyObject *,
PyObject **, Py_ssize_t,
PyObject *const *, Py_ssize_t,
PyObject *);
typedef PyObject *(*PyNoArgsFunction)(PyObject *);

Expand All @@ -43,12 +43,12 @@ PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);

#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwargs);

PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func,
PyObject **stack,
PyObject *const *stack,
Py_ssize_t nargs,
PyObject *kwnames);
#endif
Expand Down Expand Up @@ -110,14 +110,14 @@ typedef struct {
PyAPI_FUNC(PyObject *) _PyMethodDef_RawFastCallDict(
PyMethodDef *method,
PyObject *self,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwargs);

PyAPI_FUNC(PyObject *) _PyMethodDef_RawFastCallKeywords(
PyMethodDef *method,
PyObject *self,
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwnames);
#endif
Expand Down
6 changes: 3 additions & 3 deletions Include/modsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...);

#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyArg_UnpackStack(
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
const char *name,
Py_ssize_t min,
Expand Down Expand Up @@ -99,12 +99,12 @@ typedef struct _PyArg_Parser {
PyAPI_FUNC(int) _PyArg_ParseTupleAndKeywordsFast(PyObject *, PyObject *,
struct _PyArg_Parser *, ...);
PyAPI_FUNC(int) _PyArg_ParseStack(
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
const char *format,
...);
PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords(
PyObject **args,
PyObject *const *args,
Py_ssize_t nargs,
PyObject *kwnames,
struct _PyArg_Parser *,
Expand Down
2 changes: 1 addition & 1 deletion Include/unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_Join(
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) _PyUnicode_JoinArray(
PyObject *separator,
PyObject **items,
PyObject *const *items,
Py_ssize_t seqlen
);
#endif /* Py_LIMITED_API */
Expand Down
6 changes: 3 additions & 3 deletions Modules/_collectionsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ _deque_rotate(dequeobject *deque, Py_ssize_t n)
}

static PyObject *
deque_rotate(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
deque_rotate(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
{
Py_ssize_t n=1;

Expand Down Expand Up @@ -1045,7 +1045,7 @@ deque_len(dequeobject *deque)
}

static PyObject *
deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
deque_index(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
{
Py_ssize_t i, n, start=0, stop=Py_SIZE(deque);
PyObject *v, *item;
Expand Down Expand Up @@ -1122,7 +1122,7 @@ PyDoc_STRVAR(index_doc,
*/

static PyObject *
deque_insert(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
deque_insert(dequeobject *deque, PyObject *const *args, Py_ssize_t nargs)
{
Py_ssize_t index;
Py_ssize_t n = Py_SIZE(deque);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_elementtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2771,7 +2771,7 @@ typedef struct {
} XMLParserObject;

static PyObject*
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs);
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *const *args, Py_ssize_t nargs);
static PyObject *
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
PyObject *pubid, PyObject *system);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ generate_hash_name_list(void)
*/
#define GEN_CONSTRUCTOR(NAME) \
static PyObject * \
EVP_new_ ## NAME (PyObject *self, PyObject **args, Py_ssize_t nargs) \
EVP_new_ ## NAME (PyObject *self, PyObject *const *args, Py_ssize_t nargs) \
{ \
PyObject *data_obj = NULL; \
Py_buffer view = { 0 }; \
Expand Down
4 changes: 2 additions & 2 deletions Modules/_io/clinic/_iomodule.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ _io_open_impl(PyObject *module, PyObject *file, const char *mode,
const char *newline, int closefd, PyObject *opener);

static PyObject *
_io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
Expand All @@ -158,4 +158,4 @@ _io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
exit:
return return_value;
}
/*[clinic end generated code: output=7e0ab289d8465580 input=a9049054013a1b77]*/
/*[clinic end generated code: output=a9de1ae79c960e81 input=a9049054013a1b77]*/
14 changes: 7 additions & 7 deletions Modules/_io/clinic/bufferedio.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static PyObject *
_io__Buffered_peek_impl(buffered *self, Py_ssize_t size);

static PyObject *
_io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_peek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = 0;
Expand All @@ -124,7 +124,7 @@ static PyObject *
_io__Buffered_read_impl(buffered *self, Py_ssize_t n);

static PyObject *
_io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_read(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
Expand All @@ -151,7 +151,7 @@ static PyObject *
_io__Buffered_read1_impl(buffered *self, Py_ssize_t n);

static PyObject *
_io__Buffered_read1(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_read1(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
Expand Down Expand Up @@ -240,7 +240,7 @@ static PyObject *
_io__Buffered_readline_impl(buffered *self, Py_ssize_t size);

static PyObject *
_io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_readline(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
Expand All @@ -267,7 +267,7 @@ static PyObject *
_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence);

static PyObject *
_io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_seek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *targetobj;
Expand Down Expand Up @@ -295,7 +295,7 @@ static PyObject *
_io__Buffered_truncate_impl(buffered *self, PyObject *pos);

static PyObject *
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs)
_io__Buffered_truncate(buffered *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *pos = Py_None;
Expand Down Expand Up @@ -476,4 +476,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=2b817df0bf814ddc input=a9049054013a1b77]*/
/*[clinic end generated code: output=9a20dd4eaabb5d58 input=a9049054013a1b77]*/
14 changes: 7 additions & 7 deletions Modules/_io/clinic/bytesio.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static PyObject *
_io_BytesIO_read_impl(bytesio *self, Py_ssize_t size);

static PyObject *
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_read(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
Expand Down Expand Up @@ -195,7 +195,7 @@ static PyObject *
_io_BytesIO_read1_impl(bytesio *self, Py_ssize_t size);

static PyObject *
_io_BytesIO_read1(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_read1(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
Expand Down Expand Up @@ -227,7 +227,7 @@ static PyObject *
_io_BytesIO_readline_impl(bytesio *self, Py_ssize_t size);

static PyObject *
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_readline(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
Expand Down Expand Up @@ -259,7 +259,7 @@ static PyObject *
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);

static PyObject *
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_readlines(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *arg = Py_None;
Expand Down Expand Up @@ -326,7 +326,7 @@ static PyObject *
_io_BytesIO_truncate_impl(bytesio *self, Py_ssize_t size);

static PyObject *
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_truncate(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = self->pos;
Expand Down Expand Up @@ -360,7 +360,7 @@ static PyObject *
_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence);

static PyObject *
_io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs)
_io_BytesIO_seek(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t pos;
Expand Down Expand Up @@ -444,4 +444,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=20946f5a2ed4492b input=a9049054013a1b77]*/
/*[clinic end generated code: output=9ba9a68c8c5669e7 input=a9049054013a1b77]*/
Loading