diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-03-07 14:21:12 (GMT) |
commit | a318d2846c5e6f5cef635c8aa1e54d004aa33ff7 (patch) | |
tree | 13e44b533da59e542effa39603c831c73b359a85 /src/H5G.c | |
parent | d7147ff0eca5df777e2d9371aca7d1d98cbe45b4 (diff) | |
download | hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.zip hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.gz hdf5-a318d2846c5e6f5cef635c8aa1e54d004aa33ff7.tar.bz2 |
[svn-r22032] - move all HDF5 library access for H5F routines to the native layer, higher layer only handle ids
- create a high level user id to return to users to hold vol id and object id
- all H5 callbacks implemented except for get_object_count/ids
- some bug fixes, test suite fails for now pending update to user ids of other objects
Diffstat (limited to 'src/H5G.c')
-rw-r--r-- | src/H5G.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -580,17 +580,30 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Gget_info(hid_t grp_id, H5G_info_t *grp_info) +H5Gget_info(hid_t uid, H5G_info_t *grp_info) { H5I_type_t id_type; /* Type of ID */ H5G_loc_t loc; /* Location of group */ + H5I_t *uid_info; /* user id structure */ + hid_t grp_id; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(H5Gget_info, FAIL) H5TRACE2("e", "i*x", grp_id, grp_info); /* Check args */ - id_type = H5I_get_type(grp_id); + id_type = H5I_get_type(uid); + + if (H5I_UID == id_type) { + if(NULL == (uid_info = (H5I_t *)H5I_object(uid))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid user identifier") + grp_id = uid_info->obj_id; + id_type = H5I_get_type(grp_id); + } + else { + grp_id = uid; + } + if(!(H5I_GROUP == id_type || H5I_FILE == id_type)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid argument") if(!grp_info) |