diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-13 16:26:24 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-13 16:26:24 (GMT) |
commit | 8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5 (patch) | |
tree | 89b912ff750a20ae63bd8f8d31801f69f7379504 /src/H5Oattr.c | |
parent | 39ad4fae0f60e34d09a4fff4322fb3767eea2e56 (diff) | |
download | hdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.zip hdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.tar.gz hdf5-8a56b4d081a9804f07878f1fe3578f5e2e1b7ef5.tar.bz2 |
[svn-r17177] In H5Odtype.c, the decoding function used to mark the datatype as on disk (see bug
#1585). I changed it to undefined and let the caller functions decide the location
of the datatype. For H5Tdecode, it should mark the datatype as in memory. For other
callers like H5Dopen or H5Aopen, they should makr it as on disk.
Tested it on jam, smirom, linew.
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 1e85c69..c474681 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -633,7 +633,7 @@ H5O_attr_pre_copy_file(H5F_t UNUSED *file_src, const void UNUSED *native_src, *------------------------------------------------------------------------- */ static void * -H5O_attr_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t UNUSED *mesg_type, +H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *mesg_type, void *native_src, H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void UNUSED *udata, hid_t dxpl_id) { @@ -647,6 +647,12 @@ H5O_attr_copy_file(H5F_t UNUSED *file_src, const H5O_msg_class_t UNUSED *mesg_ty HDassert(cpy_info); HDassert(!cpy_info->copy_without_attr); + /* Mark datatype as being on disk now. This step used to be done in a lower level + * by H5O_dtype_decode. But it has been moved up. Not an ideal place, but no better + * place than here. */ + if(H5T_set_loc(((H5A_t *)native_src)->shared->dt, file_src, H5T_LOC_DISK) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location") + if ( NULL == (ret_value=H5A_attr_copy_file((H5A_t *)native_src, file_dst, recompute_size, cpy_info, dxpl_id))) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy attribute") |