diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-11-02 20:14:08 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-11-02 20:14:08 (GMT) |
commit | 315eb0a1687071ca5c09e46efd88073bea118348 (patch) | |
tree | 8b2edd984ff2520a832347675ac175beb3bed393 /tools/lib/h5diff_array.c | |
parent | a9ca88d1564351db7ca9371eeede12473b26a6a6 (diff) | |
download | hdf5-315eb0a1687071ca5c09e46efd88073bea118348.zip hdf5-315eb0a1687071ca5c09e46efd88073bea118348.tar.gz hdf5-315eb0a1687071ca5c09e46efd88073bea118348.tar.bz2 |
[svn-r19715] Description:
Bring r19697:19714 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Diffstat (limited to 'tools/lib/h5diff_array.c')
-rw-r--r-- | tools/lib/h5diff_array.c | 106 |
1 files changed, 76 insertions, 30 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index dc3c9fb..6005ed8 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -447,21 +447,43 @@ hsize_t diff_datum(void *_mem1, { offset = H5Tget_member_offset(m_type, (unsigned)j); memb_type = H5Tget_member_type(m_type, (unsigned)j); - nfound+=diff_datum( - mem1+offset, - mem2+offset, - memb_type, - i, - rank, - dims, - acc, - pos, - options, - obj1, - obj2, - container1_id, - container2_id, - ph); + /* if member type is vlen string */ + if(H5Tis_variable_str(memb_type)) + { + nfound+=diff_datum( + ((unsigned char**)mem1)[j], + ((unsigned char**)mem2)[j], + memb_type, + i, + rank, + dims, + acc, + pos, + options, + obj1, + obj2, + container1_id, + container2_id, + ph); + } + else + { + nfound+=diff_datum( + mem1+offset, + mem2+offset, + memb_type, + i, + rank, + dims, + acc, + pos, + options, + obj1, + obj2, + container1_id, + container2_id, + ph); + } H5Tclose(memb_type); } break; @@ -631,21 +653,45 @@ hsize_t diff_datum(void *_mem1, for (u = 0, nelmts = 1; u <ndims; u++) nelmts *= adims[u]; for (u = 0; u < nelmts; u++) - nfound+=diff_datum( - mem1 + u * size, - mem2 + u * size, /* offset */ - memb_type, - i, /* index position */ - rank, - dims, - acc, - pos, - options, - obj1, - obj2, - container1_id, - container2_id, - ph); + { + /* if member type is vlen string */ + if(H5Tis_variable_str(memb_type)) + { + nfound+=diff_datum( + ((unsigned char**)mem1)[u], + ((unsigned char**)mem2)[u], + memb_type, + i, /* index position */ + rank, + dims, + acc, + pos, + options, + obj1, + obj2, + container1_id, + container2_id, + ph); + } + else + { + nfound+=diff_datum( + mem1 + u * size, + mem2 + u * size, /* offset */ + memb_type, + i, /* index position */ + rank, + dims, + acc, + pos, + options, + obj1, + obj2, + container1_id, + container2_id, + ph); + } + } H5Tclose(memb_type); } break; |