News for hackers. Stuff that matters.
Re:Python: Making ctypes Structures Beautiful by veyron on Thursday July 12, 2012 @02:52PM (#4236045)
endianness only matters when you bother interpreting the data. The storage concept shouldn't care -- after all, 8 bytes is 8 bytes is 8 bytes.

Struct needs it because it is interpreting data. unpack needs to know the endianness to correctly interpret numeric types, and pack needs to know the endianness to know how to serialize.

FYI: the C way of doing this is byteswapping.

There are no comments on this comment yet.