Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5d1e343

Browse files
author
Victor Stinner
committed
Mark _Py_char2wchar() input argument as constant
1 parent d449a8a commit 5d1e343

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Include/fileutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ extern "C" {
66
#endif
77

88
PyAPI_FUNC(wchar_t *) _Py_char2wchar(
9-
char *arg);
9+
const char *arg);
1010

1111
PyAPI_FUNC(char*) _Py_wchar2char(
1212
const wchar_t *text);

Python/fileutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
PyMem_Free() to free the memory), or NULL on error (conversion error or
1818
memory error). */
1919
wchar_t*
20-
_Py_char2wchar(char* arg)
20+
_Py_char2wchar(const char* arg)
2121
{
2222
wchar_t *res;
2323
#ifdef HAVE_BROKEN_MBSTOWCS

0 commit comments

Comments
 (0)