summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-22 05:58:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-22 05:58:08 (GMT)
commit007d7ff73f4e6e65cfafd512f9c23f7b7119b803 (patch)
tree31bd8b875b309b4259ca9eceff5a6746b0d4b19a /Include
parent9af740b99a19a85ad5f38379b6175cf4ead685ba (diff)
downloadcpython-007d7ff73f4e6e65cfafd512f9c23f7b7119b803.zip
cpython-007d7ff73f4e6e65cfafd512f9c23f7b7119b803.tar.gz
cpython-007d7ff73f4e6e65cfafd512f9c23f7b7119b803.tar.bz2
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 *".
Diffstat (limited to 'Include')
-rw-r--r--Include/descrobject.h8
-rw-r--r--Include/structmember.h4
-rw-r--r--Include/structseq.h8
3 files changed, 10 insertions, 10 deletions
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 PyObject *(*getter)(PyObject *, void *);
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 @@ typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
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 @@ extern "C" {
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 @@ extern "C" {
#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;