Commit 238cedcd authored by Brett Cannon's avatar Brett Cannon

Fix two issues introduced by issue #71031 by changing the signature of

PyImport_AppendInittab() to take a const char *.
parent 345b2fe2
...@@ -43,7 +43,7 @@ struct _inittab { ...@@ -43,7 +43,7 @@ struct _inittab {
PyAPI_DATA(PyTypeObject) PyNullImporter_Type; PyAPI_DATA(PyTypeObject) PyNullImporter_Type;
PyAPI_DATA(struct _inittab *) PyImport_Inittab; PyAPI_DATA(struct _inittab *) PyImport_Inittab;
PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void)); PyAPI_FUNC(int) PyImport_AppendInittab(const char *name, void (*initfunc)(void));
PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
struct _frozen { struct _frozen {
......
...@@ -3382,7 +3382,7 @@ PyImport_AppendInittab(const char *name, void (*initfunc)(void)) ...@@ -3382,7 +3382,7 @@ PyImport_AppendInittab(const char *name, void (*initfunc)(void))
memset(newtab, '\0', sizeof newtab); memset(newtab, '\0', sizeof newtab);
newtab[0].name = name; newtab[0].name = (char *)name;
newtab[0].initfunc = initfunc; newtab[0].initfunc = initfunc;
return PyImport_ExtendInittab(newtab); return PyImport_ExtendInittab(newtab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment