summaryrefslogtreecommitdiffstats
path: root/src/H5Tcompound.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2009-12-09 17:06:02 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2009-12-09 17:06:02 (GMT)
commit58c8ac33a81b6feed41bab0db6ac3d7dbe98a9be (patch)
treec38aa744dc9a7f268c90fce1d81f97c8d84461d7 /src/H5Tcompound.c
parent94a00c768c32a49100d499e90a83e73d11a3ac12 (diff)
downloadhdf5-58c8ac33a81b6feed41bab0db6ac3d7dbe98a9be.zip
hdf5-58c8ac33a81b6feed41bab0db6ac3d7dbe98a9be.tar.gz
hdf5-58c8ac33a81b6feed41bab0db6ac3d7dbe98a9be.tar.bz2
[svn-r17977] Bug fix for 1584. H5Tdetect_class said a VL string is a string type. But when it's in a
compound type, it says it's a VL type. We want to tell user a VL string is a string. But internally we treat it as a VL type. I added a flag as a parameter of H5T_detect_class. It tells whether the caller is the public function H5Tdetect_class. I also added a detection for VL string in the private function for the compound case (or array or nested VL type). Tested on jam and amani - I tested the same change for 1.8 with h5committest.
Diffstat (limited to 'src/H5Tcompound.c')
-rw-r--r--src/H5Tcompound.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index db7a701b..48192d2 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -403,7 +403,7 @@ H5Tpack(hid_t type_id)
H5TRACE1("e", "i", type_id);
/* Check args */
- if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_detect_class(dt, H5T_COMPOUND) <= 0)
+ if(NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)) || H5T_detect_class(dt, H5T_COMPOUND, TRUE) <= 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a compound datatype")
/* Pack */
@@ -534,7 +534,7 @@ H5T_pack(const H5T_t *dt)
HDassert(dt);
- if(H5T_detect_class(dt, H5T_COMPOUND) > 0) {
+ if(H5T_detect_class(dt, H5T_COMPOUND, FALSE) > 0) {
/* If datatype has been packed, skip packing it and indicate success */
if(TRUE == H5T_is_packed(dt))
HGOTO_DONE(SUCCEED)