summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-06-11 22:00:40 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-06-11 22:00:40 (GMT)
commitf31fac3a23da12287384db7f6aa2937e9461d3fe (patch)
treea24a0a6e33f7289e5c525504e95fdce29599b2d7 /src/H5R.c
parent217c553b95358bfb0c41bf54df4f7596055cc9af (diff)
downloadhdf5-f31fac3a23da12287384db7f6aa2937e9461d3fe.zip
hdf5-f31fac3a23da12287384db7f6aa2937e9461d3fe.tar.gz
hdf5-f31fac3a23da12287384db7f6aa2937e9461d3fe.tar.bz2
[svn-r22452] - remove nrefs param
- create a struct to hold parameters for object locations instead of calling into VOL to lookup and free object: * update the implementation for H5Oopen(_by_name/idx/ref) * H5Rderefence * H5Aopen(_by_name), H5Arename(_by_name) * other routines coming later
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/H5R.c b/src/H5R.c
index bfead4a..4ce37da 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -511,8 +511,7 @@ done:
hid_t
H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_ref)
{
- void *location = NULL; /* a pointer to VOL specific token that indicates
- the location of the object */
+ H5VL_loc_params_t loc_params;
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -526,15 +525,14 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
if(_ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
- /* Get the token for the Object location through the VOL */
- if(H5VL_object_lookup (obj_id, H5VL_OBJECT_LOOKUP_BY_REF, &location, H5_REQUEST_NULL,
- ref_type, _ref) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to locate object")
-
+ loc_params.type = H5VL_OBJECT_LOOKUP_BY_REF;
+ loc_params.loc_data.loc_by_ref.ref_type = ref_type;
+ loc_params.loc_data.loc_by_ref._ref = _ref;
/* Open the object through the VOL */
- if((ret_value = H5VL_object_open_by_loc(obj_id, location, oapl_id, H5_REQUEST_NULL)) < 0)
+ if((ret_value = H5VL_object_open(obj_id, loc_params, oapl_id, H5_REQUEST_NULL)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open object")
+
#if 0
/* Create reference */
if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
@@ -542,11 +540,6 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
#endif
done:
- if (NULL != location) {
- /* free the location token through the VOL */
- if(H5VL_object_free_loc (obj_id, location, H5_REQUEST_NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free location token")
- }
FUNC_LEAVE_API(ret_value)
} /* end H5Rdereference2() */