diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2010-08-19 15:27:56 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2010-08-19 15:27:56 (GMT) |
commit | e56b6f6c4019ad7dddf2325c91b134646fcb55e6 (patch) | |
tree | f18d1e2dbe3005e3359cf2eefd02c2d69b201213 /test/dsets.c | |
parent | ee251b8395c98300e2c3b43fbddc7fe4461e6086 (diff) | |
download | hdf5-e56b6f6c4019ad7dddf2325c91b134646fcb55e6.zip hdf5-e56b6f6c4019ad7dddf2325c91b134646fcb55e6.tar.gz hdf5-e56b6f6c4019ad7dddf2325c91b134646fcb55e6.tar.bz2 |
[svn-r19251] New feature(bug #1934): I made H5Tset_order support all data types with some restictions:
1. For enum type, members shouldn't be defined yet.
2. H5T_ORDER_NONE only works for reference and fixed-length
string.
3. For opaque type, the order will be ignored.
4. For compound type, all restrictions above apply to the
members.
I'll change H5Tget_order and do another commit.
There is no change to configure.in, config, and Makefile.am. There is some property change for
these files when I did a merge from 1.8.
Tested on jam. But I tested the 1.8 on heiwa, and amani.
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/dsets.c b/test/dsets.c index 1b66dfd..f424a57 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -3253,11 +3253,6 @@ test_nbit_compound(hid_t file) if(H5Tinsert(mem_cmpd_tid, "s", HOFFSET(atomic, s), s_tid) < 0) goto error; if(H5Tinsert(mem_cmpd_tid, "f", HOFFSET(atomic, f), H5T_NATIVE_FLOAT) < 0) goto error; - /* Set order of dataset compound member datatype */ - if(H5Tset_order(i_tid, H5T_ORDER_BE) < 0) goto error; - if(H5Tset_order(c_tid, H5T_ORDER_BE) < 0) goto error; - if(H5Tset_order(s_tid, H5T_ORDER_BE) < 0) goto error; - /* Create a dataset compound datatype and insert some atomic types */ cmpd_tid = H5Tcreate(H5T_COMPOUND, sizeof(atomic)); if(H5Tinsert(cmpd_tid, "i", HOFFSET(atomic, i), i_tid) < 0) goto error; @@ -3265,6 +3260,9 @@ test_nbit_compound(hid_t file) if(H5Tinsert(cmpd_tid, "s", HOFFSET(atomic, s), s_tid) < 0) goto error; if(H5Tinsert(cmpd_tid, "f", HOFFSET(atomic, f), f_tid) < 0) goto error; + /* Set order of dataset compound datatype */ + if(H5Tset_order(cmpd_tid, H5T_ORDER_BE) < 0) goto error; + /* Create the data space */ if((space = H5Screate_simple(2, size, NULL)) < 0) goto error; @@ -3469,11 +3467,6 @@ test_nbit_compound_2(hid_t file) if(H5Tinsert(mem_cmpd_tid1, "s", HOFFSET(atomic, s), s_tid) < 0) goto error; if(H5Tinsert(mem_cmpd_tid1, "f", HOFFSET(atomic, f), H5T_NATIVE_FLOAT) < 0) goto error; - /* Set order of dataset atomic compound member datatype */ - if(H5Tset_order(i_tid, H5T_ORDER_BE) < 0) goto error; - if(H5Tset_order(c_tid, H5T_ORDER_BE) < 0) goto error; - if(H5Tset_order(s_tid, H5T_ORDER_BE) < 0) goto error; - /* Create a dataset atomic compound datatype and insert some atomic types */ cmpd_tid1 = H5Tcreate(H5T_COMPOUND, sizeof(atomic)); if(H5Tinsert(cmpd_tid1, "i", HOFFSET(atomic, i), i_tid) < 0) goto error; @@ -3481,6 +3474,9 @@ test_nbit_compound_2(hid_t file) if(H5Tinsert(cmpd_tid1, "s", HOFFSET(atomic, s), s_tid) < 0) goto error; if(H5Tinsert(cmpd_tid1, "f", HOFFSET(atomic, f), f_tid) < 0) goto error; + /* Set order of dataset compound datatype */ + if(H5Tset_order(cmpd_tid1, H5T_ORDER_BE) < 0) goto error; + /* Set precision and offset of the other data member */ if(H5Tset_precision(v_tid,precision[3]) < 0) goto error; if(H5Tset_offset(v_tid,offset[3]) < 0) goto error; |