From 84b8e92e463bd6a5174bd3e5a6543580f6319c57 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 30 Mar 2017 10:01:03 +0300 Subject: bpo-29918: Add missed "const" modifiers in C API documentation. (#846) --- Doc/extending/extending.rst | 6 +++--- Doc/extending/newtypes.rst | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Doc/extending') diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 4ac820a432..2dc20fed13 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -727,9 +727,9 @@ Philbrick (philbrick@hks.com):: keywdarg_parrot(PyObject *self, PyObject *args, PyObject *keywds) { int voltage; - char *state = "a stiff"; - char *action = "voom"; - char *type = "Norwegian Blue"; + const char *state = "a stiff"; + const char *action = "voom"; + const char *type = "Norwegian Blue"; static char *kwlist[] = {"voltage", "state", "action", "type", NULL}; diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 118f336ae1..449c1e2754 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -1361,9 +1361,9 @@ Here is a desultory example of the implementation of the call function. :: newdatatype_call(newdatatypeobject *obj, PyObject *args, PyObject *other) { PyObject *result; - char *arg1; - char *arg2; - char *arg3; + const char *arg1; + const char *arg2; + const char *arg3; if (!PyArg_ParseTuple(args, "sss:call", &arg1, &arg2, &arg3)) { return NULL; -- cgit v1.2.1