diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-09-29 20:18:22 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-09-29 20:18:22 (GMT) |
commit | 89404acc45281bef751d1073ce5cf82b5d1db4d1 (patch) | |
tree | bc8f2e920f36efbec3f7b5d57349c4cb034cdec6 /hl/src/H5DS.c | |
parent | 0ead3e88734ad130c3991947a7b51cd1d5c37102 (diff) | |
download | hdf5-89404acc45281bef751d1073ce5cf82b5d1db4d1.zip hdf5-89404acc45281bef751d1073ce5cf82b5d1db4d1.tar.gz hdf5-89404acc45281bef751d1073ce5cf82b5d1db4d1.tar.bz2 |
[svn-r17554] Fix for Bug 1562. H5DSis_attached needed to account for platform dependent types. Added test and test files for LE and BE dimension scales. Reworked part of test_ds file as part of debug.
Added missing H5Tclose in region reference routines.
Tested: local linux, smirom, linew
Diffstat (limited to 'hl/src/H5DS.c')
-rw-r--r-- | hl/src/H5DS.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 8e697f1..f75e926 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -1024,6 +1024,7 @@ htri_t H5DSis_attached(hid_t did, hssize_t nelmts; hid_t sid; /* space ID */ hid_t tid = -1; /* attribute type ID */ + hid_t ntid = -1; /* attribute native type ID */ hid_t aid = -1; /* attribute ID */ int rank; /* rank of dataset */ ds_list_t *dsbuf; /* array of attribute data in the DS pointing to the dataset */ @@ -1187,7 +1188,10 @@ htri_t H5DSis_attached(hid_t did, if((tid = H5Aget_type(aid)) < 0) goto out; - + + if((ntid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0) + goto out; + /* get and save the old reference(s) */ if((sid = H5Aget_space(aid)) < 0) goto out; @@ -1200,7 +1204,7 @@ htri_t H5DSis_attached(hid_t did, if (dsbuf == NULL) goto out; - if (H5Aread(aid,tid,dsbuf) < 0) + if (H5Aread(aid,ntid,dsbuf) < 0) goto out; /*------------------------------------------------------------------------- @@ -1242,6 +1246,8 @@ htri_t H5DSis_attached(hid_t did, /* close */ if (H5Sclose(sid) < 0) goto out; + if (H5Tclose(ntid) < 0) + goto out; if (H5Tclose(tid) < 0) goto out; if (H5Aclose(aid) < 0) |