1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 void *
 ss_prop_buffer(ss_prop_t *prop,         /* property list to be queried */
                const char *name         /* optional property name */
                )
 {
     SS_ENTER(ss_prop_buffer, voidP);
     size_t      offset=0;

     SS_ASSERT_TYPE(prop, ss_prop_t);

     /* Get the offset. This will fail if the property list has no properties yet or if the
      * specified name cannot be found in the compound datatype. */
     if (name) {
         int idx = H5Tget_member_index(prop->type, name);
         if (idx<0) SS_ERROR(HDF5);
         if (SS_NOSIZE==(offset=H5Tget_member_offset(prop->type, (unsigned)idx))) SS_ERROR(HDF5);
     }

  SS_CLEANUP:
     SS_LEAVE((char*)(prop->values) + offset);
 }