diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-21 20:22:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-21 20:22:11 (GMT) |
commit | e9262d7320615d78d32d777a416e34b01072191f (patch) | |
tree | 8c42f6d8e4519fbeaf66138f3c6337479e49e3e8 /src/H5Gcompact.c | |
parent | 102170c3bfc6fa3583f960ba970eb612567b1c05 (diff) | |
download | hdf5-e9262d7320615d78d32d777a416e34b01072191f.zip hdf5-e9262d7320615d78d32d777a416e34b01072191f.tar.gz hdf5-e9262d7320615d78d32d777a416e34b01072191f.tar.bz2 |
[svn-r12963] Description:
Refactor internal code that retrieves the object's type to use the new
H5O_type_t (which only definitions for object types, instead of links as well)
instead of the older H5G_obj_t (which included links, etc.)
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Gcompact.c')
-rw-r--r-- | src/H5Gcompact.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c index c005815..7e7266a 100644 --- a/src/H5Gcompact.c +++ b/src/H5Gcompact.c @@ -295,13 +295,18 @@ H5G_compact_get_type_by_idx(H5O_loc_t *oloc, hid_t dxpl_id, const H5O_linfo_t *l ret_value = H5G_UDLINK; else if(ltable.lnks[idx].type == H5L_TYPE_HARD){ H5O_loc_t tmp_oloc; /* Temporary object location */ + H5O_type_t obj_type; /* Type of object at location */ /* Build temporary object location */ tmp_oloc.file = oloc->file; tmp_oloc.addr = ltable.lnks[idx].u.hard.addr; /* Get the type of the object */ - if((ret_value = H5O_obj_type(&tmp_oloc, dxpl_id)) == H5G_UNKNOWN) + if(H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type") + + /* Map to group object type */ + if(H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type))) HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type") } else { HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "unknown link type") |