summaryrefslogtreecommitdiff
path: root/Doc/extending
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-30 10:01:03 +0300
committerGitHub <noreply@github.com>2017-03-30 10:01:03 +0300
commit84b8e92e463bd6a5174bd3e5a6543580f6319c57 (patch)
treed8aeb7d0360e2e538ccafb0ecd26ea52a58d7aff /Doc/extending
parent576def096ec7b64814e038f03290031f172886c3 (diff)
downloadcpython-git-84b8e92e463bd6a5174bd3e5a6543580f6319c57.tar.gz
bpo-29918: Add missed "const" modifiers in C API documentation. (#846)
Diffstat (limited to 'Doc/extending')
-rw-r--r--Doc/extending/extending.rst6
-rw-r--r--Doc/extending/newtypes.rst6
2 files changed, 6 insertions, 6 deletions
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;