Skip to content
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

Replace _PyLong_AsInt() with PyLong_AsInt() for Python 3.13+ #14

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

mikelolasagasti
Copy link
Contributor

@mikelolasagasti mikelolasagasti commented Jun 14, 2024

The new public function PyLong_AsInt() has been introduced as part of python/cpython#108444, which renames the internal _PyLong_AsInt() to PyLong_AsInt(). This change updates the code to use the new public API while maintaining compatibility with Python versions earlier than 3.13.

Fixes #13

@mikelolasagasti mikelolasagasti changed the title Replace _PyLong_AsInt() with PyLong_AsInt() Replace _PyLong_AsInt() with PyLong_AsInt() for Python 3.13+ Jun 14, 2024
Context in python/cpython#108444

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
@Rogdham
Copy link
Owner

Rogdham commented Jun 16, 2024

Thank you for the PR!

I have changed the version check to replicate the one in https://github.com/python/pythoncapi-compat/blob/18d1df75c72a4ac38fc0a934c13ab6de081a19d2/pythoncapi_compat.h#L887

@Rogdham Rogdham merged commit fb8efdd into Rogdham:master Jun 16, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Python 3.13
2 participants