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

Fix for Integer Format Check in Python SID Adapter #1632

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

fthaler
Copy link
Contributor

@fthaler fthaler commented Apr 9, 2021

Python integer format char is ambiguous and platform dependent. PyBind11 format_descriptor<...>::format() always returns "q" and "Q" for 64bit integers, independent of the platform. Compatible passed-in Python buffers on the other hand might also have the equivalent format "l" or "L" set. See pybind/pybind11#1806 and pybind/pybind11#1908 for details. This fix introduces a special case for integer format comparisons, just checking size and signedness.

@fthaler
Copy link
Contributor Author

fthaler commented Apr 9, 2021

Required for GridTools/gt4py#391

@fthaler
Copy link
Contributor Author

fthaler commented Apr 9, 2021

launch jenkins

@havogt havogt merged commit 477f700 into GridTools:master Apr 12, 2021
@fthaler fthaler deleted the pyadapter-int-format-fix branch April 13, 2021 12:27
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.

3 participants