summaryrefslogtreecommitdiffstats
path: root/src/H5Gobj.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-08-28 15:02:54 (GMT)
commitea343ef85416b42f68f28fb1024702c6726f7eea (patch)
treed5c401bf83f7f5578df06c54f9fd9fb198732ed2 /src/H5Gobj.c
parenteb16d8bc2b2f37c7a1d75fe7bf5258eba21515b2 (diff)
downloadhdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.zip
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.gz
hdf5-ea343ef85416b42f68f28fb1024702c6726f7eea.tar.bz2
[svn-r14115] Description:
Remove all plain calls to H5Gopen() from source, replacing them with either H5Gopen2(). Add test for H5Gopen1(). Reformatted several pieces of code, to clean them up. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r--src/H5Gobj.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index a3166ba..397c753 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -640,6 +640,7 @@ H5G_obj_iterate(hid_t loc_id, const char *group_name,
H5_index_t idx_type, H5_iter_order_t order, hsize_t skip, hsize_t *last_lnk,
H5G_link_iterate_t *lnk_op, void *op_data, hid_t dxpl_id)
{
+ H5G_loc_t loc; /* Location of parent for group */
H5O_linfo_t linfo; /* Link info message */
hid_t gid = -1; /* ID of group to iterate over */
H5G_t *grp; /* Pointer to group data structure to iterate over */
@@ -656,10 +657,12 @@ H5G_obj_iterate(hid_t loc_id, const char *group_name,
* Open the group on which to operate. We also create a group ID which
* we can pass to the application-defined operator.
*/
- if((gid = H5Gopen(loc_id, group_name)) < 0)
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if((grp = H5G_open_name(&loc, group_name, H5P_DEFAULT, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
- if((grp = H5I_object(gid)) == NULL)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "bad group ID")
+ if((gid = H5I_register(H5I_GROUP, grp)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
/* Attempt to get the link info for this group */
if(H5G_obj_get_linfo(&(grp->oloc), &linfo, dxpl_id)) {