Skip to content

[3.9] bpo-40910: Export Py_GetArgcArgv() function (GH-20721) #20723

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

Merged
merged 1 commit into from
Jun 8, 2020
Merged

[3.9] bpo-40910: Export Py_GetArgcArgv() function (GH-20721) #20723

merged 1 commit into from
Jun 8, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 8, 2020

Export explicitly the Py_GetArgcArgv() function to the C API and
document the function. Previously, it was exported implicitly which
no longer works since Python is built with -fvisibility=hidden.

  • Add PyConfig._orig_argv member.
  • Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice.
  • PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now
    _PyConfig_Write() responsibility.
  • _PyConfig_Write() result type becomes PyStatus instead of void.
  • Write an unit test on Py_GetArgcArgv().

(cherry picked from commit e81f6e6)

https://bugs.python.org/issue40910

Export explicitly the Py_GetArgcArgv() function to the C API and
document the function. Previously, it was exported implicitly which
no longer works since Python is built with -fvisibility=hidden.

* Add PyConfig._orig_argv member.
* Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice.
* PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now
  _PyConfig_Write() responsibility.
* _PyConfig_Write() result type becomes PyStatus instead of void.
* Write an unit test on Py_GetArgcArgv().

(cherry picked from commit e81f6e6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants