summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-15 21:54:30 (GMT)
commit4a17aff4085ad6ee265b95730aca3f493056dec8 (patch)
tree8bfb665c6d95a2e3520fa1bb0ff54d95aff3923f /src/H5Gname.c
parent853ae26333592faf69cd8c454ef92ffea8549df5 (diff)
downloadhdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.zip
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.gz
hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.bz2
Add API context interface and use it throughout the library.
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index 7b53668..1ca06b9 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -65,8 +65,6 @@ typedef struct H5G_names_t {
typedef struct H5G_gnba_iter_t {
/* In */
const H5O_loc_t *loc; /* The location of the object we're looking for */
- hid_t lapl_id; /* LAPL for operations */
- hid_t dxpl_id; /* DXPL for operations */
/* Out */
char *path; /* Name of the object */
@@ -560,7 +558,7 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
*/
ssize_t
H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
- hbool_t *cached, hid_t lapl_id, hid_t dxpl_id)
+ hbool_t *cached)
{
ssize_t len = 0; /* Length of object's name */
ssize_t ret_value = -1; /* Return value */
@@ -593,7 +591,7 @@ H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get file ID")
/* Search for name of object */
- if((len = H5G_get_name_by_addr(file, lapl_id, dxpl_id, loc->oloc, name, size)) < 0) {
+ if((len = H5G_get_name_by_addr(file, loc->oloc, name, size)) < 0) {
H5I_dec_ref(file);
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name")
} /* end if */
@@ -1076,8 +1074,7 @@ done:
*/
herr_t
H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
- H5RS_str_t *src_full_path_r, H5F_t *dst_file, H5RS_str_t *dst_full_path_r,
- hid_t dxpl_id)
+ H5RS_str_t *src_full_path_r, H5F_t *dst_file, H5RS_str_t *dst_full_path_r)
{
herr_t ret_value = SUCCEED;
@@ -1106,7 +1103,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
tmp_oloc.addr = lnk->u.hard.addr;
/* Get the type of the object */
- if(H5O_obj_type(&tmp_oloc, &obj_type, dxpl_id) < 0)
+ if(H5O_obj_type(&tmp_oloc, &obj_type) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
/* Determine which type of objects to operate on */
@@ -1244,7 +1241,7 @@ H5G_get_name_by_addr_cb(hid_t gid, const char *path, const H5L_info_t *linfo,
H5G_loc_reset(&obj_loc);
/* Find the object */
- if(H5G_loc_find(&grp_loc, path, &obj_loc/*out*/, udata->lapl_id, udata->dxpl_id) < 0)
+ if(H5G_loc_find(&grp_loc, path, &obj_loc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
obj_found = TRUE;
@@ -1283,7 +1280,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *loc,
+H5G_get_name_by_addr(hid_t file, const H5O_loc_t *loc,
char *name, size_t size)
{
H5G_gnba_iter_t udata; /* User data for iteration */
@@ -1310,12 +1307,10 @@ H5G_get_name_by_addr(hid_t file, hid_t lapl_id, hid_t dxpl_id, const H5O_loc_t *
else {
/* Set up user data for iterator */
udata.loc = loc;
- udata.lapl_id = lapl_id;
- udata.dxpl_id = dxpl_id;
udata.path = NULL;
/* Visit all the links in the file */
- if((status = H5G_visit(file, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata, lapl_id, dxpl_id)) < 0)
+ if((status = H5G_visit(file, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name")
else if(status > 0)
found_obj = TRUE;