diff --git a/Include/import.h b/Include/import.h index 400e97cefe2..26e1f0f28da 100644 --- a/Include/import.h +++ b/Include/import.h @@ -65,9 +65,9 @@ PyAPI_FUNC(int) _PyImport_ReleaseLock(void); PyAPI_FUNC(void) _PyImport_ReInitLock(void); PyAPI_FUNC(PyObject *)_PyImport_FindBuiltin( - char *name /* UTF-8 encoded string */ + const char *name /* UTF-8 encoded string */ ); -PyAPI_FUNC(PyObject *)_PyImport_FindExtensionUnicode(char *, PyObject *); +PyAPI_FUNC(PyObject *)_PyImport_FindExtensionUnicode(const char *, PyObject *); PyAPI_FUNC(int)_PyImport_FixupBuiltin( PyObject *mod, char *name /* UTF-8 encoded string */ diff --git a/Python/import.c b/Python/import.c index f4015b52faa..39cd93f7ddf 100644 --- a/Python/import.c +++ b/Python/import.c @@ -636,7 +636,7 @@ _PyImport_FixupBuiltin(PyObject *mod, char *name) } PyObject * -_PyImport_FindExtensionUnicode(char *name, PyObject *filename) +_PyImport_FindExtensionUnicode(const char *name, PyObject *filename) { PyObject *mod, *mdict; PyModuleDef* def; @@ -680,7 +680,7 @@ _PyImport_FindExtensionUnicode(char *name, PyObject *filename) } PyObject * -_PyImport_FindBuiltin(char *name) +_PyImport_FindBuiltin(const char *name) { PyObject *res, *filename; filename = PyUnicode_FromString(name);