From: Brett Cannon Date: Thu, 2 Apr 2009 03:34:53 +0000 (+0000) Subject: Fix two issues introduced by issue #71031 by changing the signature of X-Git-Tag: v2.7a1~1604 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=238cedcd6339e747daa6e2a383678d893482ef6d;p=python Fix two issues introduced by issue #71031 by changing the signature of PyImport_AppendInittab() to take a const char *. --- diff --git a/Include/import.h b/Include/import.h index 05ad7f008a..a6e2857392 100644 --- a/Include/import.h +++ b/Include/import.h @@ -43,7 +43,7 @@ struct _inittab { PyAPI_DATA(PyTypeObject) PyNullImporter_Type; 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); struct _frozen { diff --git a/Python/import.c b/Python/import.c index b39cb18f23..5e42e5c9f3 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3382,7 +3382,7 @@ PyImport_AppendInittab(const char *name, void (*initfunc)(void)) memset(newtab, '\0', sizeof newtab); - newtab[0].name = name; + newtab[0].name = (char *)name; newtab[0].initfunc = initfunc; return PyImport_ExtendInittab(newtab);