]> granicus.if.org Git - python/commitdiff
Mark _Py_char2wchar() input argument as constant
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 15 Oct 2010 11:15:54 +0000 (11:15 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 15 Oct 2010 11:15:54 +0000 (11:15 +0000)
Include/fileutils.h
Python/fileutils.c

index a232460ef868b373592b778194732fcbcf352ced..cb15936611bcc9d9291755de1751b4460314d17c 100644 (file)
@@ -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);
index 564e2c085be282eab5cc018904226c0184a9e30c..076f510debd07a77cf081939b8fe55408f4383b0 100644 (file)
@@ -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