-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Clean-up pyatomic headers #109693
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
Comments
Use functions from `pyatomic.h` instead.
_PyUnicode_FromId() now uses pyatomic.h functions instead.
@vstinner, For |
I was fine to remove pycore_atomic_funcs.h at once since it's only used by _PyUnicode_FromId() which is... no longer used by Python itself! To remove pycore_atomic.h, I would prefer to make baby steps: convert usage one by one. For example, you can start by converting signal handlers: get_handler() and set_handler() in Modules/signalmodule.c, and also the two "tripped" variables. If someone goes wrong, it would be easier to revert changes if they have limited scope. Also, smaller PRs are easier to review :-) |
_PyUnicode_FromId() now uses pyatomic.h functions instead.
@colesbury @vstinner cpython/Include/internal/pycore_gil.h Lines 28 to 31 in 67e8d41
|
The last part seems to be about annotations:
|
Hum, in fact, these symbols come from dynamic_annotations.h. It seems like pycore_pyatomic.h is no longer needed. @corona10: Do you want to prepare a PR to remove it? |
Yeah, I am preparing the PR |
@colesbury @vstinner I think that now we can close this issue. |
Thanks @corona10! |
Well done. One less legacy API in Python C API :-) |
_PyUnicode_FromId() now uses pyatomic.h functions instead.
Feature or enhancement
Now that #108337 is done, we have three atomic headers. We should be able to remove
pycore_atomic.h
andpycore_atomic_funcs.h
and replace their usages with calls topyatomic.h
.cc @vstinner
Linked PRs
The text was updated successfully, but these errors were encountered: