diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-30 07:01:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 07:01:03 (GMT) |
commit | 84b8e92e463bd6a5174bd3e5a6543580f6319c57 (patch) | |
tree | d8aeb7d0360e2e538ccafb0ecd26ea52a58d7aff /Doc/extending | |
parent | 576def096ec7b64814e038f03290031f172886c3 (diff) | |
download | cpython-84b8e92e463bd6a5174bd3e5a6543580f6319c57.zip cpython-84b8e92e463bd6a5174bd3e5a6543580f6319c57.tar.gz cpython-84b8e92e463bd6a5174bd3e5a6543580f6319c57.tar.bz2 |
bpo-29918: Add missed "const" modifiers in C API documentation. (#846)
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/extending.rst | 6 | ||||
-rw-r--r-- | Doc/extending/newtypes.rst | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 4ac820a..2dc20fe 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 118f336..449c1e2 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; |