summaryrefslogtreecommitdiffstats
path: root/src/H5Adeprec.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-29 01:51:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-29 01:51:16 (GMT)
commit8fd2e1d36e4f9df5d202499204a88cbbdd44461b (patch)
treee10a0812dce031bb52b8c53440b3237f93b698b0 /src/H5Adeprec.c
parentad923518098f7c4db9c51085002b9c7dd0a9adc3 (diff)
downloadhdf5-8fd2e1d36e4f9df5d202499204a88cbbdd44461b.zip
hdf5-8fd2e1d36e4f9df5d202499204a88cbbdd44461b.tar.gz
hdf5-8fd2e1d36e4f9df5d202499204a88cbbdd44461b.tar.bz2
Convert attribute VOL callbacks to a standard form that sets up the wrapper
object info in a single place.
Diffstat (limited to 'src/H5Adeprec.c')
-rw-r--r--src/H5Adeprec.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index b7e9ec4..894bbc1 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -156,8 +156,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Create the attribute */
- if(NULL == (attr = H5VL_attr_create(vol_obj->data, loc_params, vol_obj->plugin->cls, name,
- acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_create(vol_obj, loc_params, name, acpl_id, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute")
/* Register the new attribute and get an ID for it */
@@ -167,7 +166,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
done:
/* Clean up on failure */
if(H5I_INVALID_HID == ret_value)
- if(attr && H5VL_attr_close(attr, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
@@ -218,22 +217,21 @@ H5Aopen_name(hid_t loc_id, const char *name)
loc_params.obj_type = H5I_get_type(loc_id);
/* Get the location object */
- if (NULL == (vol_obj = H5VL_vol_object(loc_id)))
+ if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the attribute */
- if (NULL == (attr = H5VL_attr_open(vol_obj->data, loc_params, vol_obj->plugin->cls,
- name, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_open(vol_obj, loc_params, name, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute")
/* Register the attribute and get an ID for it */
- if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->plugin, TRUE)) < 0)
+ if((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->plugin, TRUE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize attribute handle")
done:
/* Clean up on failure */
if(H5I_INVALID_HID == ret_value)
- if(attr && H5VL_attr_close(attr, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
@@ -291,8 +289,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the attribute */
- if(NULL == (attr = H5VL_attr_open(vol_obj->data, loc_params, vol_obj->plugin->cls,
- NULL, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (attr = H5VL_attr_open(vol_obj, loc_params, NULL, H5P_DEFAULT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute")
/* Register the attribute and get an ID for it */
@@ -302,7 +299,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
done:
/* Clean up on failure */
if(H5I_INVALID_HID == ret_value)
- if(attr && H5VL_attr_close(attr, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
+ if(attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)