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
[C API] Rename CFrame or hide it to only export names starting with Py #89594
Comments
#include <Python.h> should only define names which start with "Py" (Py, _Py, PY, _PY), but it now defines a structure called "CFrame" in Include/cpython/pystate.h. We should either make the whole PyThreadState structure private (move it to the internal C API), or rename CFrame (to PyCFrame?). |
See also bpo-45316: [C API] Functions not exported with PyAPI_FUNC(). |
See also the old isssue with "READONLY": bpo-2897 "PyMemberDef missing in limited API / Deprecate structmember.h". |
Struct names aren't exported as symbols. $ nm ./python | grep CFrame So, I assume that are worried about name clashes for code that has
#include "Python.h". Isn't the threadstate struct supposed to be opaque? I don't want to add a "Py" prefix to the name of the CFrame struct. |
Mark Shannon:
Right.
Right :-)
Technically, it's public. I'm working on making it opaque in bpo-39947. |
Well, moving PyThreadState to the internal C API is complicate. I prefer to start by renaming CFrame to PyCFrame: see #75765. |
Ok, CFrame has been renamed.
This idea is tracked by bpo-39947. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: