Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 52721:54e093bd887e
Merged revisions 71031 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71031 | brett.cannon | 2009-04-01 20:17:39 -0700 (Wed, 01 Apr 2009) | 6 lines
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:41:46 +0000 |
| parents | 6259f80dc24d |
| children | c7042127196a 3aaf2e065db0 |
line wrap: on
line diff
--- a/Python/import.c Thu Apr 02 03:02:03 2009 +0000 +++ b/Python/import.c Thu Apr 02 03:41:46 2009 +0000 @@ -3488,13 +3488,13 @@ /* Shorthand to add a single entry given a name and a function */ int -PyImport_AppendInittab(char *name, PyObject* (*initfunc)(void)) +PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void)) { struct _inittab newtab[2]; memset(newtab, '\0', sizeof newtab); - newtab[0].name = name; + newtab[0].name = (char *)name; newtab[0].initfunc = initfunc; return PyImport_ExtendInittab(newtab);
