Skip to content

Fix GH-17068: Add pack()/unpack() format for signed integer endianness #19368

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexandre-daubois
Copy link
Contributor

@alexandre-daubois alexandre-daubois commented Aug 4, 2025

Fix #17068

Adds signed integer endianness support to pack()/unpack() functions. There are 2 new format codes (from the original issue): m/y for signed 2-byte (little/big endian), M/Y for signed 4-byte (little/big endian), and p/j for signed 8-byte (little/big endian). It follows the existing pattern where lowercase matches uppercase endianness.

I also moved pack tests in a dedicated folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pack/unpack support for signed integers with specific endianness
1 participant