diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-13 15:39:05 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2009-07-13 15:39:05 (GMT) |
commit | 75800cf6b5724a7b19fe37017f559fffdcf52d6c (patch) | |
tree | 0c09462bc8969ea3000c663bfdc540be34f54571 /src/H5Oattr.c | |
parent | b50178ea1a00b36e0491e00bbb84dcf0ed862d29 (diff) | |
download | hdf5-75800cf6b5724a7b19fe37017f559fffdcf52d6c.zip hdf5-75800cf6b5724a7b19fe37017f559fffdcf52d6c.tar.gz hdf5-75800cf6b5724a7b19fe37017f559fffdcf52d6c.tar.bz2 |
[svn-r17176] In H5Odtype.c, the decoding function used to mark the datatype as on disk. 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") |