summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-11-01 19:54:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-11-01 19:54:44 (GMT)
commit1b00d04080aa057cc4eae1512dbed03e35fbc675 (patch)
treee118b76bec510f1215f51a6ff3f900ace4e53407
parenta5cc4e272b73384600b2b20429d4189e820a0451 (diff)
downloadhdf5-1b00d04080aa057cc4eae1512dbed03e35fbc675.zip
hdf5-1b00d04080aa057cc4eae1512dbed03e35fbc675.tar.gz
hdf5-1b00d04080aa057cc4eae1512dbed03e35fbc675.tar.bz2
Refactor and standardize object VOL callbacks.
-rw-r--r--src/H5Adeprec.c3
-rw-r--r--src/H5O.c159
-rw-r--r--src/H5Ocopy.c4
-rw-r--r--src/H5Odeprec.c27
-rw-r--r--src/H5Oflush.c16
-rw-r--r--src/H5R.c38
-rw-r--r--src/H5Rdeprec.c6
-rw-r--r--src/H5VLcallback.c311
-rw-r--r--src/H5VLprivate.h10
-rw-r--r--src/H5VLpublic.h6
10 files changed, 289 insertions, 291 deletions
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index 894bbc1..ae25cb9 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -343,8 +343,7 @@ H5Aget_num_attrs(hid_t loc_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
/* Get the number of attributes for the object */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, &oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, &oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute count for object")
H5_CHECKED_ASSIGN(ret_value, int, oinfo.num_attrs, hsize_t);
diff --git a/src/H5O.c b/src/H5O.c
index 567fce4..7e8484b 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -104,7 +104,6 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
H5I_type_t opened_type;
void *opened_obj = NULL;
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
hid_t ret_value = H5I_INVALID_HID;
FUNC_ENTER_API(H5I_INVALID_HID)
@@ -130,14 +129,8 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
loc_params.obj_type = H5I_get_type(loc_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Open the object */
- if(NULL == (opened_obj = H5VL_object_open(vol_obj->data, loc_params, vol_obj->plugin->cls,
- &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (opened_obj = H5VL_object_open(vol_obj, loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
/* Get an atom for the object */
@@ -145,10 +138,6 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id)
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize object handle")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oopen() */
@@ -214,8 +203,7 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the object */
- if(NULL == (opened_obj = H5VL_object_open(vol_obj->data, loc_params, vol_obj->plugin->cls,
- &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (opened_obj = H5VL_object_open(vol_obj, loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
if((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->plugin, TRUE)) < 0)
@@ -282,8 +270,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid location identifier")
/* Open the object */
- if(NULL == (opened_obj = H5VL_object_open(vol_obj->data, loc_params, vol_obj->plugin->cls, &opened_type,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (opened_obj = H5VL_object_open(vol_obj, loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object")
/* Register the dataset ID */
@@ -439,8 +426,7 @@ H5Oincr_refcount(hid_t object_id)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
/* Change the object's reference count */
- if(H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_OBJECT_CHANGE_REF_COUNT,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, 1) < 0)
+ if(H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_CHANGE_REF_COUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, 1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed")
done:
@@ -490,8 +476,7 @@ H5Odecr_refcount(hid_t object_id)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info")
/* Change the object's reference count */
- if(H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_OBJECT_CHANGE_REF_COUNT,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, -1) < 0)
+ if(H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_CHANGE_REF_COUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, -1) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed")
done:
@@ -517,7 +502,6 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -543,21 +527,11 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
loc_params.obj_type = H5I_get_type(loc_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Check if the object exists */
- if(H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_OBJECT_EXISTS,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
+ if(H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_EXISTS, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name)
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oexists_by_name() */
@@ -581,7 +555,6 @@ H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields)
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -601,21 +574,11 @@ H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields)
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info2() */
@@ -640,7 +603,6 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -670,21 +632,11 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info_by_name2() */
@@ -711,7 +663,6 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -746,21 +697,11 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_info_by_idx2() */
@@ -787,7 +728,6 @@ H5Oset_comment(hid_t obj_id, const char *comment)
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -805,21 +745,11 @@ H5Oset_comment(hid_t obj_id, const char *comment)
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(obj_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* (Re)set the object's comment */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, loc_params, comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oset_comment() */
@@ -847,7 +777,6 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -871,21 +800,11 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* (Re)set the object's comment */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_SET_COMMENT, loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, loc_params, comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name)
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oset_comment_by_name() */
@@ -911,35 +830,24 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
H5TRACE3("Zs", "i*sz", obj_id, comment, bufsize);
/* Get the object */
- if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
+ if(NULL == (vol_obj = H5VL_vol_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
/* Set fields in the location struct */
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(obj_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Retrieve the object's comment */
- if (H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_comment() */
@@ -966,7 +874,6 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
@@ -990,21 +897,11 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Retrieve the object's comment */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, loc_params, comment, bufsize, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object: '%s'", name)
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Oget_comment_by_name() */
@@ -1050,7 +947,6 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1074,22 +970,11 @@ H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(obj_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- idx_type, order, op, op_data, fields)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Ovisit2() */
@@ -1135,7 +1020,6 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1170,22 +1054,11 @@ H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
loc_params.obj_type = H5I_get_type(loc_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- idx_type, order, op, op_data, fields)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, fields)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object iteration failed")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Ovisit_by_name2() */
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index d6c1406..ae883fb 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -253,9 +253,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
vol_wrapper_set = TRUE;
/* Copy the object */
- if((ret_value = H5VL_object_copy(vol_obj1->data, loc_params1, vol_obj1->plugin->cls, src_name,
- vol_obj2->data, loc_params2, vol_obj2->plugin->cls, dst_name,
- ocpypl_id, lcpl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)) < 0)
+ if(H5VL_object_copy(vol_obj1, loc_params1, src_name, vol_obj2, loc_params2, dst_name, ocpypl_id, lcpl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 24fdb00..dca1835 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -109,8 +109,7 @@ H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
@@ -161,8 +160,7 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t la
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
done:
@@ -223,8 +221,7 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
@@ -270,7 +267,6 @@ H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -292,22 +288,11 @@ H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(obj_id);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Ovisit1() */
@@ -383,9 +368,7 @@ H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
loc_params.obj_type = H5I_get_type(loc_id);
/* Visit the objects */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_VISIT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, idx_type, order, op, op_data, H5O_INFO_ALL)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 887cc4c..d8d0430 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -92,8 +92,7 @@ H5Oflush(hid_t obj_id)
loc_params.obj_type = H5I_get_type(obj_id);
/* Flush the object */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_FLUSH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_id)) < 0)
+ if(H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_FLUSH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object")
done:
@@ -239,7 +238,6 @@ H5Orefresh(hid_t oid)
{
H5VL_object_t *vol_obj = NULL; /* Object token */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -257,21 +255,11 @@ H5Orefresh(hid_t oid)
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(oid);
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Refresh the object */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, oid)) < 0)
+ if(H5VL_object_specific(vol_obj, loc_params, H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, oid) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Orefresh() */
diff --git a/src/H5R.c b/src/H5R.c
index 112bd4c..b806777 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -93,7 +93,6 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
{
H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -127,22 +126,11 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
if(H5CX_set_loc(loc_id) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access property list info")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Create reference */
- if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_REF_CREATE,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- ref, name, ref_type, space_id)) < 0)
+ if((ret_value = H5VL_object_specific(vol_obj, loc_params, H5VL_REF_CREATE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, ref, name, ref_type, space_id)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create reference")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Rcreate() */
@@ -210,8 +198,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
loc_params.obj_type = H5I_get_type(obj_id);
/* Dereference */
- if(NULL == (opened_obj = H5VL_object_open(vol_obj->data, loc_params, vol_obj->plugin->cls,
- &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (opened_obj = H5VL_object_open(vol_obj, loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to dereference object")
if((ret_value = H5VL_register(opened_type, opened_obj, vol_obj->plugin, TRUE)) < 0)
@@ -270,8 +257,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid file identifier")
/* Get the dataspace with the correct region selected */
- if(H5VL_object_get(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_REF_GET_REGION,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, loc_params, H5VL_REF_GET_REGION, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5I_INVALID_HID, "unable to retrieve dataspace")
done:
@@ -328,9 +314,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Get the object type */
- if(H5VL_object_get(vol_obj->data, loc_params, vol_obj->plugin->cls,
- H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, obj_type, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_type, ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "unable to determine object type")
done:
@@ -377,7 +361,6 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
{
H5VL_object_t *vol_obj = NULL; /* object token of loc_id */
H5VL_loc_params_t loc_params;
- hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
ssize_t ret_value = -1; /* Return value */
FUNC_ENTER_API((-1))
@@ -397,22 +380,11 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Get name */
- if(H5VL_object_get(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_REF_GET_NAME,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- &ret_value, name, size, ref_type, _ref) < 0)
+ if(H5VL_object_get(vol_obj, loc_params, H5VL_REF_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, name, size, ref_type, _ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to determine object path")
done:
- /* Reset object wrapping info in API context */
- if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
- HDONE_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Rget_name() */
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index a3e94ea..9cbaf1f 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -126,8 +126,7 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "invalid file identifier")
/* Get the object information */
- if (H5VL_object_get(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_REF_GET_TYPE,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &obj_type, ref_type, ref) < 0)
+ if(H5VL_object_get(vol_obj, loc_params, H5VL_REF_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &obj_type, ref_type, ref) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, H5G_UNKNOWN, "unable to determine object type")
/* Set return value */
@@ -183,8 +182,7 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *_ref)
loc_params.obj_type = H5I_get_type(obj_id);
/* Dereference */
- if (NULL == (opened_obj = H5VL_object_open(vol_obj->data, loc_params, vol_obj->plugin->cls, &opened_type,
- H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
+ if(NULL == (opened_obj = H5VL_object_open(vol_obj, loc_params, &opened_type, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to dereference object")
/* Get an atom for the object */
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index ff0e0fd..a820536 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -134,6 +134,20 @@ static herr_t H5VL__link_specific(void *obj, H5VL_loc_params_t loc_params,
void **req, va_list arguments);
static herr_t H5VL__link_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
void **req, va_list arguments);
+static void *H5VL__object_open(void *obj, H5VL_loc_params_t params, const H5VL_class_t *cls,
+ H5I_type_t *opened_type, hid_t dxpl_id, void **req);
+static herr_t H5VL__object_copy(void *src_obj, H5VL_loc_params_t src_loc_params,
+ const char *src_name, void *dst_obj, H5VL_loc_params_t dst_loc_params,
+ const char *dst_name, const H5VL_class_t *cls, hid_t ocpypl_id,
+ hid_t lcpl_id, hid_t dxpl_id, void **req);
+static herr_t H5VL__object_get(void *obj, H5VL_loc_params_t loc_params,
+ const H5VL_class_t *cls, H5VL_object_get_t get_type, hid_t dxpl_id,
+ void **req, va_list arguments);
+static herr_t H5VL__object_specific(void *obj, H5VL_loc_params_t loc_params,
+ const H5VL_class_t *cls, H5VL_object_specific_t specific_type, hid_t dxpl_id,
+ void **req, va_list arguments);
+static herr_t H5VL__object_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
+ void **req, va_list arguments);
/*********************/
@@ -4362,7 +4376,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VL_object_open
+ * Function: H5VL__object_open
*
* Purpose: Opens a object through the VOL
*
@@ -4371,13 +4385,13 @@ done:
*
*-------------------------------------------------------------------------
*/
-void *
-H5VL_object_open(void *obj, H5VL_loc_params_t params, const H5VL_class_t *cls, H5I_type_t *opened_type,
+static void *
+H5VL__object_open(void *obj, H5VL_loc_params_t params, const H5VL_class_t *cls, H5I_type_t *opened_type,
hid_t dxpl_id, void **req)
{
- void *ret_value = NULL; /* Return value */
+ void *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_STATIC
/* Check if the corresponding VOL callback exists */
if(NULL == cls->object_cls.open)
@@ -4389,6 +4403,43 @@ H5VL_object_open(void *obj, H5VL_loc_params_t params, const H5VL_class_t *cls, H
done:
FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__object_open() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_object_open
+ *
+ * Purpose: Opens a object through the VOL
+ *
+ * Return: Success: Pointer to the object
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+H5VL_object_open(const H5VL_object_t *vol_obj, H5VL_loc_params_t params,
+ H5I_type_t *opened_type, hid_t dxpl_id, void **req)
+{
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
+ void *ret_value = NULL; /* Return value */
+
+ FUNC_ENTER_NOAPI(NULL)
+
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
+ /* Call the corresponding internal VOL routine */
+ if(NULL == (ret_value = H5VL__object_open(vol_obj->data, params, vol_obj->plugin->cls, opened_type, dxpl_id, req)))
+ HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "object open failed")
+
+done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_VOL, H5E_CANTRESET, NULL, "can't reset VOL wrapper info")
+
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_open() */
@@ -4419,7 +4470,7 @@ H5VLobject_open(void *obj, H5VL_loc_params_t params, hid_t plugin_id, H5I_type_t
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL plugin ID")
/* Call the corresponding internal VOL routine */
- if(NULL == (ret_value = H5VL_object_open(obj, params, cls, opened_type, dxpl_id, req)))
+ if(NULL == (ret_value = H5VL__object_open(obj, params, cls, opened_type, dxpl_id, req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open object")
done:
@@ -4428,6 +4479,39 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL__object_copy
+ *
+ * Purpose: Copies an object to another destination through the VOL
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL__object_copy(void *src_obj, H5VL_loc_params_t src_loc_params, const char *src_name,
+ void *dst_obj, H5VL_loc_params_t dst_loc_params, const char *dst_name,
+ const H5VL_class_t *cls, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id,
+ void **req)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if the corresponding VOL callback exists */
+ if(NULL == cls->object_cls.copy)
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object copy' method")
+
+ /* Call the corresponding VOL callback */
+ if((cls->object_cls.copy)(src_obj, src_loc_params, src_name, dst_obj, dst_loc_params, dst_name, ocpypl_id, lcpl_id, dxpl_id, req) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__object_copy() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_object_copy
*
* Purpose: Copies an object to another destination through the VOL
@@ -4438,28 +4522,34 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_object_copy(void *src_obj, H5VL_loc_params_t loc_params1, const H5VL_class_t *cls1,
- const char *src_name, void *dst_obj, H5VL_loc_params_t loc_params2,
- const H5VL_class_t *cls2, const char *dst_name, hid_t ocpypl_id,
- hid_t lcpl_id, hid_t dxpl_id, void **req)
+H5VL_object_copy(const H5VL_object_t *src_obj, H5VL_loc_params_t src_loc_params,
+ const char *src_name, const H5VL_object_t *dst_obj, H5VL_loc_params_t dst_loc_params,
+ const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id,
+ void **req)
{
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Make sure that the VOL plugins are the same */
- if(cls1->value != cls2->value)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "Objects are accessed through different VOL plugins and can't be linked")
+ if(src_obj->plugin->cls->value != dst_obj->plugin->cls->value)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "objects are accessed through different VOL plugins and can't be copied")
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls1->object_cls.copy)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object copy' method")
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(src_obj->data, src_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
- /* Call the corresponding VOL callback */
- if((cls1->object_cls.copy)(src_obj, loc_params1, src_name, dst_obj, loc_params2, dst_name, ocpypl_id, lcpl_id, dxpl_id, req) < 0)
+ /* Call the corresponding internal VOL routine */
+ if(H5VL__object_copy(src_obj->data, src_loc_params, src_name, dst_obj->data, dst_loc_params, dst_name, src_obj->plugin->cls, ocpypl_id, lcpl_id, dxpl_id, req) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "object copy failed")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_copy() */
@@ -4475,30 +4565,24 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VLobject_copy(void *src_obj, H5VL_loc_params_t loc_params1, hid_t plugin_id1,
- const char *src_name, void *dst_obj, H5VL_loc_params_t loc_params2,
- hid_t plugin_id2, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id,
+H5VLobject_copy(void *src_obj, H5VL_loc_params_t src_loc_params,
+ const char *src_name, void *dst_obj, H5VL_loc_params_t dst_loc_params,
+ const char *dst_name, hid_t plugin_id, hid_t ocpypl_id, hid_t lcpl_id,
hid_t dxpl_id, void **req)
{
- H5VL_class_t *cls1; /* VOL plugin's class struct */
- H5VL_class_t *cls2; /* VOL plugin's class struct */
+ H5VL_class_t *cls; /* VOL plugin's class struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API_NOINIT
- H5TRACE12("e", "*xxi*s*xxi*siii**x", src_obj, loc_params1, plugin_id1,
- src_name, dst_obj, loc_params2, plugin_id2, dst_name, ocpypl_id,
- lcpl_id, dxpl_id, req);
/* Check args and get class pointers */
if(NULL == src_obj || NULL == dst_obj)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object")
- if(NULL == (cls1 = (H5VL_class_t *)H5I_object_verify(plugin_id1, H5I_VOL)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL plugin ID")
- if(NULL == (cls2 = (H5VL_class_t *)H5I_object_verify(plugin_id2, H5I_VOL)))
+ if(NULL == (cls = (H5VL_class_t *)H5I_object_verify(plugin_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL plugin ID")
/* Call the corresponding internal VOL routine */
- if(H5VL_object_copy(src_obj, loc_params1, cls1, src_name, dst_obj, loc_params2, cls2, dst_name, ocpypl_id, lcpl_id, dxpl_id, req) < 0)
+ if(H5VL__object_copy(src_obj, src_loc_params, src_name, dst_obj, dst_loc_params, dst_name, cls, ocpypl_id, lcpl_id, dxpl_id, req) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTCOPY, FAIL, "unable to copy object")
done:
@@ -4507,6 +4591,37 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL__object_get
+ *
+ * Purpose: Get specific information about the object through the VOL
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL__object_get(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls,
+ H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if the corresponding VOL callback exists */
+ if(NULL == cls->object_cls.get)
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object get' method")
+
+ /* Call the corresponding VOL callback */
+ if((cls->object_cls.get)(obj, loc_params, get_type, dxpl_id, req, arguments) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__object_get() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_object_get
*
* Purpose: Get specific information about the object through the VOL
@@ -4517,23 +4632,25 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_object_get(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls,
+H5VL_object_get(const H5VL_object_t *vol_obj, H5VL_loc_params_t loc_params,
H5VL_object_get_t get_type, hid_t dxpl_id, void **req, ...)
{
va_list arguments; /* Argument list passed from the API call */
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls->object_cls.get)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object get' method")
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
- /* Call the corresponding VOL callback */
+ /* Call the corresponding internal VOL routine */
va_start(arguments, req);
arg_started = TRUE;
- if((cls->object_cls.get)(obj, loc_params, get_type, dxpl_id, req, arguments) < 0)
+ if(H5VL__object_get(vol_obj->data, loc_params, vol_obj->plugin->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed")
done:
@@ -4541,6 +4658,10 @@ done:
if(arg_started)
va_end(arguments);
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_get() */
@@ -4572,12 +4693,8 @@ H5VLobject_get(void *obj, H5VL_loc_params_t loc_params, hid_t plugin_id, H5VL_ob
if(NULL == (cls = (H5VL_class_t *)H5I_object_verify(plugin_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL plugin ID")
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls->object_cls.get)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no `object get' method")
-
- /* Bypass the H5VLint layer, calling the VOL callback directly */
- if((cls->object_cls.get)(obj, loc_params, get_type, dxpl_id, req, arguments) < 0)
+ /* Call the corresponding internal VOL routine */
+ if(H5VL__object_get(obj, loc_params, cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to execute object get callback")
done:
@@ -4586,9 +4703,41 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL__object_specific
+ *
+ * Purpose: Specific operation on objects through the VOL
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL__object_specific(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls,
+ H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req,
+ va_list arguments)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if the corresponding VOL callback exists */
+ if(NULL == cls->object_cls.specific)
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object specific' method")
+
+ /* Call the corresponding VOL callback */
+ if((ret_value = (cls->object_cls.specific)(obj, loc_params, specific_type, dxpl_id, req, arguments)) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "object specific failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__object_specific() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_object_specific
*
- * Purpose: specific operation on objects through the VOL
+ * Purpose: Specific operation on objects through the VOL
*
* Return: Success: Non-negative
* Failure: Negative
@@ -4596,23 +4745,25 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_object_specific(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls,
+H5VL_object_specific(const H5VL_object_t *vol_obj, H5VL_loc_params_t loc_params,
H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, ...)
{
va_list arguments; /* Argument list passed from the API call */
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls->object_cls.specific)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object specific' method")
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
- /* Call the corresponding VOL callback */
+ /* Call the corresponding internal VOL routine */
va_start(arguments, req);
arg_started = TRUE;
- if((ret_value = (cls->object_cls.specific)(obj, loc_params, specific_type, dxpl_id, req, arguments)) < 0)
+ if((ret_value = H5VL__object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, specific_type, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "object specific failed")
done:
@@ -4620,6 +4771,10 @@ done:
if(arg_started)
va_end(arguments);
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_specific() */
@@ -4665,9 +4820,40 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5VL__object_optional
+ *
+ * Purpose: Optional operation specific to plugins.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5VL__object_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
+ void **req, va_list arguments)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if the corresponding VOL callback exists */
+ if(NULL == cls->object_cls.optional)
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object optional' method")
+
+ /* Call the corresponding VOL callback */
+ if((cls->object_cls.optional)(obj, dxpl_id, req, arguments) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5VL__object_optional() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5VL_object_optional
*
- * Purpose: optional operation specific to plugins.
+ * Purpose: Optional operation specific to plugins.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -4675,23 +4861,24 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_object_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
- void **req, ...)
+H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
{
va_list arguments; /* Argument list passed from the API call */
hbool_t arg_started = FALSE; /* Whether the va_list has been started */
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls->object_cls.optional)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no 'object optional' method")
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
- /* Call the corresponding VOL callback */
+ /* Call the corresponding internal VOL routine */
va_start(arguments, req);
arg_started = TRUE;
- if((cls->object_cls.optional)(obj, dxpl_id, req, arguments) < 0)
+ if(H5VL__object_optional(vol_obj->data, vol_obj->plugin->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback")
done:
@@ -4699,6 +4886,10 @@ done:
if(arg_started)
va_end(arguments);
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_VOL, H5E_CANTRESET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_optional() */
@@ -4728,12 +4919,8 @@ H5VLobject_optional(void *obj, hid_t plugin_id, hid_t dxpl_id, void **req, va_li
if(NULL == (cls = (H5VL_class_t *)H5I_object_verify(plugin_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a VOL plugin ID")
- /* Check if the corresponding VOL callback exists */
- if(NULL == cls->object_cls.optional)
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "VOL plugin has no `object optional' method")
-
- /* Bypass the H5VLint layer, calling the VOL callback directly */
- if((cls->object_cls.optional)(obj, dxpl_id, req, arguments) < 0)
+ /* Call the corresponding internal VOL routine */
+ if(H5VL__object_optional(obj, cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback")
done:
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index 546c3ca..7b2e590 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -147,11 +147,11 @@ H5_DLL herr_t H5VL_link_specific(const H5VL_object_t *vol_obj, H5VL_loc_params_t
H5_DLL herr_t H5VL_link_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...);
/* Object functions */
-H5_DLL void *H5VL_object_open(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
-H5_DLL herr_t H5VL_object_copy(void *src_obj, H5VL_loc_params_t loc_params1, const H5VL_class_t *cls1, const char *src_name, void *dst_obj, H5VL_loc_params_t loc_params2, const H5VL_class_t *cls2, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
-H5_DLL herr_t H5VL_object_get(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, ...);
-H5_DLL herr_t H5VL_object_specific(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, ...);
-H5_DLL herr_t H5VL_object_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req, ...);
+H5_DLL void * H5VL_object_open(const H5VL_object_t *vol_obj, H5VL_loc_params_t params, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
+H5_DLL herr_t H5VL_object_copy(const H5VL_object_t *src_obj, H5VL_loc_params_t src_loc_params, const char *src_name, const H5VL_object_t *dst_obj, H5VL_loc_params_t dst_loc_params, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
+H5_DLL herr_t H5VL_object_get(const H5VL_object_t *vol_obj, H5VL_loc_params_t loc_params, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, ...);
+H5_DLL herr_t H5VL_object_specific(const H5VL_object_t *vol_obj, H5VL_loc_params_t loc_params, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, ...);
+H5_DLL herr_t H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...);
/* Datatype functions */
H5_DLL void *H5VL_datatype_commit(void *obj, H5VL_loc_params_t loc_params, const H5VL_class_t *cls, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req);
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index 3cf3c79..5d19985 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -490,9 +490,9 @@ H5_DLL herr_t H5VLlink_optional(void *obj, hid_t plugin_id, hid_t dxpl_id, void
/* Public wrappers for object callbacks */
H5_DLL void *H5VLobject_open(void *obj, H5VL_loc_params_t loc_params, hid_t plugin_id, H5I_type_t *opened_type, hid_t dxpl_id, void **req);
-H5_DLL herr_t H5VLobject_copy(void *src_obj, H5VL_loc_params_t loc_params1, hid_t plugin_id1, const char *src_name,
- void *dst_obj, H5VL_loc_params_t loc_params2, hid_t plugin_id2, const char *dst_name,
- hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
+H5_DLL herr_t H5VLobject_copy(void *src_obj, H5VL_loc_params_t loc_params1, const char *src_name,
+ void *dst_obj, H5VL_loc_params_t loc_params2, const char *dst_name,
+ hid_t plugin_id, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id, void **req);
H5_DLL herr_t H5VLobject_get(void *obj, H5VL_loc_params_t loc_params, hid_t plugin_id, H5VL_object_get_t get_type, hid_t dxpl_id, void **req, va_list arguments);
H5_DLL herr_t H5VLobject_specific(void *obj, H5VL_loc_params_t loc_params, hid_t plugin_id, H5VL_object_specific_t specific_type, hid_t dxpl_id, void **req, va_list arguments);
H5_DLL herr_t H5VLobject_optional(void *obj, hid_t plugin_id, hid_t dxpl_id, void **req, va_list arguments);