modstruct: Basic implementation of native struct alignment and types.

This commit is contained in:
Paul Sokolovsky
2014-04-11 03:47:21 +03:00
parent ef9124f5ff
commit 0c43cf9154
4 changed files with 46 additions and 15 deletions

View File

@@ -3,3 +3,6 @@ print(struct.calcsize("<bI"))
print(struct.unpack("<bI", b"\x80\0\0\x01\0"))
print(struct.calcsize(">bI"))
print(struct.unpack(">bI", b"\x80\0\0\x01\0"))
# 32-bit little-endian specific
#print(struct.unpack("bI", b"\x80\xaa\x55\xaa\0\0\x01\0"))