Jason Newton
2015-10-20 04:05:51 UTC
Hi folks,
I noticed an unexpected behavior of itemsize for structures with offsets
that are larger than that of a packed structure in memory. This matters
when parsing in memory structures from C and some others (recently and
HDF5/h5py detail got me for a bit).
So what is the correct way to get "sizeof" a structure? AFAIK this is the
size of the last item + it's offset. If this doesn't exist... shouldn't it?
Thanks,
Jason
I noticed an unexpected behavior of itemsize for structures with offsets
that are larger than that of a packed structure in memory. This matters
when parsing in memory structures from C and some others (recently and
HDF5/h5py detail got me for a bit).
So what is the correct way to get "sizeof" a structure? AFAIK this is the
size of the last item + it's offset. If this doesn't exist... shouldn't it?
Thanks,
Jason