diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-05 22:11:13 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-05 22:11:13 (GMT) |
commit | 7a070012c08c4ef16a6effc01e03c2ca7cd8fa00 (patch) | |
tree | 1e1b8f704b43c9695e10475ba7d5dbb970be1856 /src/H5Gdeprec.c | |
parent | e4a60d86caa7a76001dd4e09af246c4c0fad19ea (diff) | |
download | hdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.zip hdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.tar.gz hdf5-7a070012c08c4ef16a6effc01e03c2ca7cd8fa00.tar.bz2 |
[svn-r22519] - many bug fixes
- still some unresolved issues with named datatypes
Diffstat (limited to 'src/H5Gdeprec.c')
-rw-r--r-- | src/H5Gdeprec.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index ba3f284..5235dde 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -905,6 +905,7 @@ herr_t H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, void *op_data) { + H5G_loc_t loc; /* Location of object */ H5G_link_iterate_t lnk_op; /* Link operator */ hsize_t last_obj; /* Index of last object looked at */ hsize_t idx; /* Internal location to hold index */ @@ -914,6 +915,8 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, H5TRACE5("e", "i*s*Isx*x", loc_id, name, idx_p, op, op_data); /* Check args */ + if(H5G_loc(loc_id, &loc) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID") if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") if(idx_p && *idx_p < 0) @@ -930,33 +933,13 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, lnk_op.op_func.op_old = op; /* Call private function. */ - if((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0) + if((ret_value = H5G_iterate(&loc, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed") /* Set the index we stopped at */ if(idx_p) *idx_p = (int)last_obj; -#if 0 - herr_t ret_value; - - FUNC_ENTER_API(FAIL) - H5TRACE5("e", "i*s*Isx*x", loc_id, name, idx_p, op, op_data); - - /* Check args */ - if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") - if(idx_p && *idx_p < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index specified") - if(!op) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified") - - /* iterate over the links through the VOL */ - if((ret_value = H5VL_link_iterate(loc_id, name, FALSE, H5_INDEX_NAME, H5_ITER_INC, (hsize_t *)idx_p, - op, op_data, H5P_LINK_ACCESS_DEFAULT)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed") -#endif - done: FUNC_LEAVE_API(ret_value) } /* end H5Giterate() */ |