diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-21 09:38:37 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-21 09:38:37 (GMT) |
commit | f80e740b7708d732162df8df9d8d7b7df68360c3 (patch) | |
tree | 54b8cb9a3565eb73ef25f7425366e70f2edc9fdb | |
parent | b57d9eac41125bc4a53a1ba9987ba776b4cc6680 (diff) | |
parent | bb8fd5b1eb3f8ba1339e449cebabec370d63fa47 (diff) | |
download | cpython-f80e740b7708d732162df8df9d8d7b7df68360c3.zip cpython-f80e740b7708d732162df8df9d8d7b7df68360c3.tar.gz cpython-f80e740b7708d732162df8df9d8d7b7df68360c3.tar.bz2 |
Fixed the documentation of the structure PyMethodDef.
The fields ml_name and ml_doc are of type "const char *" rather of "char *".
-rw-r--r-- | Doc/extending/newtypes.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 4a6e26c..b8ce437 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -1122,10 +1122,10 @@ If :c:member:`~PyTypeObject.tp_methods` is not *NULL*, it must refer to an array structure:: typedef struct PyMethodDef { - char *ml_name; /* method name */ + const char *ml_name; /* method name */ PyCFunction ml_meth; /* implementation function */ int ml_flags; /* flags */ - char *ml_doc; /* docstring */ + const char *ml_doc; /* docstring */ } PyMethodDef; One entry should be defined for each method provided by the type; no entries are |