diff --git a/Include/fileutils.h b/Include/fileutils.h index a232460ef86..cb15936611b 100644 --- a/Include/fileutils.h +++ b/Include/fileutils.h @@ -6,7 +6,7 @@ extern "C" { #endif PyAPI_FUNC(wchar_t *) _Py_char2wchar( - char *arg); + const char *arg); PyAPI_FUNC(char*) _Py_wchar2char( const wchar_t *text); diff --git a/Python/fileutils.c b/Python/fileutils.c index 564e2c085be..076f510debd 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -17,7 +17,7 @@ PyMem_Free() to free the memory), or NULL on error (conversion error or memory error). */ wchar_t* -_Py_char2wchar(char* arg) +_Py_char2wchar(const char* arg) { wchar_t *res; #ifdef HAVE_BROKEN_MBSTOWCS