Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 86484:3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Sat, 19 Oct 2013 21:03:34 +0300 |
| parents | ef889c3d5dc6 |
| children | 3f9f2cfae53b |
line wrap: on
line diff
--- a/Python/import.c Sat Oct 19 19:55:38 2013 +0200 +++ b/Python/import.c Sat Oct 19 21:03:34 2013 +0300 @@ -517,7 +517,7 @@ } int -_PyImport_FixupBuiltin(PyObject *mod, char *name) +_PyImport_FixupBuiltin(PyObject *mod, const char *name) { int res; PyObject *nameobj; @@ -656,22 +656,23 @@ * interface. The other two exist primarily for backward compatibility. */ PyObject * -PyImport_ExecCodeModule(char *name, PyObject *co) +PyImport_ExecCodeModule(const char *name, PyObject *co) { return PyImport_ExecCodeModuleWithPathnames( name, co, (char *)NULL, (char *)NULL); } PyObject * -PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname) +PyImport_ExecCodeModuleEx(const char *name, PyObject *co, const char *pathname) { return PyImport_ExecCodeModuleWithPathnames( name, co, pathname, (char *)NULL); } PyObject * -PyImport_ExecCodeModuleWithPathnames(char *name, PyObject *co, char *pathname, - char *cpathname) +PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co, + const char *pathname, + const char *cpathname) { PyObject *m = NULL; PyObject *nameobj, *pathobj = NULL, *cpathobj = NULL; @@ -1019,7 +1020,7 @@ size = p->size; if (size < 0) size = -size; - return PyMarshal_ReadObjectFromString((char *)p->code, size); + return PyMarshal_ReadObjectFromString((const char *)p->code, size); } static PyObject * @@ -1071,7 +1072,7 @@ ispackage = (size < 0); if (ispackage) size = -size; - co = PyMarshal_ReadObjectFromString((char *)p->code, size); + co = PyMarshal_ReadObjectFromString((const char *)p->code, size); if (co == NULL) return -1; if (!PyCode_Check(co)) { @@ -1113,7 +1114,7 @@ } int -PyImport_ImportFrozenModule(char *name) +PyImport_ImportFrozenModule(const char *name) { PyObject *nameobj; int ret;
