Skip to content

bpo-43956: Doc/c-api: Fix default program name #24876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,13 @@ Process-wide parameters
of the ``argv[0]`` argument to the :c:func:`main` function of the program
(converted to wide characters).
This is used by :c:func:`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 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.
the Python run-time libraries relative to the interpreter executable.
Without calling this function, a program name is inferred as described in
:c:member:`PyConfig.program_name`. The argument should point to a
zero-terminated wide character string. The string will be copied, so the
caller may free the corresponding memory afterwards. The argument to this
function may be ``NULL`` or an empty string, in which case the function does
nothing.

Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
:c:type:`wchar_*` string.
Expand Down