diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-04-05 20:41:37 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-04-05 20:41:37 (GMT) |
commit | 790465fd90e8a72590386465f518db9e67ab843f (patch) | |
tree | 62e3e47f6f97120dfdfc94a87dc1a06414d95a13 /Doc/c-api/init.rst | |
parent | b9279bc88f867d9d3b6606502a678b137329b54d (diff) | |
download | cpython-790465fd90e8a72590386465f518db9e67ab843f.zip cpython-790465fd90e8a72590386465f518db9e67ab843f.tar.gz cpython-790465fd90e8a72590386465f518db9e67ab843f.tar.bz2 |
Change command line processing API to use wchar_t.
Fixes #2128.
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r-- | Doc/c-api/init.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index dac37e1..53fc735 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -161,7 +161,7 @@ Initialization, Finalization, and Threads haven't been explicitly destroyed at that point. -.. cfunction:: void Py_SetProgramName(char *name) +.. cfunction:: void Py_SetProgramName(wchar_t *name) .. index:: single: Py_Initialize() @@ -170,11 +170,12 @@ Initialization, Finalization, and Threads This function should be called before :cfunc:`Py_Initialize` is called for the first time, if it is called at all. It tells the interpreter the value - of the ``argv[0]`` argument to the :cfunc:`main` function of the program. + of the ``argv[0]`` argument to the :cfunc:`main` function of the program + (converted to wide characters). This is used by :cfunc:`Py_GetPath` and some other functions below to find the Python run-time libraries relative to the interpreter executable. The default value is ``'python'``. The argument should point to a - zero-terminated character string in static storage whose contents will not + zero-terminated wide character string in static storage whose contents will not change for the duration of the program's execution. No code in the Python interpreter will change the contents of this storage. @@ -188,7 +189,7 @@ Initialization, Finalization, and Threads value. -.. cfunction:: char* Py_GetPrefix() +.. cfunction:: wchar_t* Py_GetPrefix() Return the *prefix* for installed platform-independent files. This is derived through a number of complicated rules from the program name set with @@ -201,7 +202,7 @@ Initialization, Finalization, and Threads It is only useful on Unix. See also the next function. -.. cfunction:: char* Py_GetExecPrefix() +.. cfunction:: wchar_t* Py_GetExecPrefix() Return the *exec-prefix* for installed platform-*dependent* files. This is derived through a number of complicated rules from the program name set with @@ -236,7 +237,7 @@ Initialization, Finalization, and Threads platform. -.. cfunction:: char* Py_GetProgramFullPath() +.. cfunction:: wchar_t* Py_GetProgramFullPath() .. index:: single: Py_SetProgramName() @@ -249,7 +250,7 @@ Initialization, Finalization, and Threads to Python code as ``sys.executable``. -.. cfunction:: char* Py_GetPath() +.. cfunction:: wchar_t* Py_GetPath() .. index:: triple: module; search; path @@ -342,7 +343,7 @@ Initialization, Finalization, and Threads ``sys.version``. -.. cfunction:: void PySys_SetArgv(int argc, char **argv) +.. cfunction:: void PySys_SetArgv(int argc, wchar_t **argv) .. index:: single: main() |