In Python3 PySys_SetArgv takes (wchar_t **) for the argv, I looked
into converting a (char **) into a (wchar_t **) and while its possible
its lengthy enough not to be trivial, see python.c:18 - char2wcharm(),
its 102 lines with ifdef's and goto's, not including the loop lower
down that loops over the argv.

Looking further python has a very similar function for
./PC/bdist_wininst/install.c, for do_run_installscript  -
widen_string().

Since many C applications take argv as a (char **) it seems reasonable
for python to keep a function for the C api that accepts a  (char **)
argument for argv.
otherwise each C applications that embeds python will need to write
their own conversion function.

also noticed Demo/embed/demo.c is out of date, giving (char **) to
PySys_SetArgv().
-- 
- Campbell
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to