summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-31 18:01:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-31 18:01:35 (GMT)
commit6e0a562d253f74409c4de66eb04c00e0efd0a065 (patch)
treeb7b2d0e3c11630aad9c0a522397acb54e0ca23aa /src
parent34b2fedf24ce57d0a5b1634060db1ca29a87d8b4 (diff)
downloadhdf5-6e0a562d253f74409c4de66eb04c00e0efd0a065.zip
hdf5-6e0a562d253f74409c4de66eb04c00e0efd0a065.tar.gz
hdf5-6e0a562d253f74409c4de66eb04c00e0efd0a065.tar.bz2
[svn-r8138] 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')
-rw-r--r--src/H5Tnative.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 957a7a1..d7abd7c 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -209,15 +209,23 @@ 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");
+ 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:
{
size_t align;