summaryrefslogtreecommitdiffstats
path: root/src/H5Aint.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2019-10-09 20:45:26 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2019-10-09 20:45:26 (GMT)
commit984c1bacd93c2f782c75c02d88d6e5c0362c74d0 (patch)
tree97bf7d8b15caee53eb8fdfd84eb09316b54903f1 /src/H5Aint.c
parent19c2eb2800a48d0bd5a8af7757e21cc5cd22fa3c (diff)
parent5d2545ee26d4b7013ed363545705f16a67087549 (diff)
downloadhdf5-984c1bacd93c2f782c75c02d88d6e5c0362c74d0.zip
hdf5-984c1bacd93c2f782c75c02d88d6e5c0362c74d0.tar.gz
hdf5-984c1bacd93c2f782c75c02d88d6e5c0362c74d0.tar.bz2
Merge pull request #1990 in HDFFV/hdf5 from ~JSOUMAGNE/hdf5:references_1_12 to hdf5_1_12
* commit '5d2545ee26d4b7013ed363545705f16a67087549': Fix func enter macro in H5T_ref_reclaim() Update RELEASE.txt for reference changes Fix reference type comparison in h5dump Make wrappers, tests and tools use H5Treclaim() instead of H5Dvlen_reclaim() Add new H5R API that abstracts object, region and attribute reference types Remove ability to loc by ref from H5VL layer Add support for retrieving object name by token Add H5VL_OBJECT_GET_TYPE to get object type Add H5VL_MAX_TOKEN_SIZE and H5VL_token_t Adapt Jerome's "file info" H5VL 'get' query to retrieve container token info. Fix H5VL_blob_get to return size of blob Add 'blob' callbacks to VOL, along with a native implementation to store them in the global heap, and changed the VL datatype conversion code to use blobs.
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r--src/H5Aint.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 94fe97a..f9ae009 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -2269,7 +2269,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
H5MM_memcpy(attr_dst->shared->data, buf, attr_dst->shared->data_size);
- if(H5D_vlen_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
+ if(H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data")
} /* end if */
else {
@@ -2400,17 +2400,9 @@ H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *attr_src,
/* Check for expanding references */
if(cpy_info->expand_ref) {
- size_t ref_count;
- size_t dst_dt_size; /* Destination datatype size */
-
- /* Determine size of the destination datatype */
- if(0 == (dst_dt_size = H5T_get_size(attr_dst->shared->dt)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size")
- /* Determine # of reference elements to copy */
- ref_count = attr_dst->shared->data_size / dst_dt_size;
-
/* Copy objects referenced in source buffer to destination file and set destination elements */
- if(H5O_copy_expand_ref(file_src, attr_dst->shared->data, file_dst, attr_dst->shared->data, ref_count, H5T_get_ref_type(attr_dst->shared->dt), cpy_info) < 0)
+ if(H5O_copy_expand_ref(file_src, H5I_INVALID_HID, attr_src->shared->dt,
+ attr_src->shared->data, attr_src->shared->data_size, file_dst, attr_dst->shared->data, cpy_info) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
} /* end if */
else