diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-26 22:09:17 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-08-26 22:09:17 (GMT) |
commit | e271be083c2b7a542d282c52df41cd307c8e136f (patch) | |
tree | 66cb747bb72160e843ac93cbeea9300a8967a2b7 /src/H5Adeprec.c | |
parent | 39af44b6f2501df56998a2458db3551fc232a422 (diff) | |
download | hdf5-e271be083c2b7a542d282c52df41cd307c8e136f.zip hdf5-e271be083c2b7a542d282c52df41cd307c8e136f.tar.gz hdf5-e271be083c2b7a542d282c52df41cd307c8e136f.tar.bz2 |
[svn-r25555] - rework the public H5VL wrappers to not use H5VL_t* and use a plugin hid_t instead
- rework the private VL layer to use the class structure directly
- some bug fixes
Diffstat (limited to 'src/H5Adeprec.c')
-rw-r--r-- | src/H5Adeprec.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 24cee31..75d1665 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -205,16 +205,16 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_create(obj, loc_params, vol_plugin, name, plist_id, H5P_DEFAULT, H5AC_dxpl_id, H5_REQUEST_NULL))) + if(NULL == (attr = H5VL_attr_create(obj, loc_params, vol_plugin->cls, name, plist_id, H5P_DEFAULT, H5AC_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create attribute") - /* Get an atom for the attribute */ - if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle") + /* Get an atom for the attribute with the VOL information as the auxilary struct*/ + if((ret_value = H5VL_register_id(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle") done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin->cls, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_API(ret_value) } /* H5Acreate1() */ @@ -272,17 +272,17 @@ H5Aopen_name(hid_t loc_id, const char *name) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, name, H5P_DEFAULT, + if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin->cls, name, H5P_DEFAULT, H5AC_ind_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open attribute") - /* Get an atom for the attribute */ - if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle") + /* Get an atom for the attribute with the VOL information as the auxilary struct*/ + if((ret_value = H5VL_register_id(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle") done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin->cls, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_API(ret_value) } /* H5Aopen_name() */ @@ -342,17 +342,17 @@ H5Aopen_idx(hid_t loc_id, unsigned idx) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Create the attribute through the VOL */ - if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin, NULL, H5P_DEFAULT, + if(NULL == (attr = H5VL_attr_open(obj, loc_params, vol_plugin->cls, NULL, H5P_DEFAULT, H5AC_ind_dxpl_id, H5_REQUEST_NULL))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to open attribute") - /* Get an atom for the attribute */ - if((ret_value = H5I_register2(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle") + /* Get an atom for the attribute with the VOL information as the auxilary struct*/ + if((ret_value = H5VL_register_id(H5I_ATTR, attr, vol_plugin, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize attribute handle") done: if (ret_value < 0 && attr) - if(H5VL_attr_close (attr, vol_plugin, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) + if(H5VL_attr_close (attr, vol_plugin->cls, H5AC_dxpl_id, H5_REQUEST_NULL) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset") FUNC_LEAVE_API(ret_value) } /* H5Aopen_idx() */ @@ -399,7 +399,7 @@ H5Aget_num_attrs(hid_t loc_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") /* Get the group info through the VOL using the location token */ - if(H5VL_object_optional(obj, vol_plugin, H5AC_ind_dxpl_id, H5_REQUEST_NULL, + if(H5VL_object_optional(obj, vol_plugin->cls, H5AC_ind_dxpl_id, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, &oinfo) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get group info") |