summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-06-29 20:18:17 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2021-06-29 20:18:17 (GMT)
commit1b045d359486a8379c2ed5e4ff465dcb30d2fe50 (patch)
tree6aacb81da182298d97a65f2e680da57b1a4de369 /src
parentb6e1c9c68ed0efa1d3a2ee939af226e4b2a8555a (diff)
parent91d016d62130e5a4a8fa8bc8e74f30d1ec8797e5 (diff)
downloadhdf5-1b045d359486a8379c2ed5e4ff465dcb30d2fe50.zip
hdf5-1b045d359486a8379c2ed5e4ff465dcb30d2fe50.tar.gz
hdf5-1b045d359486a8379c2ed5e4ff465dcb30d2fe50.tar.bz2
Merge branch 'post_open_fix' of github.com:hpc-io/hdf5 into post_open_fix
Diffstat (limited to 'src')
-rw-r--r--src/H5CX.c8
-rw-r--r--src/H5Dprivate.h12
-rw-r--r--src/H5F.c45
-rw-r--r--src/H5Fefc.c16
-rw-r--r--src/H5Fint.c12
-rw-r--r--src/H5Fpkg.h4
-rw-r--r--src/H5Pdevelop.h1
-rw-r--r--src/H5Pdxpl.c8
-rw-r--r--src/H5Rint.c5
-rw-r--r--src/H5T.c8
-rw-r--r--src/H5Tconv.c531
-rw-r--r--src/H5Tpkg.h28
-rw-r--r--src/H5Tref.c14
-rw-r--r--src/H5Tvlen.c4
-rw-r--r--src/H5VLcallback.c270
-rw-r--r--src/H5VLint.c15
-rw-r--r--src/H5VLnative.h4
-rw-r--r--src/H5VLprivate.h21
-rw-r--r--src/H5VLtest.c1
-rw-r--r--src/H5private.h16
20 files changed, 521 insertions, 502 deletions
diff --git a/src/H5CX.c b/src/H5CX.c
index 6a0608f..4da54a1 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -864,8 +864,8 @@ H5CX_push_special(void)
herr_t
H5CX_test_and_push(hbool_t *pushed)
{
- H5CX_node_t **head = NULL; /* Pointer to head of API context list */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5CX_node_t **head = NULL; /* Pointer to head of API context list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -874,8 +874,8 @@ H5CX_test_and_push(hbool_t *pushed)
/* Check for API context already pushed */
head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
- if(NULL == *head) {
- H5CX_node_t *cnode = NULL; /* Context node */
+ if (NULL == *head) {
+ H5CX_node_t *cnode = NULL; /* Context node */
/* Allocate & clear API context node */
if (NULL == (cnode = H5FL_CALLOC(H5CX_node_t)))
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 20065d7..8e7fd38 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -79,12 +79,12 @@
#define H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME \
"local_no_collective_cause" /* cause of broken collective I/O in each process */
#define H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME \
- "global_no_collective_cause" /* cause of broken collective I/O in all processes */
-#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
-#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
-#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
-#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
-#define H5D_XFER_DSET_IO_SEL_NAME "dset_io_selection" /* Dataset I/O selection */
+ "global_no_collective_cause" /* cause of broken collective I/O in all processes */
+#define H5D_XFER_EDC_NAME "err_detect" /* EDC */
+#define H5D_XFER_FILTER_CB_NAME "filter_cb" /* Filter callback function */
+#define H5D_XFER_CONV_CB_NAME "type_conv_cb" /* Type conversion callback function */
+#define H5D_XFER_XFORM_NAME "data_transform" /* Data transform */
+#define H5D_XFER_DSET_IO_SEL_NAME "dset_io_selection" /* Dataset I/O selection */
#define H5D_XFER_PLUGIN_NEW_API_CTX_NAME "plugin_new_api_context" /* Plugin new API context */
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
/* Collective chunk instrumentation properties */
diff --git a/src/H5F.c b/src/H5F.c
index 05dbf99..34bc408 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -520,7 +520,7 @@ done:
static hid_t
H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id, void **token_ptr)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_STATIC
@@ -557,7 +557,8 @@ H5F__create_api_common(const char *filename, unsigned flags, hid_t fcpl_id, hid_
flags |= H5F_ACC_RDWR | H5F_ACC_CREAT;
/* Create a new file or truncate an existing file through the VOL */
- if ((ret_value = H5VL_file_create(filename, flags, fcpl_id, fapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr)) < 0)
+ if ((ret_value =
+ H5VL_file_create(filename, flags, fcpl_id, fapl_id, H5P_DATASET_XFER_DEFAULT, token_ptr)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file")
done:
@@ -592,7 +593,7 @@ done:
hid_t
H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id);
@@ -620,9 +621,9 @@ hid_t
H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, const char *filename,
unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t es_id)
{
- void * token = NULL; /* Request token for async operation */
- void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ void * token = NULL; /* Request token for async operation */
+ void **token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE8("i", "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id);
@@ -637,7 +638,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c
/* If a token was created, add the token to the event set */
if (NULL != token) {
- H5VL_object_t *vol_obj; /* File object */
+ H5VL_object_t *vol_obj; /* File object */
/* Get the file object */
if (NULL == (vol_obj = H5VL_vol_object(ret_value)))
@@ -651,7 +652,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID")
HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_API(ret_value)
@@ -671,8 +672,8 @@ done:
static hid_t
H5F__open_api_common(const char *filename, unsigned flags, hid_t fapl_id, void **token_ptr)
{
- hid_t file_id = H5I_INVALID_HID; /* File ID */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t file_id = H5I_INVALID_HID; /* File ID */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_STATIC
@@ -729,7 +730,7 @@ done:
hid_t
H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE3("i", "*sIui", filename, flags, fapl_id);
@@ -758,9 +759,9 @@ hid_t
H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, const char *filename,
unsigned flags, hid_t fapl_id, hid_t es_id)
{
- void * token = NULL; /* Request token for async operation */
- void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ void * token = NULL; /* Request token for async operation */
+ void **token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE7("i", "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id);
@@ -775,7 +776,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con
/* If a token was created, add the token to the event set */
if (NULL != token) {
- H5VL_object_t *vol_obj = NULL; /* File object */
+ H5VL_object_t *vol_obj = NULL; /* File object */
/* Get the file object */
if (NULL == (vol_obj = H5VL_vol_object(ret_value)))
@@ -789,7 +790,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID")
HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_API(ret_value)
@@ -1342,7 +1343,7 @@ done:
hid_t
H5Freopen(hid_t file_id)
{
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE1("i", "i", file_id);
@@ -1370,9 +1371,9 @@ done:
hid_t
H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t file_id, hid_t es_id)
{
- void * token = NULL; /* Request token for async operation */
- void ** token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
- hid_t ret_value; /* Return value */
+ void * token = NULL; /* Request token for async operation */
+ void **token_ptr = H5_REQUEST_NULL; /* Pointer to request token for async operation */
+ hid_t ret_value; /* Return value */
FUNC_ENTER_API(H5I_INVALID_HID)
H5TRACE5("i", "*s*sIuii", app_file, app_func, app_line, file_id, es_id);
@@ -1387,7 +1388,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h
/* If a token was created, add the token to the event set */
if (NULL != token) {
- H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object for loc_id */
/* Get the file object */
if (NULL == (vol_obj = H5VL_vol_object(ret_value)))
@@ -1401,7 +1402,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID")
HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set")
} /* end if */
- } /* end if */
+ } /* end if */
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index 50f8a7d..7d6b089 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -135,10 +135,10 @@ done:
static H5F_t *
H5F__efc_open_real(const char *name, unsigned flags, hid_t fapl_id)
{
- H5VL_object_t *file_obj = NULL; /* Pointer to file VOL object */
- H5F_t *file = NULL; /* Pointer to opened file */
- hbool_t is_native; /* Whether the file VOL object is using the native VOL connector */
- H5F_t *ret_value = NULL; /* Return value */
+ H5VL_object_t *file_obj = NULL; /* Pointer to file VOL object */
+ H5F_t * file = NULL; /* Pointer to opened file */
+ hbool_t is_native; /* Whether the file VOL object is using the native VOL connector */
+ H5F_t * ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -215,10 +215,10 @@ done:
H5F_t *
H5F__efc_open(H5F_t *parent, const char *name, unsigned flags, hid_t fapl_id)
{
- H5F_efc_t * efc = NULL; /* External file cache for parent file */
- H5F_efc_ent_t * ent = NULL; /* Entry for target file in efc */
- hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
- H5F_t * ret_value = NULL; /* Return value */
+ H5F_efc_t * efc = NULL; /* External file cache for parent file */
+ H5F_efc_ent_t *ent = NULL; /* Entry for target file in efc */
+ hbool_t open_file = FALSE; /* Whether ent->file needs to be closed in case of error */
+ H5F_t * ret_value = NULL; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 4118beb..3d46147 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -329,7 +329,7 @@ static herr_t
H5F__set_vol_conn(H5F_t *file)
{
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- const H5VL_class_t *vol_cls; /* Pointer to VOL connector class for the container */
+ const H5VL_class_t * vol_cls; /* Pointer to VOL connector class for the container */
void * new_connector_info = NULL; /* Copy of connector info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1653,15 +1653,15 @@ H5F__dest(H5F_t *f, hbool_t flush)
f->open_name = (char *)H5MM_xfree(f->open_name);
f->actual_name = (char *)H5MM_xfree(f->actual_name);
if (f->vol_obj) {
-// void *vol_wrap_ctx = NULL;
+ // void *vol_wrap_ctx = NULL;
/* If a VOL wrapping context is available, retrieve it
* and unwrap file VOL object
*/
-// if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
-// HDONE_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL object wrap context")
-// if (vol_wrap_ctx && (NULL == H5VL_object_unwrap(f->vol_obj)))
-// HDONE_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't unwrap VOL object")
+ // if (H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0)
+ // HDONE_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get VOL object wrap context")
+ // if (vol_wrap_ctx && (NULL == H5VL_object_unwrap(f->vol_obj)))
+ // HDONE_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't unwrap VOL object")
if (H5VL_free_object(f->vol_obj) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to free VOL object")
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index c9557d6..752abc0 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -309,8 +309,8 @@ struct H5F_shared_t {
hbool_t closing; /* File is in the process of being closed */
/* Cached VOL connector ID & info */
- hid_t vol_id; /* ID of VOL connector for the container */
- void * vol_info; /* Copy of VOL connector info for container */
+ hid_t vol_id; /* ID of VOL connector for the container */
+ void *vol_info; /* Copy of VOL connector info for container */
/* File space allocation information */
H5F_fspace_strategy_t fs_strategy; /* File space handling strategy */
diff --git a/src/H5Pdevelop.h b/src/H5Pdevelop.h
index 3e1b507..c9d65c4 100644
--- a/src/H5Pdevelop.h
+++ b/src/H5Pdevelop.h
@@ -29,7 +29,6 @@
/* Public Typedefs */
/*******************/
-
/********************/
/* Public Variables */
/********************/
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 54ce509..dcaa415 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -451,9 +451,8 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass)
/* Register the plugin new API context property */
if (H5P__register_real(pclass, H5D_XFER_PLUGIN_NEW_API_CTX_NAME, H5D_XFER_PLUGIN_NEW_API_CTX_SIZE,
- &H5D_def_new_api_ctx_g, NULL, NULL, NULL,
- H5D_XFER_PLUGIN_NEW_API_CTX_ENC, H5D_XFER_PLUGIN_NEW_API_CTX_DEC,
- NULL, NULL, NULL, NULL) < 0)
+ &H5D_def_new_api_ctx_g, NULL, NULL, NULL, H5D_XFER_PLUGIN_NEW_API_CTX_ENC,
+ H5D_XFER_PLUGIN_NEW_API_CTX_DEC, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
done:
@@ -2444,7 +2443,7 @@ done:
herr_t
H5Pget_plugin_new_api_context(hid_t plist_id, hbool_t *new_api_ctx /*out*/)
{
- H5P_genplist_t *plist; /* Property list pointer */
+ H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
@@ -2465,4 +2464,3 @@ H5Pget_plugin_new_api_context(hid_t plist_id, hbool_t *new_api_ctx /*out*/)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_plugin_new_api_context() */
-
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 78b6b38..eafc5c4 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -542,7 +542,7 @@ H5R__get_loc_id(const H5R_ref_priv_t *ref)
hid_t
H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
{
- hid_t file_id = H5I_INVALID_HID; /* New file's ID */
+ hid_t file_id = H5I_INVALID_HID; /* New file's ID */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_PACKAGE
@@ -555,7 +555,8 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id)
/* Open the file */
/* (Must open file read-write to allow for object modifications) */
- if (NULL == H5VL_file_open(H5R_REF_FILENAME(ref), H5F_ACC_RDWR, fapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &file_id))
+ if (NULL == H5VL_file_open(H5R_REF_FILENAME(ref), H5F_ACC_RDWR, fapl_id, H5P_DATASET_XFER_DEFAULT,
+ H5_REQUEST_NULL, &file_id))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file")
/* Attach loc_id to reference */
diff --git a/src/H5T.c b/src/H5T.c
index 5880553..cbaef63 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -252,10 +252,10 @@
{ \
H5T_INIT_TYPE_ALLOC_COMMON(H5T_REFERENCE) \
H5T_INIT_TYPE_NUM_COMMON(H5T_ORDER_NONE) \
- dt->shared->force_conv = TRUE; \
- dt->shared->u.atomic.u.r.file_obj = NULL; \
- dt->shared->u.atomic.u.r.loc = H5T_LOC_BADLOC; \
- dt->shared->u.atomic.u.r.cls = NULL; \
+ dt->shared->force_conv = TRUE; \
+ dt->shared->u.atomic.u.r.file_obj = NULL; \
+ dt->shared->u.atomic.u.r.loc = H5T_LOC_BADLOC; \
+ dt->shared->u.atomic.u.r.cls = NULL; \
}
#define H5T_INIT_TYPE_OBJREF_CORE \
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index f4796c8..7ea3d4c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3162,283 +3162,286 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si
break;
case H5T_CONV_CONV: {
- H5T_vlen_t *src_vl; /* Source VL type info */
- H5T_vlen_t *dst_vl; /* Destination VL type info */
+ H5T_vlen_t *src_vl; /* Source VL type info */
+ H5T_vlen_t *dst_vl; /* Destination VL type info */
- /*
- * Conversion.
- */
- if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- src_vl = &src->shared->u.vlen;
- dst_vl = &dst->shared->u.vlen;
+ /*
+ * Conversion.
+ */
+ if (NULL == (src = (H5T_t *)H5I_object(src_id)) || NULL == (dst = (H5T_t *)H5I_object(dst_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
+ src_vl = &src->shared->u.vlen;
+ dst_vl = &dst->shared->u.vlen;
- /* Initialize source & destination strides */
- if (buf_stride) {
- HDassert(buf_stride >= src->shared->size);
- HDassert(buf_stride >= dst->shared->size);
- H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
- s_stride = d_stride = (ssize_t)buf_stride;
- } /* end if */
- else {
- H5_CHECK_OVERFLOW(src->shared->size, size_t, ssize_t);
- H5_CHECK_OVERFLOW(dst->shared->size, size_t, ssize_t);
- s_stride = (ssize_t)src->shared->size;
- d_stride = (ssize_t)dst->shared->size;
- } /* end else */
- if (bkg) {
- if (bkg_stride)
- b_stride = (ssize_t)bkg_stride;
- else
- b_stride = d_stride;
- } /* end if */
+ /* Initialize source & destination strides */
+ if (buf_stride) {
+ HDassert(buf_stride >= src->shared->size);
+ HDassert(buf_stride >= dst->shared->size);
+ H5_CHECK_OVERFLOW(buf_stride, size_t, ssize_t);
+ s_stride = d_stride = (ssize_t)buf_stride;
+ } /* end if */
+ else {
+ H5_CHECK_OVERFLOW(src->shared->size, size_t, ssize_t);
+ H5_CHECK_OVERFLOW(dst->shared->size, size_t, ssize_t);
+ s_stride = (ssize_t)src->shared->size;
+ d_stride = (ssize_t)dst->shared->size;
+ } /* end else */
+ if (bkg) {
+ if (bkg_stride)
+ b_stride = (ssize_t)bkg_stride;
else
- b_stride = 0;
+ b_stride = d_stride;
+ } /* end if */
+ else
+ b_stride = 0;
- /* Get the size of the base types in src & dst */
- src_base_size = H5T_get_size(src->shared->parent);
- dst_base_size = H5T_get_size(dst->shared->parent);
+ /* Get the size of the base types in src & dst */
+ src_base_size = H5T_get_size(src->shared->parent);
+ dst_base_size = H5T_get_size(dst->shared->parent);
- /* Set up conversion path for base elements */
- if (NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
- "unable to convert between src and dest datatypes")
- else if (!H5T_path_noop(tpath)) {
- H5T_t *tsrc_cpy = NULL, *tdst_cpy = NULL;
-
- if (NULL == (tsrc_cpy = H5T_copy(src->shared->parent, H5T_COPY_ALL)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion")
- /* References need to know about the src file */
- if (tsrc_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tsrc_cpy, src_vl->file_obj, H5T_LOC_MEMORY) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
-
- if (NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion")
- /* References need to know about the dst file */
- if (tdst_cpy->shared->type == H5T_REFERENCE)
- if (H5T_set_loc(tdst_cpy, dst_vl->file_obj, H5T_LOC_MEMORY) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
-
- if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) ||
- ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, FALSE)) < 0))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL,
- "unable to register types for conversion")
- } /* end else-if */
- else
- noop_conv = TRUE;
-
- /* Check if we need a temporary buffer for this conversion */
- if ((parent_is_vlen = H5T_detect_class(dst->shared->parent, H5T_VLEN, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_SYSTEM, FAIL,
- "internal error when detecting variable-length class")
- if (tpath->cdata.need_bkg || parent_is_vlen) {
- /* Set up initial background buffer */
- tmp_buf_size = MAX(src_base_size, dst_base_size);
- if (NULL == (tmp_buf = H5FL_BLK_CALLOC(vlen_seq, tmp_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
- "memory allocation failed for type conversion")
- } /* end if */
+ /* Set up conversion path for base elements */
+ if (NULL == (tpath = H5T_path_find(src->shared->parent, dst->shared->parent)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL,
+ "unable to convert between src and dest datatypes")
+ else if (!H5T_path_noop(tpath)) {
+ H5T_t *tsrc_cpy = NULL, *tdst_cpy = NULL;
+
+ if (NULL == (tsrc_cpy = H5T_copy(src->shared->parent, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src type for conversion")
+ /* References need to know about the src file */
+ if (tsrc_cpy->shared->type == H5T_REFERENCE)
+ if (H5T_set_loc(tsrc_cpy, src_vl->file_obj, H5T_LOC_MEMORY) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
+
+ if (NULL == (tdst_cpy = H5T_copy(dst->shared->parent, H5T_COPY_ALL)))
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst type for conversion")
+ /* References need to know about the dst file */
+ if (tdst_cpy->shared->type == H5T_REFERENCE)
+ if (H5T_set_loc(tdst_cpy, dst_vl->file_obj, H5T_LOC_MEMORY) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set datatype location");
+
+ if (((tsrc_id = H5I_register(H5I_DATATYPE, tsrc_cpy, FALSE)) < 0) ||
+ ((tdst_id = H5I_register(H5I_DATATYPE, tdst_cpy, FALSE)) < 0))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL,
+ "unable to register types for conversion")
+ } /* end else-if */
+ else
+ noop_conv = TRUE;
+
+ /* Check if we need a temporary buffer for this conversion */
+ if ((parent_is_vlen = H5T_detect_class(dst->shared->parent, H5T_VLEN, FALSE)) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_SYSTEM, FAIL,
+ "internal error when detecting variable-length class")
+ if (tpath->cdata.need_bkg || parent_is_vlen) {
+ /* Set up initial background buffer */
+ tmp_buf_size = MAX(src_base_size, dst_base_size);
+ if (NULL == (tmp_buf = H5FL_BLK_CALLOC(vlen_seq, tmp_buf_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL,
+ "memory allocation failed for type conversion")
+ } /* end if */
- /* Get the allocation info */
- if (H5CX_get_vlen_alloc_info(&vl_alloc_info) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info")
-
- /* Set flags to indicate we are writing to or reading from the file */
- if (dst_vl->file_obj != NULL)
- write_to_file = TRUE;
-
- /* Set the flag for nested VL case */
- if (write_to_file && parent_is_vlen && bkg != NULL)
- nested = TRUE;
-
- /* The outer loop of the type conversion macro, controlling which */
- /* direction the buffer is walked */
- while (nelmts > 0) {
- /* Check if we need to go backwards through the buffer */
- if (d_stride > s_stride) {
- /* Sanity check */
- HDassert(s_stride > 0);
- HDassert(d_stride > 0);
- HDassert(b_stride >= 0);
-
- /* Compute the number of "safe" destination elements at */
- /* the end of the buffer (Those which don't overlap with */
- /* any source elements at the beginning of the buffer) */
- safe =
- nelmts - (((nelmts * (size_t)s_stride) + ((size_t)d_stride - 1)) / (size_t)d_stride);
-
- /* If we're down to the last few elements, just wrap up */
- /* with a "real" reverse copy */
- if (safe < 2) {
- s = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride;
- d = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride;
- b = (uint8_t *)bkg + (nelmts - 1) * (size_t)b_stride;
- s_stride = -s_stride;
- d_stride = -d_stride;
- b_stride = -b_stride;
-
- safe = nelmts;
- } /* end if */
- else {
- s = (uint8_t *)buf + (nelmts - safe) * (size_t)s_stride;
- d = (uint8_t *)buf + (nelmts - safe) * (size_t)d_stride;
- b = (uint8_t *)bkg + (nelmts - safe) * (size_t)b_stride;
- } /* end else */
- } /* end if */
+ /* Get the allocation info */
+ if (H5CX_get_vlen_alloc_info(&vl_alloc_info) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info")
+
+ /* Set flags to indicate we are writing to or reading from the file */
+ if (dst_vl->file_obj != NULL)
+ write_to_file = TRUE;
+
+ /* Set the flag for nested VL case */
+ if (write_to_file && parent_is_vlen && bkg != NULL)
+ nested = TRUE;
+
+ /* The outer loop of the type conversion macro, controlling which */
+ /* direction the buffer is walked */
+ while (nelmts > 0) {
+ /* Check if we need to go backwards through the buffer */
+ if (d_stride > s_stride) {
+ /* Sanity check */
+ HDassert(s_stride > 0);
+ HDassert(d_stride > 0);
+ HDassert(b_stride >= 0);
+
+ /* Compute the number of "safe" destination elements at */
+ /* the end of the buffer (Those which don't overlap with */
+ /* any source elements at the beginning of the buffer) */
+ safe =
+ nelmts - (((nelmts * (size_t)s_stride) + ((size_t)d_stride - 1)) / (size_t)d_stride);
+
+ /* If we're down to the last few elements, just wrap up */
+ /* with a "real" reverse copy */
+ if (safe < 2) {
+ s = (uint8_t *)buf + (nelmts - 1) * (size_t)s_stride;
+ d = (uint8_t *)buf + (nelmts - 1) * (size_t)d_stride;
+ b = (uint8_t *)bkg + (nelmts - 1) * (size_t)b_stride;
+ s_stride = -s_stride;
+ d_stride = -d_stride;
+ b_stride = -b_stride;
+
+ safe = nelmts;
+ } /* end if */
else {
- /* Single forward pass over all data */
- s = d = (uint8_t *)buf;
- b = (uint8_t *)bkg;
- safe = nelmts;
+ s = (uint8_t *)buf + (nelmts - safe) * (size_t)s_stride;
+ d = (uint8_t *)buf + (nelmts - safe) * (size_t)d_stride;
+ b = (uint8_t *)bkg + (nelmts - safe) * (size_t)b_stride;
} /* end else */
+ } /* end if */
+ else {
+ /* Single forward pass over all data */
+ s = d = (uint8_t *)buf;
+ b = (uint8_t *)bkg;
+ safe = nelmts;
+ } /* end else */
- for (elmtno = 0; elmtno < safe; elmtno++) {
- hbool_t is_nil; /* Whether sequence is "nil" */
-
- /* Check for "nil" source sequence */
- if ((*(src_vl->cls->isnull))(src_vl->file_obj, s, &is_nil) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check if VL data is 'nil'")
- else if (is_nil) {
- /* Write "nil" sequence to destination location */
- if ((*(dst_vl->cls->setnull))(dst_vl->file_obj, d, b) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'")
- } /* end else-if */
+ for (elmtno = 0; elmtno < safe; elmtno++) {
+ hbool_t is_nil; /* Whether sequence is "nil" */
+
+ /* Check for "nil" source sequence */
+ if ((*(src_vl->cls->isnull))(src_vl->file_obj, s, &is_nil) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't check if VL data is 'nil'")
+ else if (is_nil) {
+ /* Write "nil" sequence to destination location */
+ if ((*(dst_vl->cls->setnull))(dst_vl->file_obj, d, b) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'")
+ } /* end else-if */
+ else {
+ size_t seq_len; /* The number of elements in the current sequence */
+
+ /* Get length of element sequences */
+ if ((*(src_vl->cls->getlen))(src_vl->file_obj, s, &seq_len) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length")
+
+ /* If we are reading from memory and there is no conversion, just get the pointer to
+ * sequence */
+ if (write_to_file && noop_conv) {
+ /* Get direct pointer to sequence */
+ if (NULL == (conv_buf = (*(src_vl->cls->getptr))(s)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
+ } /* end if */
else {
- size_t seq_len; /* The number of elements in the current sequence */
-
- /* Get length of element sequences */
- if ((*(src_vl->cls->getlen))(src_vl->file_obj, s, &seq_len) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length")
-
- /* If we are reading from memory and there is no conversion, just get the pointer to
- * sequence */
- if (write_to_file && noop_conv) {
- /* Get direct pointer to sequence */
- if (NULL == (conv_buf = (*(src_vl->cls->getptr))(s)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
- } /* end if */
- else {
- size_t src_size, dst_size; /*source & destination total size in bytes*/
+ size_t src_size, dst_size; /*source & destination total size in bytes*/
- src_size = seq_len * src_base_size;
- dst_size = seq_len * dst_base_size;
+ src_size = seq_len * src_base_size;
+ dst_size = seq_len * dst_base_size;
- /* Check if conversion buffer is large enough, resize if
- * necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
- */
- if (!seq_len && !conv_buf) {
- conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE;
- if (NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "memory allocation failed for type conversion")
- } /* end if */
- else if (conv_buf_size < MAX(src_size, dst_size)) {
- /* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
- conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) *
- H5T_VLEN_MIN_CONF_BUF_SIZE;
- if (NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "memory allocation failed for type conversion")
- HDmemset(conv_buf, 0, conv_buf_size);
- } /* end else-if */
-
- /* Read in VL sequence */
- if ((*(src_vl->cls->read))(src_vl->file_obj, s, conv_buf, src_size) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data")
- } /* end else */
-
- if (!noop_conv) {
- /* Check if temporary buffer is large enough, resize if necessary */
- /* (Chain off the conversion buffer size) */
- if (tmp_buf && tmp_buf_size < conv_buf_size) {
- /* Set up initial background buffer */
- tmp_buf_size = conv_buf_size;
- if (NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
- } /* end if */
+ /* Check if conversion buffer is large enough, resize if
+ * necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
+ */
+ if (!seq_len && !conv_buf) {
+ conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE;
+ if (NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for type conversion")
+ } /* end if */
+ else if (conv_buf_size < MAX(src_size, dst_size)) {
+ /* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
+ conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) *
+ H5T_VLEN_MIN_CONF_BUF_SIZE;
+ if (NULL == (conv_buf = H5FL_BLK_REALLOC(vlen_seq, conv_buf, conv_buf_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for type conversion")
+ HDmemset(conv_buf, 0, conv_buf_size);
+ } /* end else-if */
+
+ /* Read in VL sequence */
+ if ((*(src_vl->cls->read))(src_vl->file_obj, s, conv_buf, src_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data")
+ } /* end else */
+
+ if (!noop_conv) {
+ /* Check if temporary buffer is large enough, resize if necessary */
+ /* (Chain off the conversion buffer size) */
+ if (tmp_buf && tmp_buf_size < conv_buf_size) {
+ /* Set up initial background buffer */
+ tmp_buf_size = conv_buf_size;
+ if (NULL == (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
+ } /* end if */
- /* If we are writing and there is a nested VL type, read
- * the sequence into the background buffer */
- if (nested) {
- /* Sanity check */
- HDassert(write_to_file);
-
- /* Get length of background element sequence */
- if ((*(dst_vl->cls->getlen))(dst_vl->file_obj, b, &bg_seq_len) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length")
-
- /* Read sequence if length > 0 */
- if (bg_seq_len > 0) {
- if (tmp_buf_size < (bg_seq_len * MAX(src_base_size, dst_base_size))) {
- tmp_buf_size = (bg_seq_len * MAX(src_base_size, dst_base_size));
- if (NULL ==
- (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
- "memory allocation failed for type conversion")
- HDmemset(tmp_buf, 0, tmp_buf_size);
- } /* end if */
-
- /* Read in background VL sequence */
- if ((*(dst_vl->cls->read))(dst_vl->file_obj, b, tmp_buf, bg_seq_len * dst_base_size) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data")
+ /* If we are writing and there is a nested VL type, read
+ * the sequence into the background buffer */
+ if (nested) {
+ /* Sanity check */
+ HDassert(write_to_file);
+
+ /* Get length of background element sequence */
+ if ((*(dst_vl->cls->getlen))(dst_vl->file_obj, b, &bg_seq_len) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "bad sequence length")
+
+ /* Read sequence if length > 0 */
+ if (bg_seq_len > 0) {
+ if (tmp_buf_size < (bg_seq_len * MAX(src_base_size, dst_base_size))) {
+ tmp_buf_size = (bg_seq_len * MAX(src_base_size, dst_base_size));
+ if (NULL ==
+ (tmp_buf = H5FL_BLK_REALLOC(vlen_seq, tmp_buf, tmp_buf_size)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed for type conversion")
+ HDmemset(tmp_buf, 0, tmp_buf_size);
} /* end if */
- /* If the sequence gets shorter, pad out the original sequence with zeros */
- if (bg_seq_len < seq_len)
- HDmemset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
- (seq_len - bg_seq_len) * dst_base_size);
+ /* Read in background VL sequence */
+ if ((*(dst_vl->cls->read))(dst_vl->file_obj, b, tmp_buf,
+ bg_seq_len * dst_base_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data")
} /* end if */
- /* Convert VL sequence */
- if (H5T_convert(tpath, tsrc_id, tdst_id, seq_len, (size_t)0, (size_t)0, conv_buf,
- tmp_buf) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
+ /* If the sequence gets shorter, pad out the original sequence with zeros */
+ if (bg_seq_len < seq_len)
+ HDmemset((uint8_t *)tmp_buf + dst_base_size * bg_seq_len, 0,
+ (seq_len - bg_seq_len) * dst_base_size);
} /* end if */
- /* Write sequence to destination location */
- if ((*(dst_vl->cls->write))(dst_vl->file_obj, &vl_alloc_info, d, conv_buf, b, seq_len, dst_base_size) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data")
-
- if (!noop_conv) {
- /* For nested VL case, free leftover heap objects from the deeper level if the
- * length of new data elements is shorter than the old data elements.*/
- if (nested && seq_len < bg_seq_len) {
- const uint8_t *tmp;
- size_t u;
-
- /* Sanity check */
- HDassert(write_to_file);
-
- tmp = (uint8_t *)tmp_buf + seq_len * dst_base_size;
- for (u = seq_len; u < bg_seq_len; u++, tmp += dst_base_size) {
- /* Delete sequence in destination location */
- if ((*(dst_vl->cls->del))(dst_vl->file_obj, tmp) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove heap object")
- } /* end for */
- } /* end if */
- } /* end if */
- } /* end else */
-
- /* Advance pointers */
- s += s_stride;
- d += d_stride;
- b += b_stride;
- } /* end for */
+ /* Convert VL sequence */
+ if (H5T_convert(tpath, tsrc_id, tdst_id, seq_len, (size_t)0, (size_t)0, conv_buf,
+ tmp_buf) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
+ } /* end if */
- /* Decrement number of elements left to convert */
- nelmts -= safe;
- } /* end while */
+ /* Write sequence to destination location */
+ if ((*(dst_vl->cls->write))(dst_vl->file_obj, &vl_alloc_info, d, conv_buf, b, seq_len,
+ dst_base_size) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data")
+
+ if (!noop_conv) {
+ /* For nested VL case, free leftover heap objects from the deeper level if the
+ * length of new data elements is shorter than the old data elements.*/
+ if (nested && seq_len < bg_seq_len) {
+ const uint8_t *tmp;
+ size_t u;
+
+ /* Sanity check */
+ HDassert(write_to_file);
+
+ tmp = (uint8_t *)tmp_buf + seq_len * dst_base_size;
+ for (u = seq_len; u < bg_seq_len; u++, tmp += dst_base_size) {
+ /* Delete sequence in destination location */
+ if ((*(dst_vl->cls->del))(dst_vl->file_obj, tmp) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL,
+ "unable to remove heap object")
+ } /* end for */
+ } /* end if */
+ } /* end if */
+ } /* end else */
- /* Release the temporary datatype IDs used */
- if (tsrc_id >= 0)
- H5I_dec_ref(tsrc_id);
- if (tdst_id >= 0)
- H5I_dec_ref(tdst_id);
- } /* end case */
- break;
+ /* Advance pointers */
+ s += s_stride;
+ d += d_stride;
+ b += b_stride;
+ } /* end for */
+
+ /* Decrement number of elements left to convert */
+ nelmts -= safe;
+ } /* end while */
+
+ /* Release the temporary datatype IDs used */
+ if (tsrc_id >= 0)
+ H5I_dec_ref(tsrc_id);
+ if (tdst_id >= 0)
+ H5I_dec_ref(tdst_id);
+ } /* end case */
+ break;
default: /* Some other command we don't know about yet.*/
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command")
@@ -3667,8 +3670,8 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
break;
case H5T_CONV_CONV: {
- H5T_atomic_ref_t *src_ref; /* Source reference type info */
- H5T_atomic_ref_t *dst_ref; /* Destination reference type info */
+ H5T_atomic_ref_t *src_ref; /* Source reference type info */
+ H5T_atomic_ref_t *dst_ref; /* Destination reference type info */
/*
* Conversion.
@@ -3756,11 +3759,13 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
if (is_nil) {
/* Write "nil" reference to destination location */
if ((*(dst_ref->cls->setnull))(dst_ref->file_obj, d, b) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set reference data to 'nil'")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL,
+ "can't set reference data to 'nil'")
} /* end else-if */
else {
/* Get size of references */
- if (0 == (buf_size = src_ref->cls->getsize(src_ref->file_obj, s, src->shared->size, dst_ref->file_obj, &dst_copy)))
+ if (0 == (buf_size = src_ref->cls->getsize(src_ref->file_obj, s, src->shared->size,
+ dst_ref->file_obj, &dst_copy)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference")
/* Check if conversion buffer is large enough, resize if necessary. */
@@ -3776,7 +3781,8 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5MM_memcpy(conv_buf, s, buf_size);
else {
/* Read reference */
- if (src_ref->cls->read(src_ref->file_obj, s, src->shared->size, dst_ref->file_obj, conv_buf, buf_size) < 0)
+ if (src_ref->cls->read(src_ref->file_obj, s, src->shared->size, dst_ref->file_obj,
+ conv_buf, buf_size) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read reference data")
} /* end else */
@@ -3784,7 +3790,8 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
H5MM_memcpy(d, conv_buf, buf_size);
else {
/* Write reference to destination location */
- if (dst_ref->cls->write(src_ref->file_obj, conv_buf, buf_size, src_ref->rtype, dst_ref->file_obj, d, dst->shared->size, b) < 0)
+ if (dst_ref->cls->write(src_ref->file_obj, conv_buf, buf_size, src_ref->rtype,
+ dst_ref->file_obj, d, dst->shared->size, b) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write reference data")
} /* end else */
} /* end else */
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 877aa21..95c5732 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -200,12 +200,12 @@ typedef struct H5T_ref_class_t {
} H5T_ref_class_t;
typedef struct H5T_atomic_ref_t {
- H5R_type_t rtype; /* type of reference stored */
- unsigned version; /* version of encoded reference */
- hbool_t opaque; /* opaque reference type */
- H5T_loc_t loc; /* location of data in buffer */
- H5VL_object_t *file_obj; /* File VOL object (if data is on disk) */
- const H5T_ref_class_t *cls; /* Pointer to ref class callbacks */
+ H5R_type_t rtype; /* type of reference stored */
+ unsigned version; /* version of encoded reference */
+ hbool_t opaque; /* opaque reference type */
+ H5T_loc_t loc; /* location of data in buffer */
+ H5VL_object_t * file_obj; /* File VOL object (if data is on disk) */
+ const H5T_ref_class_t *cls; /* Pointer to ref class callbacks */
} H5T_atomic_ref_t;
typedef struct H5T_atomic_t {
@@ -235,7 +235,7 @@ typedef struct H5T_atomic_t {
H5T_str_t pad; /* space or null padding of extra bytes */
} s; /* string types */
- H5T_atomic_ref_t r; /* Reference type info */
+ H5T_atomic_ref_t r; /* Reference type info */
} u;
} H5T_atomic_t;
@@ -304,13 +304,13 @@ typedef struct H5T_vlen_class_t {
/* A VL datatype */
typedef struct H5T_vlen_t {
- H5T_vlen_type_t type; /* Type of VL data in buffer */
- H5T_loc_t loc; /* Location of VL data in buffer */
- H5T_cset_t cset; /* For VL string: character set */
- H5T_str_t pad; /* For VL string: space or null padding of
- * extra bytes */
- H5VL_object_t *file_obj; /* File VOL object (if VL data is on disk) */
- const H5T_vlen_class_t *cls; /* Pointer to VL class callbacks */
+ H5T_vlen_type_t type; /* Type of VL data in buffer */
+ H5T_loc_t loc; /* Location of VL data in buffer */
+ H5T_cset_t cset; /* For VL string: character set */
+ H5T_str_t pad; /* For VL string: space or null padding of
+ * extra bytes */
+ H5VL_object_t * file_obj; /* File VOL object (if VL data is on disk) */
+ const H5T_vlen_class_t *cls; /* Pointer to VL class callbacks */
} H5T_vlen_t;
/* An opaque datatype */
diff --git a/src/H5Tref.c b/src/H5Tref.c
index 85c62c0..3a6a8c7 100644
--- a/src/H5Tref.c
+++ b/src/H5Tref.c
@@ -77,8 +77,8 @@ static size_t H5T__ref_mem_getsize(H5VL_object_t *src_file_obj, const void *src_
static herr_t H5T__ref_mem_read(H5VL_object_t *src_file_obj, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file_obj, void *dst_buf, size_t dst_size);
static herr_t H5T__ref_mem_write(H5VL_object_t *src_file_obj, const void *src_buf, size_t src_size,
- H5R_type_t src_type, H5VL_object_t *dst_file_obj, void *dst_buf, size_t dst_size,
- void *bg_buf);
+ H5R_type_t src_type, H5VL_object_t *dst_file_obj, void *dst_buf,
+ size_t dst_size, void *bg_buf);
static herr_t H5T__ref_disk_isnull(const H5VL_object_t *src_file_obj, const void *src_buf, hbool_t *isnull);
static herr_t H5T__ref_disk_setnull(H5VL_object_t *dst_file_obj, void *dst_buf, void *bg_buf);
@@ -91,7 +91,8 @@ static herr_t H5T__ref_disk_write(H5VL_object_t *src_file_obj, const void *src_b
size_t dst_size, void *bg_buf);
/* For compatibility */
-static herr_t H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file_obj, const void *src_buf, hbool_t *isnull);
+static herr_t H5T__ref_obj_disk_isnull(const H5VL_object_t *src_file_obj, const void *src_buf,
+ hbool_t *isnull);
static size_t H5T__ref_obj_disk_getsize(H5VL_object_t *src_file_obj, const void *src_buf, size_t src_size,
H5VL_object_t *dst_file_obj, hbool_t *dst_copy);
static herr_t H5T__ref_obj_disk_read(H5VL_object_t *src_file_obj, const void *src_buf, size_t src_size,
@@ -523,8 +524,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file_obj, const void *src_buf, size_t H5_ATTR_UNUSED src_size,
- H5VL_object_t *dst_file_obj, void *dst_buf, size_t dst_size)
+H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file_obj, const void *src_buf,
+ size_t H5_ATTR_UNUSED src_size, H5VL_object_t *dst_file_obj, void *dst_buf, size_t dst_size)
{
H5VL_object_t * vol_obj; /* VOL object for src ref's location */
const H5R_ref_priv_t *src_ref = (const H5R_ref_priv_t *)src_buf;
@@ -1117,7 +1118,8 @@ done:
*/
static herr_t
H5T__ref_obj_disk_read(H5VL_object_t *src_file_obj, const void *src_buf, size_t src_size,
- H5VL_object_t H5_ATTR_UNUSED *dst_file_obj, void *dst_buf, size_t H5_ATTR_UNUSED dst_size)
+ H5VL_object_t H5_ATTR_UNUSED *dst_file_obj, void *dst_buf,
+ size_t H5_ATTR_UNUSED dst_size)
{
H5F_t *src_f;
herr_t ret_value = SUCCEED;
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 068ec3b..ee32bf3 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -74,8 +74,8 @@ static herr_t H5T__vlen_disk_getlen(H5VL_object_t *file_obj, const void *_vl, si
static herr_t H5T__vlen_disk_isnull(const H5VL_object_t *file_obj, void *_vl, hbool_t *isnull);
static herr_t H5T__vlen_disk_setnull(H5VL_object_t *file_obj, void *_vl, void *_bg);
static herr_t H5T__vlen_disk_read(H5VL_object_t *file_obj, void *_vl, void *_buf, size_t len);
-static herr_t H5T__vlen_disk_write(H5VL_object_t *file_obj, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl,
- void *_buf, void *_bg, size_t seq_len, size_t base_size);
+static herr_t H5T__vlen_disk_write(H5VL_object_t *file_obj, const H5T_vlen_alloc_info_t *vl_alloc_info,
+ void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size);
static herr_t H5T__vlen_disk_delete(H5VL_object_t *file_obj, const void *_vl);
/*********************/
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 2352e82..b3611dc 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -72,16 +72,16 @@ typedef herr_t (*H5VL_api_oper_t)(void *ctx);
/* Attribute create "common" callback context data */
typedef struct H5VL_attr_create_ctx_t {
/* DOWN: API routine parameters */
- void *obj;
+ void * obj;
const H5VL_loc_params_t *loc_params;
- H5VL_class_t *cls;
- const char *name;
- hid_t type_id;
- hid_t space_id;
- hid_t acpl_id;
- hid_t aapl_id;
- hid_t dxpl_id;
- void **req;
+ H5VL_class_t * cls;
+ const char * name;
+ hid_t type_id;
+ hid_t space_id;
+ hid_t acpl_id;
+ hid_t aapl_id;
+ hid_t dxpl_id;
+ void ** req;
/* UP: API routine return value */
void *ret_value;
@@ -90,7 +90,7 @@ typedef struct H5VL_attr_create_ctx_t {
/* Attribute open "common" callback context data */
typedef struct H5VL_attr_open_ctx_t {
/* DOWN: API routine parameters */
- void *obj;
+ void * obj;
const H5VL_loc_params_t *loc_params;
H5VL_class_t *cls;
const char *name;
@@ -538,10 +538,10 @@ done:
static herr_t
H5VL__common_api_op(hid_t dxpl_id, H5VL_api_oper_t wrap_op, void *wrap_ctx)
{
- H5P_genplist_t * dxpl_plist = NULL; /* DXPL property list pointer */
- hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
- hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5P_genplist_t *dxpl_plist = NULL; /* DXPL property list pointer */
+ hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
+ hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -555,18 +555,18 @@ H5VL__common_api_op(hid_t dxpl_id, H5VL_api_oper_t wrap_op, void *wrap_ctx)
/* Start a new API context, if requested */
if (new_api_ctx) {
- hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
+ hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
- /* Push the API context */ \
- if (H5CX_push() < 0) \
- HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set API context") \
+ /* Push the API context */
+ if (H5CX_push() < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "can't set API context")
api_pushed = TRUE;
/* Reset 'new API context' flag for next layer down */
if (H5P_set(dxpl_plist, H5D_XFER_PLUGIN_NEW_API_CTX_NAME, &reset_api_ctx) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to set value")
} /* end if */
- } /* end if */
+ } /* end if */
/* Call the corresponding internal common wrapper routine */
if ((*wrap_op)(wrap_ctx) < 0)
@@ -574,14 +574,14 @@ H5VL__common_api_op(hid_t dxpl_id, H5VL_api_oper_t wrap_op, void *wrap_ctx)
done:
/* Pop the API context, if it was pushed */
- if(api_pushed) {
- hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
+ if (api_pushed) {
+ hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
/* Undo change to 'new API context' flag */
if (H5P_set(dxpl_plist, H5D_XFER_PLUGIN_NEW_API_CTX_NAME, &undo_api_ctx) < 0)
HDONE_ERROR(H5E_VOL, H5E_CANTSET, FAIL, "unable to set value")
- (void)H5CX_pop(FALSE); \
+ (void)H5CX_pop(FALSE);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1268,8 +1268,8 @@ done:
static herr_t
H5VL__attr_create_api_op(void *_ctx)
{
- H5VL_attr_create_ctx_t *ctx = (H5VL_attr_create_ctx_t *)_ctx; /* Get pointer to context */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5VL_attr_create_ctx_t *ctx = (H5VL_attr_create_ctx_t *)_ctx; /* Get pointer to context */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1277,8 +1277,9 @@ H5VL__attr_create_api_op(void *_ctx)
HDassert(ctx);
/* Call the corresponding internal VOL routine */
- if (NULL == (ctx->ret_value = H5VL__attr_create(ctx->obj, ctx->loc_params, ctx->cls, ctx->name, ctx->type_id, ctx->space_id, ctx->acpl_id,
- ctx->aapl_id, ctx->dxpl_id, ctx->req)))
+ if (NULL == (ctx->ret_value =
+ H5VL__attr_create(ctx->obj, ctx->loc_params, ctx->cls, ctx->name, ctx->type_id,
+ ctx->space_id, ctx->acpl_id, ctx->aapl_id, ctx->dxpl_id, ctx->req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, FAIL, "unable to create attribute")
done:
@@ -1300,9 +1301,9 @@ H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_
hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id,
void **req /*out*/)
{
- H5VL_attr_create_ctx_t ctx; /* Context for common API wrapper call */
- H5VL_class_t *cls; /* VOL connector's class struct */
- void * ret_value = NULL; /* Return value */
+ H5VL_attr_create_ctx_t ctx; /* Context for common API wrapper call */
+ H5VL_class_t * cls; /* VOL connector's class struct */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_WRAPPER(NULL)
H5TRACE10("*x", "*x*#i*siiiiix", obj, loc_params, connector_id, name, type_id, space_id, acpl_id, aapl_id,
@@ -1315,7 +1316,7 @@ H5VLattr_create(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
/* Set up context */
- ctx.obj = obj;
+ ctx.obj = obj;
ctx.loc_params = loc_params;
ctx.cls = cls;
ctx.name = name;
@@ -1418,8 +1419,8 @@ done:
static herr_t
H5VL__attr_open_api_op(void *_ctx)
{
- H5VL_attr_open_ctx_t *ctx = (H5VL_attr_open_ctx_t *)_ctx; /* Get pointer to context */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5VL_attr_open_ctx_t *ctx = (H5VL_attr_open_ctx_t *)_ctx; /* Get pointer to context */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1427,7 +1428,8 @@ H5VL__attr_open_api_op(void *_ctx)
HDassert(ctx);
/* Call the corresponding internal VOL routine */
- if (NULL == (ctx->ret_value = H5VL__attr_open(ctx->obj, ctx->loc_params, ctx->cls, ctx->name, ctx->aapl_id, ctx->dxpl_id, ctx->req)))
+ if (NULL == (ctx->ret_value = H5VL__attr_open(ctx->obj, ctx->loc_params, ctx->cls, ctx->name,
+ ctx->aapl_id, ctx->dxpl_id, ctx->req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, FAIL, "unable to open attribute")
done:
@@ -1448,9 +1450,9 @@ void *
H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id, const char *name,
hid_t aapl_id, hid_t dxpl_id, void **req /*out*/)
{
- H5VL_attr_open_ctx_t ctx; /* Context for common API wrapper call */
- H5VL_class_t *cls; /* VOL connector's class struct */
- void * ret_value = NULL; /* Return value */
+ H5VL_attr_open_ctx_t ctx; /* Context for common API wrapper call */
+ H5VL_class_t * cls; /* VOL connector's class struct */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_WRAPPER(NULL)
H5TRACE7("*x", "*x*#i*siix", obj, loc_params, connector_id, name, aapl_id, dxpl_id, req);
@@ -1462,7 +1464,7 @@ H5VLattr_open(void *obj, const H5VL_loc_params_t *loc_params, hid_t connector_id
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a VOL connector ID")
/* Set up context */
- ctx.obj = obj;
+ ctx.obj = obj;
ctx.loc_params = loc_params;
ctx.cls = cls;
ctx.name = name;
@@ -4034,16 +4036,15 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
- hid_t dxpl_id, void **req)
+H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req)
{
- H5P_genplist_t * fapl_plist; /* Property list pointer */
- H5VL_class_t *cls; /* VOL class structure for callback info */
- H5VL_object_t *vol_obj = NULL; /* Temporary VOL object for file */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
- void * file = NULL; /* New file created */
- hid_t ret_value = H5I_INVALID_HID; /* Return value */
+ H5P_genplist_t * fapl_plist; /* Property list pointer */
+ H5VL_class_t * cls; /* VOL class structure for callback info */
+ H5VL_object_t * vol_obj = NULL; /* Temporary VOL object for file */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ void * file = NULL; /* New file created */
+ hid_t ret_value = H5I_INVALID_HID; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -4066,7 +4067,8 @@ H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, H5I_INVALID_HID, "file create failed")
/* Create a temporary VOL object for the file struct */
- if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file, connector_prop.connector_id, FALSE)))
+ if (NULL ==
+ (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file, connector_prop.connector_id, FALSE)))
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, H5I_INVALID_HID, "can't create VOL object")
/* Check for 'post open' callback */
@@ -4074,14 +4076,14 @@ H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
if (H5VL__introspect_opt_query(file, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, H5I_INVALID_HID, "can't query optional operation support")
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
- H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
+ H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
+ H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
/* Set up VOL callback arguments */
- file_opt_args.post_open.vol_obj = vol_obj;
+ file_opt_args.post_open.vol_obj = vol_obj;
file_opt_args.post_open.id_exists = TRUE;
- vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
- vol_cb_args.args = &file_opt_args;
+ vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
+ vol_cb_args.args = &file_opt_args;
/* Make the 'post open' callback */
if (H5VL__file_optional(file, cls, &vol_cb_args, dxpl_id, req) < 0)
@@ -4110,14 +4112,14 @@ void *
H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id,
void **req /*out*/)
{
- H5P_genplist_t * fapl_plist = NULL; /* FAPL property list pointer */
- H5P_genplist_t * dxpl_plist = NULL; /* DXPL property list pointer */
- H5VL_object_t *vol_obj = NULL; /* Temporary VOL object for file */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- H5VL_class_t * cls; /* VOL connector's class struct */
- hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
- hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
- void * ret_value = NULL; /* Return value */
+ H5P_genplist_t * fapl_plist = NULL; /* FAPL property list pointer */
+ H5P_genplist_t * dxpl_plist = NULL; /* DXPL property list pointer */
+ H5VL_object_t * vol_obj = NULL; /* Temporary VOL object for file */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ H5VL_class_t * cls; /* VOL connector's class struct */
+ hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
+ hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_WRAPPER(NULL)
H5TRACE6("*x", "*sIuiiix", name, flags, fcpl_id, fapl_id, dxpl_id, req);
@@ -4138,11 +4140,11 @@ H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
/* Start a new API context, if requested */
if (new_api_ctx) {
- hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
+ hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
- /* Push the API context */ \
- if (H5CX_push() < 0) \
- HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set API context") \
+ /* Push the API context */
+ if (H5CX_push() < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set API context")
api_pushed = TRUE;
/* Reset 'new API context' flag for next layer down */
@@ -4153,7 +4155,7 @@ H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
if (H5CX_set_vol_connector_prop(&connector_prop) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL connector info in API context")
} /* end if */
- } /* end if */
+ } /* end if */
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop.connector_id, H5I_VOL)))
@@ -4164,32 +4166,34 @@ H5VLfile_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "unable to create file")
/* Attempt 'post open' callback, for new API contexts */
- if(new_api_ctx) {
- uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ if (new_api_ctx) {
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
/* Check for 'post open' callback */
supported = 0;
- if (H5VL__introspect_opt_query(ret_value, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
+ if (H5VL__introspect_opt_query(ret_value, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN,
+ &supported) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't query optional operation support")
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
- H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
+ H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
+ H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
/* Create a temporary VOL object for the file struct */
- if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, ret_value, connector_prop.connector_id, FALSE)))
+ if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, ret_value,
+ connector_prop.connector_id, FALSE)))
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "can't create VOL object")
/* Set up VOL callback arguments */
- file_opt_args.post_open.vol_obj = vol_obj;
+ file_opt_args.post_open.vol_obj = vol_obj;
file_opt_args.post_open.id_exists = TRUE;
- vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
- vol_cb_args.args = &file_opt_args;
+ vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
+ vol_cb_args.args = &file_opt_args;
/* Make the 'post open' callback */
if (H5VL__file_optional(ret_value, cls, &vol_cb_args, dxpl_id, req) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, NULL, "file optional failed")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Destroy temporary VOL file object */
@@ -4197,14 +4201,14 @@ done:
HDONE_ERROR(H5E_VOL, H5E_CANTRELEASE, NULL, "unable to free VOL object")
/* Pop the API context, if it was pushed */
- if(api_pushed) {
- hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
+ if (api_pushed) {
+ hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
/* Undo change to 'new API context' flag */
if (H5P_set(dxpl_plist, H5D_XFER_PLUGIN_NEW_API_CTX_NAME, &undo_api_ctx) < 0)
HDONE_ERROR(H5E_VOL, H5E_CANTSET, NULL, "unable to set value")
- (void)H5CX_pop(FALSE); \
+ (void)H5CX_pop(FALSE);
} /* end if */
FUNC_LEAVE_API_WRAPPER(ret_value)
@@ -4352,16 +4356,16 @@ done:
*-------------------------------------------------------------------------
*/
H5VL_object_t *
-H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id,
- hid_t dxpl_id, void **req, hid_t *ret_id /*out*/)
+H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req,
+ hid_t *ret_id /*out*/)
{
- H5P_genplist_t * fapl_plist; /* Property list pointer */
- H5VL_class_t *cls; /* VOL class structure for callback info */
- H5VL_object_t *vol_obj = NULL; /* Temporary VOL object for file */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- void * file = NULL; /* File pointer */
- uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
- H5VL_object_t *ret_value = NULL; /* Return value */
+ H5P_genplist_t * fapl_plist; /* Property list pointer */
+ H5VL_class_t * cls; /* VOL class structure for callback info */
+ H5VL_object_t * vol_obj = NULL; /* Temporary VOL object for file */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ void * file = NULL; /* File pointer */
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ H5VL_object_t * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -4422,7 +4426,7 @@ H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id,
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL connector info in API context")
if (NULL == (file = H5VL__file_open(find_connector_ud.cls, name, flags,
- find_connector_ud.fapl_id, dxpl_id, req)))
+ find_connector_ud.fapl_id, dxpl_id, req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL,
"can't open file '%s' with VOL connector '%s'", name,
find_connector_ud.cls->name)
@@ -4435,7 +4439,8 @@ H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id,
} /* end if */
/* Create a VOL object for the file struct */
- if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file, connector_prop.connector_id, FALSE)))
+ if (NULL ==
+ (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, file, connector_prop.connector_id, FALSE)))
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "can't create VOL object")
/* Check for 'post open' callback */
@@ -4443,12 +4448,13 @@ H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id,
if (H5VL__introspect_opt_query(file, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't query optional operation support")
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
- H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
+ H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
+ H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
/* Set up VOL callback arguments */
file_opt_args.post_open.vol_obj = vol_obj;
- file_opt_args.post_open.id_exists = (ret_id != NULL); /* Set the 'id_exists' flag to TRUE when returning an ID */
+ file_opt_args.post_open.id_exists =
+ (ret_id != NULL); /* Set the 'id_exists' flag to TRUE when returning an ID */
vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
vol_cb_args.args = &file_opt_args;
@@ -4459,7 +4465,7 @@ H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id,
/* Check for registering ID for file */
if (ret_id) {
- hid_t file_id; /* File ID for file pointer */
+ hid_t file_id; /* File ID for file pointer */
/* Register ID for VOL object, for future API calls */
if ((file_id = H5I_register(H5I_FILE, vol_obj, TRUE)) < 0)
@@ -4489,14 +4495,14 @@ done:
void *
H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req /*out*/)
{
- H5P_genplist_t * fapl_plist = NULL; /* FAPL property list pointer */
- H5P_genplist_t * dxpl_plist = NULL; /* DXPL property list pointer */
- H5VL_object_t *vol_obj = NULL; /* Temporary VOL object for file */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- H5VL_class_t * cls; /* VOL connector's class struct */
- hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
- hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
- void * ret_value = NULL; /* Return value */
+ H5P_genplist_t * fapl_plist = NULL; /* FAPL property list pointer */
+ H5P_genplist_t * dxpl_plist = NULL; /* DXPL property list pointer */
+ H5VL_object_t * vol_obj = NULL; /* Temporary VOL object for file */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ H5VL_class_t * cls; /* VOL connector's class struct */
+ hbool_t new_api_ctx = FALSE; /* Whether to start a new API context */
+ hbool_t api_pushed = FALSE; /* Indicate that a new API context was pushed */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_API_WRAPPER(NULL)
H5TRACE5("*x", "*sIuiix", name, flags, fapl_id, dxpl_id, req);
@@ -4517,11 +4523,11 @@ H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, vo
/* Start a new API context, if requested */
if (new_api_ctx) {
- hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
+ hbool_t reset_api_ctx = FALSE; /* Flag to reset the 'new API context' */
- /* Push the API context */ \
- if (H5CX_push() < 0) \
- HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set API context") \
+ /* Push the API context */
+ if (H5CX_push() < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set API context")
api_pushed = TRUE;
/* Reset 'new API context' flag for next layer down */
@@ -4532,7 +4538,7 @@ H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, vo
if (H5CX_set_vol_connector_prop(&connector_prop) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "can't set VOL connector info in API context")
} /* end if */
- } /* end if */
+ } /* end if */
/* Get class pointer */
if (NULL == (cls = (H5VL_class_t *)H5I_object_verify(connector_prop.connector_id, H5I_VOL)))
@@ -4543,32 +4549,34 @@ H5VLfile_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, vo
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "unable to open file")
/* Attempt 'post open' callback, for new API contexts */
- if(new_api_ctx) {
- uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ if (new_api_ctx) {
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
/* Check for 'post open' callback */
supported = 0;
- if (H5VL__introspect_opt_query(ret_value, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
+ if (H5VL__introspect_opt_query(ret_value, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN,
+ &supported) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, NULL, "can't query optional operation support")
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
- H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
+ H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
+ H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
/* Create a temporary VOL object for the file struct */
- if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, ret_value, connector_prop.connector_id, FALSE)))
+ if (NULL == (vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, ret_value,
+ connector_prop.connector_id, FALSE)))
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, NULL, "can't create VOL object")
/* Set up VOL callback arguments */
- file_opt_args.post_open.vol_obj = vol_obj;
+ file_opt_args.post_open.vol_obj = vol_obj;
file_opt_args.post_open.id_exists = TRUE;
- vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
- vol_cb_args.args = &file_opt_args;
+ vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
+ vol_cb_args.args = &file_opt_args;
/* Make the 'post open' callback */
if (H5VL__file_optional(ret_value, cls, &vol_cb_args, dxpl_id, req) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, NULL, "file optional failed")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Destroy temporary VOL file object */
@@ -4576,14 +4584,14 @@ done:
HDONE_ERROR(H5E_VOL, H5E_CANTRELEASE, NULL, "unable to free VOL object")
/* Pop the API context, if it was pushed */
- if(api_pushed) {
- hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
+ if (api_pushed) {
+ hbool_t undo_api_ctx = TRUE; /* Flag to reset the 'new API context' */
/* Undo change to 'new API context' flag */
if (H5P_set(dxpl_plist, H5D_XFER_PLUGIN_NEW_API_CTX_NAME, &undo_api_ctx) < 0)
HDONE_ERROR(H5E_VOL, H5E_CANTSET, NULL, "unable to set value")
- (void)H5CX_pop(FALSE); \
+ (void)H5CX_pop(FALSE);
} /* end if */
FUNC_LEAVE_API_WRAPPER(ret_value)
@@ -4730,7 +4738,7 @@ herr_t
H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args, hid_t dxpl_id, void **req)
{
const H5VL_class_t *cls; /* VOL connector's class struct */
- H5VL_object_t *reopen_vol_obj = NULL; /* Temporary VOL object for file */
+ H5VL_object_t * reopen_vol_obj = NULL; /* Temporary VOL object for file */
hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
@@ -4780,8 +4788,8 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
/* Special treatment of file re-open operation */
if (args->op_type == H5VL_FILE_REOPEN) {
- void *reopen_file; /* Pointer to re-opened file */
- uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
+ void * reopen_file; /* Pointer to re-opened file */
+ uint64_t supported; /* Whether 'post open' operation is supported by VOL connector */
/* Get pointer to re-opened file */
reopen_file = *args->args.reopen.file;
@@ -4789,27 +4797,29 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args
/* Check for 'post open' callback */
supported = 0;
- if (H5VL__introspect_opt_query(reopen_file, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN, &supported) < 0)
+ if (H5VL__introspect_opt_query(reopen_file, cls, H5VL_SUBCLS_FILE, H5VL_NATIVE_FILE_POST_OPEN,
+ &supported) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't query optional operation support")
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
- H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
+ H5VL_optional_args_t vol_cb_args; /* Arguments to VOL callback */
+ H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
/* Create a temporary VOL object for the file struct */
- if (NULL == (reopen_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, reopen_file, vol_obj->connector->id, TRUE)))
+ if (NULL == (reopen_vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, reopen_file,
+ vol_obj->connector->id, TRUE)))
HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't create VOL object")
/* Set up VOL callback arguments */
- file_opt_args.post_open.vol_obj = reopen_vol_obj;
+ file_opt_args.post_open.vol_obj = reopen_vol_obj;
file_opt_args.post_open.id_exists = TRUE;
- vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
- vol_cb_args.args = &file_opt_args;
+ vol_cb_args.op_type = H5VL_NATIVE_FILE_POST_OPEN;
+ vol_cb_args.args = &file_opt_args;
/* Make the 'post open' callback */
if (H5VL__file_optional(reopen_file, cls, &vol_cb_args, dxpl_id, req) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed")
} /* end if */
- } /* end if */
+ } /* end if */
done:
/* Destroy temporary VOL file object */
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 5fe2c5a..956dad3 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -917,8 +917,7 @@ done:
*-------------------------------------------------------------------------
*/
H5VL_object_t *
-H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id,
- hbool_t wrap_obj)
+H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool_t wrap_obj)
{
H5VL_class_t * cls = NULL; /* VOL connector class */
H5VL_t * connector = NULL; /* VOL connector struct */
@@ -1100,12 +1099,12 @@ done:
herr_t
H5VL_fapl_is_native(hid_t fapl_id, hbool_t *is_native)
{
- H5P_genplist_t * fapl_plist; /* Property list pointer */
- H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
- H5VL_class_t *cls; /* VOL class structure for callback info */
- const H5VL_class_t *native_cls; /* Native VOL connector class structs */
- int cmp_value; /* Comparison result */
- herr_t ret_value = SUCCEED;
+ H5P_genplist_t * fapl_plist; /* Property list pointer */
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+ H5VL_class_t * cls; /* VOL class structure for callback info */
+ const H5VL_class_t * native_cls; /* Native VOL connector class structs */
+ int cmp_value; /* Comparison result */
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5VLnative.h b/src/H5VLnative.h
index 5a9c1d3..42dc7bd 100644
--- a/src/H5VLnative.h
+++ b/src/H5VLnative.h
@@ -283,8 +283,8 @@ typedef struct H5VL_native_file_set_libver_bounds_t {
/* Parameters for native connector's file 'post open' operation */
typedef struct H5VL_native_file_post_open_t {
- void *vol_obj; /* VOL object for "top" file object */
- hbool_t id_exists; /* Whether an ID (will) exists for this file */
+ void * vol_obj; /* VOL object for "top" file object */
+ hbool_t id_exists; /* Whether an ID (will) exists for this file */
} H5VL_native_file_post_open_t;
/* Parameters for native connector's file 'optional' operations */
diff --git a/src/H5VLprivate.h b/src/H5VLprivate.h
index 6550387..553bed3 100644
--- a/src/H5VLprivate.h
+++ b/src/H5VLprivate.h
@@ -97,13 +97,14 @@ H5_DLL void *H5VL_object_unwrap(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 H5VL_object_t *H5VL_create_object(void *object, H5VL_t *vol_connector);
-H5_DLL H5VL_object_t *H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id, hbool_t wrap_obj);
-H5_DLL size_t H5VL_object_inc_rc(H5VL_object_t *obj);
+H5_DLL H5VL_object_t *H5VL_create_object_using_vol_id(H5I_type_t type, void *obj, hid_t connector_id,
+ hbool_t wrap_obj);
+H5_DLL size_t H5VL_object_inc_rc(H5VL_object_t *obj);
H5_DLL herr_t H5VL_free_object(H5VL_object_t *obj);
H5_DLL herr_t H5VL_fapl_is_native(hid_t fapl_id, hbool_t *is_native);
-H5_DLL herr_t H5VL_object_is_native(const H5VL_object_t *obj, H5VL_get_conn_lvl_t lvl, hbool_t *is_native);
-H5_DLL herr_t H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
- hbool_t *same_file);
+H5_DLL herr_t H5VL_object_is_native(const H5VL_object_t *obj, H5VL_get_conn_lvl_t lvl, hbool_t *is_native);
+H5_DLL herr_t H5VL_file_is_same(const H5VL_object_t *vol_obj1, const H5VL_object_t *vol_obj2,
+ hbool_t *same_file);
/* Functions that wrap / unwrap VOL objects */
H5_DLL herr_t H5VL_get_wrap_ctx(const H5VL_class_t *connector, void *obj, void **wrap_ctx);
@@ -207,10 +208,12 @@ H5_DLL herr_t H5VL_datatype_optional_op(H5VL_object_t *vol_obj, H5VL_optional_ar
H5_DLL herr_t H5VL_datatype_close(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req);
/* File functions */
-H5_DLL hid_t H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
-H5_DLL H5VL_object_t * H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req, hid_t *ret_id);
-H5_DLL herr_t H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_args_t *args, hid_t dxpl_id,
- void **req);
+H5_DLL hid_t H5VL_file_create(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id,
+ void **req);
+H5_DLL H5VL_object_t *H5VL_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id,
+ void **req, hid_t *ret_id);
+H5_DLL herr_t H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_args_t *args, hid_t dxpl_id,
+ void **req);
H5_DLL herr_t H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_args_t *args, hid_t dxpl_id,
void **req);
H5_DLL herr_t H5VL_file_optional(const H5VL_object_t *vol_obj, H5VL_optional_args_t *args, hid_t dxpl_id,
diff --git a/src/H5VLtest.c b/src/H5VLtest.c
index 0769fff..998ec8d 100644
--- a/src/H5VLtest.c
+++ b/src/H5VLtest.c
@@ -97,4 +97,3 @@ H5VL__reparse_def_vol_conn_variable_test(void)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__reparse_def_vol_conn_variable_test() */
-
diff --git a/src/H5private.h b/src/H5private.h
index 4f74d16..c95413d 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -2258,17 +2258,17 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
* H5FDread, etc.), etc.
*
*/
-#define FUNC_ENTER_API_WRAPPER(err) \
+#define FUNC_ENTER_API_WRAPPER(err) \
{ \
{ \
{ \
- hbool_t pushed = FALSE; \
+ hbool_t pushed = FALSE; \
\
FUNC_ENTER_API_COMMON \
H5_PUSH_FUNC \
- /* Push an API context, if there isn't already one */ \
- if (H5CX_test_and_push(&pushed) < 0) \
- HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \
+ /* Push an API context, if there isn't already one */ \
+ if (H5CX_test_and_push(&pushed) < 0) \
+ HGOTO_ERROR(H5E_FUNC, H5E_CANTSET, err, "can't set API context") \
\
BEGIN_MPE_LOG \
{
@@ -2531,10 +2531,10 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props);
} /*end scope from beginning of FUNC_ENTER*/
/* Use this macro to match the FUNC_ENTER_API_WRAPPER macro */
-#define FUNC_LEAVE_API_WRAPPER(ret_value) \
+#define FUNC_LEAVE_API_WRAPPER(ret_value) \
FUNC_LEAVE_API_COMMON(ret_value); \
- if (pushed) \
- (void)H5CX_pop(TRUE); \
+ if (pushed) \
+ (void)H5CX_pop(TRUE); \
H5_POP_FUNC \
if (err_occurred) \
(void)H5E_dump_api_stack(TRUE); \