summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-07-16 16:15:43 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 20:19:21 (GMT)
commitdabdcf95593aa97185c83006f35a0849ea012450 (patch)
treed8e20aa27fb16271e9ef355694475ca2c4437ff5 /src/H5Dint.c
parente9570c198b7950dd7459cd005068d772b33c7fd4 (diff)
downloadhdf5-dabdcf95593aa97185c83006f35a0849ea012450.zip
hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.gz
hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.bz2
Add new H5R API that abstracts object, region and attribute reference types
Also support references to external files Add new H5T_REF type and type conversion routines Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF Add H5Treclaim() API to reclaim memory of vlen/reference types Deprecate H5Dvlen_reclaim() Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback Add H5T_ref_reclaim() Move previous H5R APIs to H5Rdeprec.c Clean up H5Ocopy Separate H5O_copy_expand_ref() to H5Ocopy_ref() Add support for copying new reference types Clean up deprecated routines to go through VOL and same code path Fix return codes in existing trefer.c test Rename trefer.c to trefer_deprec.c trefer.c is for new references Add performance test for trefer Add additional obj_copy_ref test Make use of tokens and blobs to store references Skip blob encoding for object references Start adding new reference examples
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index ada542e..772a150 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -547,7 +547,7 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
/* To use at least v18 format versions or not */
use_at_least_v18 = (H5F_LOW_BOUND(file) >= H5F_LIBVER_V18);
- /* Copy the datatype if it's a custom datatype or if it'll change when it's location is changed */
+ /* Copy the datatype if it's a custom datatype or if it'll change when its location is changed */
if(!immutable || relocatable || use_at_least_v18) {
/* Copy datatype for dataset */
if((dset->shared->type = H5T_copy(type, H5T_COPY_ALL)) == NULL)
@@ -2542,50 +2542,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_vlen_reclaim
- *
- * Purpose: Frees the buffers allocated for storing variable-length data
- * in memory. Only frees the VL data in the selection defined in the
- * dataspace.
- *
- * Return: Non-negative on success, negative on failure
- *-------------------------------------------------------------------------
- */
-herr_t
-H5D_vlen_reclaim(hid_t type_id, H5S_t *space, void *buf)
-{
- H5T_t *type; /* Datatype */
- H5S_sel_iter_op_t dset_op; /* Operator for iteration */
- H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */
- herr_t ret_value = FAIL; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- /* Check args */
- HDassert(H5I_DATATYPE == H5I_get_type(type_id));
- HDassert(space);
- HDassert(buf);
-
- if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
-
- /* 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")
-
- /* Call H5S_select_iterate with args, etc. */
- dset_op.op_type = H5S_SEL_ITER_OP_APP;
- dset_op.u.app_op.op = H5T_vlen_reclaim;
- dset_op.u.app_op.type_id = type_id;
-
- ret_value = H5S_select_iterate(buf, type, space, &dset_op, &vl_alloc_info);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_vlen_reclaim() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5D__vlen_get_buf_size_alloc
*
* Purpose: This routine makes certain there is enough space in the temporary