summaryrefslogtreecommitdiffstats
path: root/src/H5Tcompound.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-02-08 18:30:29 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-02-08 18:30:29 (GMT)
commit70c0ba03cec20ad3c353fcf776f4b48f2ac8da9f (patch)
tree437db9a19b864616d6888a9d184e8a8e2714630e /src/H5Tcompound.c
parente31f8dfdc830cfc71a84ae36f2f69a0d432576db (diff)
downloadhdf5-70c0ba03cec20ad3c353fcf776f4b48f2ac8da9f.zip
hdf5-70c0ba03cec20ad3c353fcf776f4b48f2ac8da9f.tar.gz
hdf5-70c0ba03cec20ad3c353fcf776f4b48f2ac8da9f.tar.bz2
[svn-r9959] Purpose: Bug fix
Description: For variable-length string, H5Tget_class returned H5T_STRING as its class. But H5Tdetect_class and H5Tget_member_class considered it as H5T_VLEN. This is fixed to let all these 3 functions treat it as H5T_STRING. Some test cases have been added to dtypes.c Platforms tested: heping - already tested for v1.6 with h5committest Misc. update: RELEASE.txt
Diffstat (limited to 'src/H5Tcompound.c')
-rw-r--r--src/H5Tcompound.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index 46b1773..37c79ed 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -170,8 +170,9 @@ H5Tget_member_class(hid_t type_id, unsigned membno)
if (membno >= dt->shared->u.compnd.nmembs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5T_NO_CLASS, "invalid member number")
- /* Value */
- ret_value = dt->shared->u.compnd.memb[membno].type->shared->type;
+ /* Get the type's class. We have to use this function to get type class
+ * because of the concern of variable-length string. */
+ ret_value = H5T_get_class(dt->shared->u.compnd.memb[membno].type, FALSE);
done:
FUNC_LEAVE_API(ret_value)