Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-40153: [Python] Fix OverflowError in foreign_buffer on 32-bi…
…t platforms (apache#40158) Use `uintptr_t` rather than `intptr_t` to fix `OverflowError`, visible e.g. when running `tests/interchange/test_conversion.py` tests on 32-bit platforms. ### Rationale for this change This fixes the `OverflowError`s from apache#40153, and makes `pyarrow/tests/interchange/` all pass on 32-bit x86. ### What changes are included in this PR? - change the type used to store pointer from `intptr_t` to `uintptr_t` to provide coverage for pointers above `0x80000000`. ### Are these changes tested? These changes are covered by the tests in `pyarrow/tests/interchange`. ### Are there any user-facing changes? It fixes `OverflowError` that can be triggered by working with pandas data types, possibly more (though I'm not sure if this qualifies as a "crash"). * Closes: apache#40153 Authored-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
- Loading branch information