summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2011-07-28 21:29:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2011-07-28 21:29:20 (GMT)
commitf2ac83272f7d85c2509d5cc240e351ca66162a5d (patch)
treedfd5ecadc523563595aef6d0a25ba79e6a4243ce /src/H5D.c
parent0069b4b190cb654706d325487caa91a6ad93dc31 (diff)
downloadhdf5-f2ac83272f7d85c2509d5cc240e351ca66162a5d.zip
hdf5-f2ac83272f7d85c2509d5cc240e351ca66162a5d.tar.gz
hdf5-f2ac83272f7d85c2509d5cc240e351ca66162a5d.tar.bz2
[svn-r21153] Description:
Bring r21152 from trunk to 1.8 branch: Further patches for Jira 7638, to ensure that H5D/Aget_type will be attached to the correct top file. (This change to the library should reverted when Jira 7638 is finally finished) Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode (h5committested on trunk)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5D.c b/src/H5D.c
index e260486..cefdbe5 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -523,6 +523,10 @@ H5Dget_type(hid_t dset_id)
if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+ /* Patch the datatype's "top level" file pointer */
+ if(H5T_patch_file(dset->shared->type, dset->oloc.file) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to patch datatype's file pointer")
+
/* Copy the dataset's datatype */
if(NULL == (dt = H5T_copy(dset->shared->type, H5T_COPY_REOPEN)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype")