Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,
PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
type "const char *" rather of "char *".
diff --git a/Include/descrobject.h b/Include/descrobject.h
index 8f3e84c..013d645 100644
--- a/Include/descrobject.h
+++ b/Include/descrobject.h
@@ -9,10 +9,10 @@
typedef int (*setter)(PyObject *, PyObject *, void *);
typedef struct PyGetSetDef {
- char *name;
+ const char *name;
getter get;
setter set;
- char *doc;
+ const char *doc;
void *closure;
} PyGetSetDef;
@@ -24,11 +24,11 @@
void *wrapped, PyObject *kwds);
struct wrapperbase {
- char *name;
+ const char *name;
int offset;
void *function;
wrapperfunc wrapper;
- char *doc;
+ const char *doc;
int flags;
PyObject *name_strobj;
};
diff --git a/Include/structmember.h b/Include/structmember.h
index 5da8a46..b54f708 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -16,11 +16,11 @@
pointer is NULL. */
typedef struct PyMemberDef {
- char *name;
+ const char *name;
int type;
Py_ssize_t offset;
int flags;
- char *doc;
+ const char *doc;
} PyMemberDef;
/* Types */
diff --git a/Include/structseq.h b/Include/structseq.h
index af22716..e5e5d5c 100644
--- a/Include/structseq.h
+++ b/Include/structseq.h
@@ -8,13 +8,13 @@
#endif
typedef struct PyStructSequence_Field {
- char *name;
- char *doc;
+ const char *name;
+ const char *doc;
} PyStructSequence_Field;
typedef struct PyStructSequence_Desc {
- char *name;
- char *doc;
+ const char *name;
+ const char *doc;
struct PyStructSequence_Field *fields;
int n_in_sequence;
} PyStructSequence_Desc;