Skip to content

gh-107211: No longer export internal variables #107218

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
Jul 25, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jul 25, 2023

No longer export these 5 internal C API variables:

  • _PyBufferWrapper_Type
  • _PyImport_FrozenBootstrap
  • _PyImport_FrozenStdlib
  • _PyImport_FrozenTest
  • _Py_SwappedOp

Fix definition of these internal functions, replace PyAPI_DATA() with PyAPI_FUNC():

  • _PyImport_ClearExtension()
  • _PyObject_IsFreed()
  • _PyThreadState_GetCurrent()

No longer export _PyBufferWrapper_Type internal C API variable.

Fix definition of these internal functions, replace PyAPI_DATA() with
PyAPI_FUNC():

* _PyImport_ClearExtension()
* _PyObject_IsFreed()
* _PyThreadState_GetCurrent()
@vstinner vstinner merged commit 3b30931 into python:main Jul 25, 2023
@vstinner vstinner deleted the extern_data branch July 25, 2023 03:51
@vstinner
Copy link
Member Author

Oh, sadly the commit message is wrong. At the end, only _PyBufferWrapper_Type is no longer exported.

jtcave pushed a commit to jtcave/cpython that referenced this pull request Jul 27, 2023
No longer export these 5 internal C API variables:

* _PyBufferWrapper_Type
* _PyImport_FrozenBootstrap
* _PyImport_FrozenStdlib
* _PyImport_FrozenTest
* _Py_SwappedOp

Fix the definition of these internal functions, replace PyAPI_DATA()
with PyAPI_FUNC():

* _PyImport_ClearExtension()
* _PyObject_IsFreed()
* _PyThreadState_GetCurrent()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants