A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-July/090508.html below:

[Python-Dev] Suggested PySys_SetArgv use with a (char **) argv ?

[Python-Dev] Suggested PySys_SetArgv use with a (char **) argv ? [Python-Dev] Suggested PySys_SetArgv use with a (char **) argv ?Campbell Barton ideasman42 at gmail.com
Tue Jul 7 19:38:05 CEST 2009
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4