summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.c
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 /Modules/_struct.c
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 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 04d7f8e..66f74d6 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1733,7 +1733,7 @@ Struct_iter_unpack(PyStructObject *self, PyObject *buffer)
*
*/
static int
-s_pack_internal(PyStructObject *soself, PyObject **args, int offset, char* buf)
+s_pack_internal(PyStructObject *soself, PyObject *const *args, int offset, char* buf)
{
formatcode *code;
/* XXX(nnorwitz): why does i need to be a local? can we use
@@ -1820,7 +1820,7 @@ to the format string S.format. See help(struct) for more on format\n\
strings.");
static PyObject *
-s_pack(PyObject *self, PyObject **args, Py_ssize_t nargs)
+s_pack(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyStructObject *soself;
PyObject *result;
@@ -1859,7 +1859,7 @@ offset. Note that the offset is a required argument. See\n\
help(struct) for more on format strings.");
static PyObject *
-s_pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs)
+s_pack_into(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyStructObject *soself;
Py_buffer buffer;
@@ -2123,7 +2123,7 @@ Return a bytes object containing the values v1, v2, ... packed according\n\
to the format string. See help(struct) for more on format strings.");
static PyObject *
-pack(PyObject *self, PyObject **args, Py_ssize_t nargs)
+pack(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *s_object = NULL;
PyObject *format, *result;
@@ -2151,7 +2151,7 @@ that the offset is a required argument. See help(struct) for more\n\
on format strings.");
static PyObject *
-pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs)
+pack_into(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *s_object = NULL;
PyObject *format, *result;