]> granicus.if.org Git - python/commitdiff
Fix two issues introduced by issue #71031 by changing the signature of
authorBrett Cannon <bcannon@gmail.com>
Thu, 2 Apr 2009 03:34:53 +0000 (03:34 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 2 Apr 2009 03:34:53 +0000 (03:34 +0000)
PyImport_AppendInittab() to take a const char *.

Include/import.h
Python/import.c

index 05ad7f008a0091d79d1fb468a3fe1995097fa1d8..a6e2857392ea184544173cc4798221b2520a451e 100644 (file)
@@ -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 {
index b39cb18f23e5c7e556495a37c396a1854a0750b3..5e42e5c9f30ffed6f7af4eb2aef4d7b486e9ed99 100644 (file)
@@ -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);