]> granicus.if.org Git - python/commitdiff
Fixed the documentation of the structure PyMethodDef.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 21 Nov 2016 09:37:18 +0000 (11:37 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 21 Nov 2016 09:37:18 +0000 (11:37 +0200)
The fields ml_name and ml_doc are of type "const char *" rather of "char *".

Doc/extending/newtypes.rst

index ee173b7e23212748136c0cf129ce01af1851bce2..6e275e58ef17b8303dcfacda99d70b0d54567b0e 100644 (file)
@@ -1170,10 +1170,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