1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 hid_t
 ss_prop_type(ss_prop_t *prop,           /* property list to be queried */
              const char *name           /* optional property name */
              )
 {
     SS_ENTER(ss_prop_type, hid_t);
     hid_t       retval=-1;

     SS_ASSERT_TYPE(prop, ss_prop_t);

     /* Get a copy of the datatype. 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 ((retval=H5Tget_member_type(prop->type, (unsigned)idx))<0) SS_ERROR(HDF5);
     } else {
         if ((retval=H5Tcopy(prop->type))<0) SS_ERROR(HDF5);
     }

  SS_CLEANUP:
     SS_LEAVE(retval);
 }