diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-24 19:10:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-24 19:10:00 (GMT) |
commit | 492e5ca2b48782bb4759ee1d0a59b0210f011528 (patch) | |
tree | f2c334cd5e2afb9ca40492340efe57d1f3af1ae6 /src/H5Tarray.c | |
parent | 05973a4e8610a7f6893d0eaed9c3eee3b008ba60 (diff) | |
download | hdf5-492e5ca2b48782bb4759ee1d0a59b0210f011528.zip hdf5-492e5ca2b48782bb4759ee1d0a59b0210f011528.tar.gz hdf5-492e5ca2b48782bb4759ee1d0a59b0210f011528.tar.bz2 |
[svn-r14004] Description:
Fix problem with datatype messages where the version of the format
for a datatype message could depend on the "use the latest format" flag from
the file after it was initially created.
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'src/H5Tarray.c')
-rw-r--r-- | src/H5Tarray.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Tarray.c b/src/H5Tarray.c index 05b8dc4..cef8f66 100644 --- a/src/H5Tarray.c +++ b/src/H5Tarray.c @@ -158,12 +158,13 @@ H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]) /* Set the array's size (number of elements * element datatype's size) */ ret_value->shared->size = ret_value->shared->parent->shared->size * ret_value->shared->u.array.nelem; - /* - * Set the "force conversion" flag if the base datatype indicates - */ + /* Set the "force conversion" flag if the base datatype indicates */ if(base->shared->force_conv == TRUE) ret_value->shared->force_conv = TRUE; + /* Array datatypes need a later version of the datatype object header message */ + ret_value->shared->version = MAX(base->shared->version, H5O_DTYPE_VERSION_2); + done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_array_create */ @@ -220,7 +221,7 @@ done: *------------------------------------------------------------------------- */ int -H5T_get_array_ndims(H5T_t *dt) +H5T_get_array_ndims(const H5T_t *dt) { FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_get_array_ndims) @@ -283,7 +284,7 @@ done: *------------------------------------------------------------------------- */ int -H5T_get_array_dims(H5T_t *dt, hsize_t dims[]) +H5T_get_array_dims(const H5T_t *dt, hsize_t dims[]) { unsigned u; /* Local index variable */ int ret_value; /* return value */ |