-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support PyLong_AsNativeBytes()? #107
Comments
The implementation is about 186 lines. IMO it's too big and too complex for pythoncapi-compat sadly :-( The https://github.com/vstinner/deadparrot would be a better place to backport such feature. |
Then maybe using PyLong_AsLongAndOverflow() is better for PyLong_Export. I did pr to switch: vstinner/cpython#6. This clear practical need for backport. |
You shouldn't worry about pythoncapi-compat: there is a great freedom on how we can do things in pythoncapi-compat. It shouldn't impact PEP 757 design. |
Sure, we could use PyLong_AsLongAndOverflow() just for backports. But it looks faster than current solution, at least for my benchmarks. |
I would guess it wasn't supported, well, for obvious reasons (complexity).
But if it's going to be used in PyLong_Export() - maybe we should revisit it?
The text was updated successfully, but these errors were encountered: