diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-01-31 18:01:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-01-31 18:01:33 (GMT) |
commit | 5646fd9b5efb6ae0065bc23f4082295ddd588e58 (patch) | |
tree | 1c41fc138d139fb879363a3951f48f1d89ee6391 /src/H5Tnative.c | |
parent | 6cf56ca817ccba7b8c956cffee208ec624921b12 (diff) | |
download | hdf5-5646fd9b5efb6ae0065bc23f4082295ddd588e58.zip hdf5-5646fd9b5efb6ae0065bc23f4082295ddd588e58.tar.gz hdf5-5646fd9b5efb6ae0065bc23f4082295ddd588e58.tar.bz2 |
[svn-r8137] Purpose:
Bug fix.
Description:
Allow H5Tget_native_type() to handle opaque fields in compound datatypes.
Platforms tested:
FreeBSD 4.9 (sleipnir)
too minor to require h5committest
Diffstat (limited to 'src/H5Tnative.c')
-rw-r--r-- | src/H5Tnative.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 0f272ad..25745d0 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -211,14 +211,21 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig } break; - /* These three types don't need to compute compound field information since they - * can't be used as field. */ + /* These types need to be supported properly still... */ case H5T_TIME: case H5T_BITFIELD: + if((ret_value=H5T_copy(dtype, H5T_COPY_TRANSIENT))==NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + + break; + case H5T_OPAQUE: if((ret_value=H5T_copy(dtype, H5T_COPY_TRANSIENT))==NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + /* Update size, offset and compound alignment for parent. */ + if(H5T_cmp_offset(comp_size, offset, sizeof(char), size, H5T_NATIVE_SCHAR_COMP_ALIGN_g, struct_align)<0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") break; case H5T_REFERENCE: |