summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-26 05:54:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-26 05:54:29 (GMT)
commit305997501dd4c44cb46adfc0159489ae84c5fad4 (patch)
tree9be360975ec087d7aec751b22b336f79932dca26 /src
parent4a328957243ca7502a4c4966d6598498be43e3cd (diff)
downloadhdf5-305997501dd4c44cb46adfc0159489ae84c5fad4.zip
hdf5-305997501dd4c44cb46adfc0159489ae84c5fad4.tar.gz
hdf5-305997501dd4c44cb46adfc0159489ae84c5fad4.tar.bz2
Updates after merging changes from develop.
Diffstat (limited to 'src')
-rw-r--r--src/H5Dint.c2
-rw-r--r--src/H5Dprivate.h2
-rw-r--r--src/H5Gdeprec.c2
-rw-r--r--src/H5Gint.c2
-rw-r--r--src/H5Gprivate.h2
-rw-r--r--src/H5I.c16
-rw-r--r--src/H5L.c70
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5VL.c14
-rw-r--r--src/H5VLint.c18
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5VLnative_private.h2
-rw-r--r--src/H5VLprivate.h5
14 files changed, 85 insertions, 56 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index a9ac7ac..44a9d88 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1961,7 +1961,7 @@ H5D_oloc(H5D_t *dataset)
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5D_nameof(H5D_t *dataset)
+H5D_nameof(const H5D_t *dataset)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index cbee0de..4e9cda8 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -158,7 +158,7 @@ H5_DLL herr_t H5D_close(H5D_t *dataset);
H5_DLL herr_t H5D_mult_refresh_close(hid_t dset_id);
H5_DLL herr_t H5D_mult_refresh_reopen(H5D_t *dataset);
H5_DLL H5O_loc_t *H5D_oloc(H5D_t *dataset);
-H5_DLL H5G_name_t *H5D_nameof(H5D_t *dataset);
+H5_DLL H5G_name_t *H5D_nameof(const H5D_t *dataset);
H5_DLL H5T_t *H5D_typeof(const H5D_t *dset);
H5_DLL herr_t H5D_flush_all(const H5F_t *f);
H5_DLL hid_t H5D_get_create_plist(const H5D_t *dset);
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 15fd7e8..d207bc1 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -853,7 +853,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
lnk_op.op_func.op_old = op;
/* Get the object pointer */
- if(NULL == (vol_obj = H5VL_get_object(loc_id)))
+ if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
/* Set wrapper info in API context */
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 7b028e2..8f9e908 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -578,7 +578,7 @@ H5G_oloc(H5G_t *grp)
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5G_nameof(H5G_t *grp)
+H5G_nameof(const H5G_t *grp)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index dc8146c..f149f29 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -187,7 +187,7 @@ typedef struct H5G_entry_t H5G_entry_t;
* call.
*/
H5_DLL struct H5O_loc_t *H5G_oloc(H5G_t *grp);
-H5_DLL H5G_name_t * H5G_nameof(H5G_t *grp);
+H5_DLL H5G_name_t * H5G_nameof(const H5G_t *grp);
H5_DLL H5F_t *H5G_fileof(H5G_t *grp);
H5_DLL H5G_t *H5G_open(const H5G_loc_t *loc);
H5_DLL herr_t H5G_close(H5G_t *grp);
diff --git a/src/H5I.c b/src/H5I.c
index 263f51d..aef5cc5 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -485,9 +485,8 @@ H5I__unwrap(void *obj_ptr, H5I_type_t type)
ret_value = H5VL_object_data(vol_obj);
} /* end if */
else if(H5I_DATATYPE == type) {
- const H5T_t *dt;
+ H5T_t *dt = (H5T_t *)obj_ptr;
- dt = (const H5T_t *)obj_ptr;
ret_value = (void *)H5T_get_actual_type(dt);
} /* end if */
else
@@ -904,8 +903,7 @@ H5I_subst(hid_t id, const void *new_object)
HGOTO_ERROR(H5E_ATOM, H5E_NOTFOUND, NULL, "can't get ID ref count")
/* Get the old object pointer to return */
- /* (Casting away const OK -QAK) */
- ret_value = (void *)id_ptr->obj_ptr;
+ ret_value = (void *)id_ptr->obj_ptr; /* (Casting away const OK -QAK) */
/* Set the new object pointer for the ID */
id_ptr->obj_ptr = new_object;
@@ -2026,7 +2024,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
/* The stored object pointer might be an H5VL_object_t, in which
* case we'll need to get the wrapped object struct (H5F_t *, etc.).
*/
- obj_ptr = H5I__unwrap(item->obj_ptr, type);
+ obj_ptr = H5I__unwrap((void *)item->obj_ptr, type);
/* Invoke callback function */
cb_ret_val = (*udata->user_func)((void *)obj_ptr, item->id, udata->user_udata); /* (Casting away const OK) */
@@ -2179,7 +2177,7 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object location")
/* Get the object pointer */
- if(NULL == (vol_obj = H5VL_get_object(id)))
+ if(NULL == (vol_obj = H5VL_vol_object(id)))
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
/* Set wrapper info in API context */
@@ -2356,7 +2354,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
obj_ptr = H5VL_object_data(vol_obj);
if(H5_VOL_NATIVE == vol_obj->plugin->cls->value)
- path = H5G_nameof((H5G_t *)obj_ptr);
+ path = H5G_nameof(obj_ptr);
break;
}
@@ -2367,7 +2365,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
obj_ptr = H5VL_object_data(vol_obj);
if(H5_VOL_NATIVE == vol_obj->plugin->cls->value)
- path = H5D_nameof((H5D_t *)obj_ptr);
+ path = H5D_nameof(obj_ptr);
break;
}
@@ -2377,7 +2375,7 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata)
obj_ptr = (void *)H5T_get_actual_type(dt);
- path = H5T_nameof((H5T_t *)obj_ptr);
+ path = H5T_nameof(obj_ptr);
break;
}
diff --git a/src/H5L.c b/src/H5L.c
index 3850285..37561d3 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -337,7 +337,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
vol_obj = (vol_obj1 ? vol_obj1 : vol_obj2);
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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
}
@@ -351,7 +351,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lmove() */
@@ -438,7 +438,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
vol_obj = (vol_obj1 ? vol_obj1 : vol_obj2);
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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
}
@@ -452,7 +452,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lcopy() */
@@ -531,7 +531,7 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Create the link */
@@ -542,7 +542,7 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_soft() */
@@ -722,7 +722,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Create external link */
@@ -733,7 +733,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lcreate_ud() */
@@ -787,7 +787,7 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Unlink */
@@ -798,7 +798,7 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id)
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Ldelete() */
@@ -893,6 +893,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
{
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)
@@ -915,12 +916,21 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
if(NULL == (vol_obj = (H5VL_object_t *)H5I_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_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Get the link value */
if(H5VL_link_get(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_LINK_GET_VAL,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, buf, size) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name)
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_val() */
@@ -1007,6 +1017,7 @@ H5Lexists(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)
@@ -1032,12 +1043,21 @@ H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
if(NULL == (vol_obj = (H5VL_object_t *)H5I_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_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Check for the existence of the link */
if(H5VL_link_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_LINK_EXISTS,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* end H5Lexists() */
@@ -1087,7 +1107,7 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Get the link information */
@@ -1098,7 +1118,7 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_info() */
@@ -1158,7 +1178,7 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Get the link information */
@@ -1169,7 +1189,7 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lget_info_by_idx() */
@@ -1424,7 +1444,7 @@ H5Literate(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Iterate over the links */
@@ -1436,7 +1456,7 @@ H5Literate(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Literate() */
@@ -1471,6 +1491,7 @@ H5Literate_by_name(hid_t loc_id, const char *group_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 */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1503,12 +1524,21 @@ H5Literate_by_name(hid_t loc_id, const char *group_name,
loc_params.loc_data.loc_by_name.name = group_name;
loc_params.loc_data.loc_by_name.lapl_id = lapl_id;
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Iterate over the links */
if((ret_value = H5VL_link_specific(vol_obj->data, loc_params, vol_obj->plugin->cls, H5VL_LINK_ITER,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, FALSE, idx_type, order, idx_p, op, op_data)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* end H5Literate_by_name() */
@@ -1575,7 +1605,7 @@ H5Lvisit(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Iterate over the links */
@@ -1587,7 +1617,7 @@ H5Lvisit(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lvisit() */
@@ -1662,7 +1692,7 @@ H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
/* 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")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
vol_wrapper_set = TRUE;
/* Visit the links */
@@ -1674,7 +1704,7 @@ H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
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")
+ HDONE_ERROR(H5E_LINK, H5E_CANTSET, H5I_INVALID_HID, "can't reset VOL wrapper info")
FUNC_LEAVE_API(ret_value)
} /* end H5Lvisit_by_name() */
diff --git a/src/H5T.c b/src/H5T.c
index e539ea5..08f689c 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -5070,7 +5070,7 @@ done:
*-------------------------------------------------------------------------
*/
H5G_name_t *
-H5T_nameof(H5T_t *dt)
+H5T_nameof(const H5T_t *dt)
{
H5G_name_t *ret_value = NULL;
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index a14eb8a..6b6446f 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -119,7 +119,7 @@ H5_DLL herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
H5_DLL H5T_t *H5T_decode(size_t buf_size, const unsigned char *buf);
H5_DLL herr_t H5T_debug(const H5T_t *dt, FILE * stream);
H5_DLL struct H5O_loc_t *H5T_oloc(H5T_t *dt);
-H5_DLL H5G_name_t *H5T_nameof(H5T_t *dt);
+H5_DLL H5G_name_t *H5T_nameof(const H5T_t *dt);
H5_DLL htri_t H5T_is_immutable(const H5T_t *dt);
H5_DLL htri_t H5T_is_named(const H5T_t *dt);
H5_DLL herr_t H5T_convert_committed_datatype(H5T_t *dt, H5F_t *f);
diff --git a/src/H5VL.c b/src/H5VL.c
index 3d4c04a..5c2d113 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -160,7 +160,7 @@ H5VLregister_plugin(const H5VL_class_t *cls, hid_t vipl_id)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLregister_driver() */
+} /* end H5VLregister_plugin() */
/*-------------------------------------------------------------------------
@@ -221,7 +221,7 @@ H5VLregister_plugin_by_name(const char *name, hid_t vipl_id)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLregister_driver_by_name() */
+} /* end H5VLregister_plugin_by_name() */
/*-------------------------------------------------------------------------
@@ -273,7 +273,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VLunregister_driver(hid_t vol_id)
+H5VLunregister_plugin(hid_t vol_id)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -290,11 +290,11 @@ H5VLunregister_driver(hid_t vol_id)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLunregister_driver() */
+} /* end H5VLunregister_plugin() */
/*-------------------------------------------------------------------------
- * Function: H5VLis_driver_registered
+ * Function: H5VLis_plugin_registered
*
* Purpose: Tests whether a VOL class has been registered or not
*
@@ -307,7 +307,7 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5VLis_driver_registered(const char *name)
+H5VLis_plugin_registered(const char *name)
{
H5VL_get_plugin_ud_t op_data; /* Callback info for plugin search */
htri_t ret_value = FALSE; /* Return value */
@@ -327,7 +327,7 @@ H5VLis_driver_registered(const char *name)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5VLis_driver_registered() */
+} /* end H5VLis_plugin_registered() */
/*-------------------------------------------------------------------------
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 3899ba2..11deed9 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -237,7 +237,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_register(H5I_type_t type, const void *object, H5VL_t *vol_plugin, hbool_t app_ref)
+H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_plugin, hbool_t app_ref)
{
H5VL_object_t *vol_obj = NULL;
hid_t ret_value = H5I_INVALID_HID;
@@ -298,7 +298,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_driver, hbool_t app_ref, hid_t existing_id)
+H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_plugin, hbool_t app_ref, hid_t existing_id)
{
H5VL_object_t *new_vol_obj = NULL; /* Pointer to new VOL object */
void *stored_obj = NULL; /* Pointer to the object that will be stored */
@@ -308,7 +308,7 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_drive
/* Check arguments */
HDassert(object);
- HDassert(vol_driver);
+ HDassert(vol_plugin);
/* Make sure type number is valid */
if(type != H5I_ATTR && type != H5I_DATASET && type != H5I_DATATYPE && type != H5I_FILE && type != H5I_GROUP)
@@ -317,11 +317,11 @@ H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_drive
/* Set up the new VOL object */
if(NULL == (new_vol_obj = H5FL_CALLOC(H5VL_object_t)))
HGOTO_ERROR(H5E_VOL, H5E_CANTALLOC, FAIL, "can't allocate memory for VOL object");
- new_vol_obj->driver = vol_driver;
+ new_vol_obj->plugin = vol_plugin;
new_vol_obj->data = object;
- /* Bump the reference count on the VOL driver */
- vol_driver->nrefs++;
+ /* Bump the reference count on the VOL plugin */
+ vol_plugin->nrefs++;
/* If this is a datatype, we have to hide the VOL object under the H5T_t pointer */
if(H5I_DATATYPE == type) {
@@ -353,7 +353,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_register_using_vol_id(H5I_type_t type, const void *obj, hid_t plugin_id, hbool_t app_ref)
+H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t plugin_id, hbool_t app_ref)
{
H5VL_class_t *cls = NULL;
H5VL_t *plugin = NULL; /* VOL plugin struct */
@@ -480,7 +480,7 @@ H5VL_get_plugin_name(hid_t id, char *name /*out*/, size_t size)
H5VL_object_t *vol_obj;
const H5VL_class_t *cls;
size_t len;
- ssize_t ret_value;
+ ssize_t ret_value = -1;
FUNC_ENTER_NOAPI(FAIL)
@@ -891,7 +891,7 @@ H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref)
new_obj = obj;
/* Get an ID for the object */
- if((ret_value = H5VL_object_register(new_obj, type, vol_wrap_ctx->plugin->id, app_ref)) < 0)
+ if((ret_value = H5VL_register_using_vol_id(type, new_obj, vol_wrap_ctx->plugin->id, app_ref)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to get an ID for the object")
done:
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index b67caa6..22723a0 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -400,7 +400,7 @@ H5VL_native_register(H5I_type_t type, const void *obj, hbool_t app_ref)
* field will get clobbered later, so disallow this.
*/
if(type == H5I_DATATYPE)
- if(((H5T_t *)obj)->vol_obj != NULL)
+ if(((const H5T_t *)obj)->vol_obj != NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can only get an ID for an uncommitted datatype")
HDassert(0 && "H5VL_native_register");
diff --git a/src/H5VLnative_private.h b/src/H5VLnative_private.h
index 873557a..114ce8c 100644
--- a/src/H5VLnative_private.h
+++ b/src/H5VLnative_private.h
@@ -29,7 +29,7 @@ extern "C" {
#endif
H5_DLL hid_t H5VL_native_get_driver_id(void);
-H5_DLL hid_t H5VL_native_init(void);
+H5_DLL hid_t H5VL_native_init(hid_t vipl_id);
H5_DLL hid_t H5VL_native_register(H5I_type_t type, const void *obj, hbool_t app_ref);
#ifdef __cplusplus
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index 1defb13..fd44c3b 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -78,6 +78,7 @@ H5_DLL ssize_t H5VL_get_plugin_name(hid_t id, char *name/*out*/, size_t size);
/* Functions that manipulate VOL objects */
H5_DLL void *H5VL_object(hid_t id);
+H5_DLL void *H5VL_object_data(const H5VL_object_t *vol_obj);
H5_DLL void *H5VL_object_verify(hid_t id, H5I_type_t obj_type);
H5_DLL H5VL_object_t *H5VL_vol_object(hid_t id);
H5_DLL herr_t H5VL_free_object(H5VL_object_t *obj);
@@ -92,9 +93,9 @@ H5_DLL void * H5VL_wrap_object(const H5VL_class_t *plugin, void *wrap_ctx,
void *obj);
/* ID registration functions */
-H5_DLL hid_t H5VL_register(H5I_type_t type, const void *object, H5VL_t *vol_plugin, hbool_t app_ref);
+H5_DLL hid_t H5VL_register(H5I_type_t type, void *object, H5VL_t *vol_plugin, hbool_t app_ref);
H5_DLL hid_t H5VL_wrap_register(H5I_type_t type, void *obj, hbool_t app_ref);
-H5_DLL hid_t H5VL_register_using_vol_id(H5I_type_t type, const void *obj, hid_t driver_id, hbool_t app_ref);
+H5_DLL hid_t H5VL_register_using_vol_id(H5I_type_t type, void *obj, hid_t driver_id, hbool_t app_ref);
H5_DLL herr_t H5VL_register_using_existing_id(H5I_type_t type, void *object, H5VL_t *vol_driver, hbool_t app_ref, hid_t existing_id);
/******************************