diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-12-15 11:11:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-15 11:11:11 (GMT) |
commit | a5552f023e1d8cbafee1e51d316cc581deb2295f (patch) | |
tree | f7cb07017f409fb035ec999efed8ddae18446865 /Include | |
parent | 3325a6780c81f1ea51190370b5454879c4862a37 (diff) | |
download | cpython-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 'Include')
-rw-r--r-- | Include/abstract.h | 16 | ||||
-rw-r--r-- | Include/descrobject.h | 2 | ||||
-rw-r--r-- | Include/eval.h | 12 | ||||
-rw-r--r-- | Include/funcobject.h | 4 | ||||
-rw-r--r-- | Include/methodobject.h | 12 | ||||
-rw-r--r-- | Include/modsupport.h | 6 | ||||
-rw-r--r-- | Include/unicodeobject.h | 2 |
7 files changed, 27 insertions, 27 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 8969019..991c1c3 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -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); @@ -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). @@ -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* @@ -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); @@ -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); @@ -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, diff --git a/Include/descrobject.h b/Include/descrobject.h index cb43174..73bbb3f 100644 --- a/Include/descrobject.h +++ b/Include/descrobject.h @@ -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) diff --git a/Include/eval.h b/Include/eval.h index 9541e10..2c1c2d0 100644 --- a/Include/eval.h +++ b/Include/eval.h @@ -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); diff --git a/Include/funcobject.h b/Include/funcobject.h index 89305dc..86674ac 100644 --- a/Include/funcobject.h +++ b/Include/funcobject.h @@ -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 diff --git a/Include/methodobject.h b/Include/methodobject.h index 66e6a55..ea35d86 100644 --- a/Include/methodobject.h +++ b/Include/methodobject.h @@ -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 *); @@ -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 @@ -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 diff --git a/Include/modsupport.h b/Include/modsupport.h index 73d86a9..a238bef 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -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, @@ -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 *, diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 61e713b..0274de6 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -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 */ |