diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-06-11 22:00:40 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-06-11 22:00:40 (GMT) |
commit | f31fac3a23da12287384db7f6aa2937e9461d3fe (patch) | |
tree | a24a0a6e33f7289e5c525504e95fdce29599b2d7 /src/H5Rdeprec.c | |
parent | 217c553b95358bfb0c41bf54df4f7596055cc9af (diff) | |
download | hdf5-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/H5Rdeprec.c')
-rw-r--r-- | src/H5Rdeprec.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index e6d8d21..a595c90 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -182,8 +182,7 @@ done: hid_t H5Rdereference1(hid_t obj_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) @@ -195,21 +194,15 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *_ref) 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, H5P_DATASET_ACCESS_DEFAULT, H5_REQUEST_NULL)) < 0) + if((ret_value = H5VL_object_open(obj_id, loc_params, H5P_DATASET_ACCESS_DEFAULT, H5_REQUEST_NULL)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open object") 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 H5Rdereference1() */ |