const poisoning, spreading to fix new const warnings
in _winreg.c.
This commit is contained in:
parent
dc297b4ef4
commit
c3d12ac88c
|
@ -79,11 +79,11 @@ typedef struct PyMemberDef {
|
|||
|
||||
|
||||
/* Obsolete API, for binary backwards compatibility */
|
||||
PyAPI_FUNC(PyObject *) PyMember_Get(char *, struct memberlist *, char *);
|
||||
PyAPI_FUNC(int) PyMember_Set(char *, struct memberlist *, char *, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyMember_Get(const char *, struct memberlist *, const char *);
|
||||
PyAPI_FUNC(int) PyMember_Set(char *, struct memberlist *, const char *, PyObject *);
|
||||
|
||||
/* Current API, use this */
|
||||
PyAPI_FUNC(PyObject *) PyMember_GetOne(char *, struct PyMemberDef *);
|
||||
PyAPI_FUNC(PyObject *) PyMember_GetOne(const char *, struct PyMemberDef *);
|
||||
PyAPI_FUNC(int) PyMember_SetOne(char *, struct PyMemberDef *, PyObject *);
|
||||
|
||||
|
||||
|
|
|
@ -455,7 +455,7 @@ static PyNumberMethods PyHKEY_NumberMethods =
|
|||
|
||||
|
||||
/* fwd declare __getattr__ */
|
||||
static PyObject *PyHKEY_getattr(PyObject *self, char *name);
|
||||
static PyObject *PyHKEY_getattr(PyObject *self, const char *name);
|
||||
|
||||
/* The type itself */
|
||||
PyTypeObject PyHKEY_Type =
|
||||
|
@ -526,7 +526,7 @@ static struct PyMethodDef PyHKEY_methods[] = {
|
|||
};
|
||||
|
||||
/*static*/ PyObject *
|
||||
PyHKEY_getattr(PyObject *self, char *name)
|
||||
PyHKEY_getattr(PyObject *self, const char *name)
|
||||
{
|
||||
PyObject *res;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ listmembers(struct memberlist *mlist)
|
|||
}
|
||||
|
||||
PyObject *
|
||||
PyMember_Get(char *addr, struct memberlist *mlist, char *name)
|
||||
PyMember_Get(const char *addr, struct memberlist *mlist, const char *name)
|
||||
{
|
||||
struct memberlist *l;
|
||||
|
||||
|
@ -51,7 +51,7 @@ PyMember_Get(char *addr, struct memberlist *mlist, char *name)
|
|||
}
|
||||
|
||||
PyObject *
|
||||
PyMember_GetOne(char *addr, PyMemberDef *l)
|
||||
PyMember_GetOne(const char *addr, PyMemberDef *l)
|
||||
{
|
||||
PyObject *v;
|
||||
if ((l->flags & READ_RESTRICTED) &&
|
||||
|
@ -134,7 +134,7 @@ PyMember_GetOne(char *addr, PyMemberDef *l)
|
|||
}
|
||||
|
||||
int
|
||||
PyMember_Set(char *addr, struct memberlist *mlist, char *name, PyObject *v)
|
||||
PyMember_Set(char *addr, struct memberlist *mlist, const char *name, PyObject *v)
|
||||
{
|
||||
struct memberlist *l;
|
||||
|
||||
|
|
Loading…
Reference in New Issue