Commits


Elliott Sales de Andrade authored and GitHub committed 59decc32195
GH-44767: [C++] Fix Float16.To{Little,Big}Endian on big endian machines (#44768) ### Rationale for this change See issue. ### What changes are included in this PR? For `ToLittleEndian`/`ToBigEndian`, the result should always be in the specified endianness, not depend on host order. In the test, instead of casting the `uint8_t` data into a `uint16_t` (with unspecified endianness handling), compare the bytes directly in their expected orders. ### Are these changes tested? Tested on little-endian, still building for big-endian. ### Are there any user-facing changes? Fixes #44767 * GitHub Issue: #44767 Authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>