Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 52718:1ef3da6c434c legacy-trunk
PyImport_AppendInittab() took a char * as a first argument even though that
string was stored beyond the life of the call. Changed the signature to be
const char * to help make this point.
Closes issue #1419652.
| author | Brett Cannon <bcannon@gmail.com> |
|---|---|
| date | Thu, 02 Apr 2009 03:17:39 +0000 |
| parents | ef8fe9088696 |
| children | fd5ee3d0f552 |
line wrap: on
line diff
--- a/Python/import.c Thu Apr 02 03:00:34 2009 +0000 +++ b/Python/import.c Thu Apr 02 03:17:39 2009 +0000 @@ -3376,7 +3376,7 @@ /* Shorthand to add a single entry given a name and a function */ int -PyImport_AppendInittab(char *name, void (*initfunc)(void)) +PyImport_AppendInittab(const char *name, void (*initfunc)(void)) { struct _inittab newtab[2];
