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
Convert _decimal C API from pointer array to struct #87226
Comments
Can you explain what problem this would be solving? |
In my opinion, an array of pointers is a bad API; using a struct (like most of the other API's) is an improvement. Ref. discussions on #68374 (#24186 (comment)) and bpo-43009. |
The existing code is how types were made for most of Python's history. It is not "bad"; it is just more wordy. Given that the current code is correct, I don't see any strong reason to churn the code. |
Agree. Using sturct will be more easy check the members. But converting the decimal c api may breaks the compatibility, because some macros like |
True. Is there many external users of this API? I could not find any relevant examples using searchcode.com. |
I have no opinion about *adding* a struct, but we shouldn't remove the existing array of pointers, or this will needlessly break compatibility for existing users of the C API. |
Hm, many teams don't open their code, so we get check all user cases by searchcode web. So I have no any better sugesstion about it :( |
Just a note that bpo-43422 would make this moot. |
Closing, as the C API was removed in #69148. |
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: