Re: question about HDF5 compound type macros...

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Ed:

I think you are true.

Kent
At 08:13 AM 4/22/2005, you wrote:
HDF5ers,

When creating compound types, I rely on the HOFFSET macro:

if (H5Tinsert(typeid, LIQUOR, HOFFSET(struct s2, i2), H5T_NATIVE_INT) < 0) ERR;

I see that HOFFSET, in turn, is just using the C macro offsetof.

>From reading around, it seems that offsetof might return different
numbers on different platforms, since, as I understand it, the
internal padding of structs is platform dependent.

Is this true? Can HOFFSET give me one answer on one machine, and
another on another machine, or with a different compiler?

Any thoughts would be most appreciated.

Thanks,

Ed

--
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: