[New-bugs-announce] [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t*
Mark Dickinson
report at bugs.python.org
Tue Feb 3 17:53:09 CET 2009
New submission from Mark Dickinson <dickinsm at gmail.com>:
When building the py3k branch on OS X, I get the following warning:
gcc -c -fno-strict-aliasing -g -Wall -Wstrict-prototypes -I. -IInclude -
I./Include -DPy_BUILD_CORE -o Modules/main.o Modules/main.c
Modules/main.c: In function ‘Py_Main’:
Modules/main.c:491: warning: passing argument 1 of ‘Py_SetProgramName’
from incompatible pointer type
This *looks* like it might be a genuine problem. Lines 490-493 of main.c
(which occur inside an #ifdef __APPLE__) look like this:
if ((p = Py_GETENV("PYTHONEXECUTABLE")) && *p != '\0')
Py_SetProgramName(p);
else
Py_SetProgramName(argv[0]);
The return from Py_GETENV (which calls the system getenv) has type char*,
but Py_SetProgramName expects something of type wchar_t*.
However, I don't know enough about this part of Python to tell for sure
whether there's really something wrong here.
Ronald, any ideas?
----------
components: Macintosh
messages: 81066
nosy: marketdickinson, ronaldoussoren
severity: normal
status: open
title: OS X: Py_SetProgramName argument has type char*; should be wchar_t*
versions: Python 3.0, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5143>
_______________________________________
More information about the New-bugs-announce
mailing list