Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb8fd5b

Browse files
Fixed the documentation of the structure PyMethodDef.
The fields ml_name and ml_doc are of type "const char *" rather of "char *".
2 parents 2863c38 + 06a8dea commit bb8fd5b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/extending/newtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,10 +1122,10 @@ If :c:member:`~PyTypeObject.tp_methods` is not *NULL*, it must refer to an array
11221122
structure::
11231123

11241124
typedef struct PyMethodDef {
1125-
char *ml_name; /* method name */
1125+
const char *ml_name; /* method name */
11261126
PyCFunction ml_meth; /* implementation function */
11271127
int ml_flags; /* flags */
1128-
char *ml_doc; /* docstring */
1128+
const char *ml_doc; /* docstring */
11291129
} PyMethodDef;
11301130

11311131
One entry should be defined for each method provided by the type; no entries are

0 commit comments

Comments
 (0)