diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-14 15:42:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-14 15:42:31 (GMT) |
commit | c35a2ad6b2fe19c8016469041f15009dd6e6118e (patch) | |
tree | 2c461061465022ea167ab617c484e64da0044002 /src/H5L.c | |
parent | 3d6c91d38da8b7f9ada752a9bba62f0aab5c43f5 (diff) | |
download | hdf5-c35a2ad6b2fe19c8016469041f15009dd6e6118e.zip hdf5-c35a2ad6b2fe19c8016469041f15009dd6e6118e.tar.gz hdf5-c35a2ad6b2fe19c8016469041f15009dd6e6118e.tar.bz2 |
[svn-r12910] Description:
More progress toward getting H5Ldelete_by_idx to work fully - can now
delete by index in compact group (but not dense groups or "old-style" groups
yet). Need to go write a v2 B-tree routine to delete from the B-tree by index
before the dense storage will work properly...
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5L.c')
-rw-r--r-- | src/H5L.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -2049,8 +2049,6 @@ H5L_delete_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, H5G_own_loc_t *own_loc/*out*/) { H5L_trav_gvbi_t *udata = (H5L_trav_gvbi_t *)_udata; /* User data passed in */ - H5O_link_t grp_lnk; /* Link within group */ - hbool_t lnk_copied = FALSE; /* Whether the link was copied */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5L_delete_by_idx_cb) @@ -2059,21 +2057,12 @@ H5L_delete_by_idx_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, if(obj_loc == NULL) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist") - /* Query link */ - if(H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, - udata->n, &grp_lnk, udata->dxpl_id) < 0) + /* Delete link */ + if(H5G_obj_remove_by_idx(obj_loc->oloc, obj_loc->path->full_path_r, + udata->idx_type, udata->order, udata->n, udata->dxpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found") - lnk_copied = TRUE; - - /* Retrieve the value for the link */ - if(H5L_get_val_real(&grp_lnk, udata->buf, udata->size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value") done: - /* Reset the link information, if we have a copy */ - if(lnk_copied) - H5O_reset(H5O_LINK_ID, &grp_lnk); - /* Indicate that this callback didn't take ownership of the group * * location for the object */ *own_loc = H5G_OWN_NONE; |