diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-12-05 16:42:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-12-05 16:42:40 (GMT) |
commit | 4886a6c447dc445ed34d8c6ea162b57cbbcec72b (patch) | |
tree | df5e3f11b8af2766dcd07418331747c085245afb /c++ | |
parent | a9c747deba6e588b2ec5bc624a53c976a9faa3bc (diff) | |
download | hdf5-4886a6c447dc445ed34d8c6ea162b57cbbcec72b.zip hdf5-4886a6c447dc445ed34d8c6ea162b57cbbcec72b.tar.gz hdf5-4886a6c447dc445ed34d8c6ea162b57cbbcec72b.tar.bz2 |
[svn-r4670] Purpose:
Backward Compatibility Fix
Description:
One of H5P[gs]et_sym_k's parameters changed between v1.4 and the development
branch.
Solution:
Added v1.4 compat stuff around H5P[gs]et_sym_k implementation and testing
to allow v1.4.x users to continue to use their source code without
modification.
These changes are for everything except the FORTRAN wrappers - I spoke with
Elena and she will make the FORTRAN wrapper changes.
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5FcreatProp.cpp | 22 | ||||
-rw-r--r-- | c++/src/H5FcreatProp.h | 9 | ||||
-rw-r--r-- | c++/test/tfile.cpp | 12 |
3 files changed, 43 insertions, 0 deletions
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index 7d6fc62..0e98cfd 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -72,6 +72,27 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con } } +#ifdef H5_WANT_H5_V1_4_COMPAT +void FileCreatPropList::setSymk( int ik, int lk ) const +{ + herr_t ret_value = H5Pset_sym_k( id, ik, lk ); + if( ret_value < 0 ) + { + throw PropListIException("FileCreatPropList::setSymk", + "H5Pset_sym_k failed"); + } +} + +void FileCreatPropList::getSymk( int& ik, int& lk ) const +{ + herr_t ret_value = H5Pget_sym_k( id, &ik, &lk ); + if( ret_value < 0 ) + { + throw PropListIException("FileCreatPropList::getSymk", + "H5Pget_sym_k failed"); + } +} +#else /* H5_WANT_H5_V1_4_COMPAT */ void FileCreatPropList::setSymk( int ik, unsigned lk ) const { herr_t ret_value = H5Pset_sym_k( id, ik, lk ); @@ -91,6 +112,7 @@ void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const "H5Pget_sym_k failed"); } } +#endif /* H5_WANT_H5_V1_4_COMPAT */ void FileCreatPropList::setIstorek( int ik ) const { diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 9dda55c..54b615b 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -33,12 +33,21 @@ class FileCreatPropList : public PropList { // file according to this file creation property list. void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const; +#ifdef H5_WANT_H5_V1_4_COMPAT + // Sets the size of parameters used to control the symbol table nodes. + void setSymk( int int_nodes_k, int leaf_nodes_k ) const; + + // Retrieves the size of the symbol table B-tree 1/2 rank and the + // symbol table leaf node 1/2 size. + void getSymk( int& int_nodes_k, int& leaf_nodes_k ) const; +#else /* H5_WANT_H5_V1_4_COMPAT */ // Sets the size of parameters used to control the symbol table nodes. void setSymk( int int_nodes_k, unsigned leaf_nodes_k ) const; // Retrieves the size of the symbol table B-tree 1/2 rank and the // symbol table leaf node 1/2 size. void getSymk( int& int_nodes_k, unsigned& leaf_nodes_k ) const; +#endif /* H5_WANT_H5_V1_4_COMPAT */ // Sets the size of parameter used to control the B-trees for // indexing chunked datasets. diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index 0bb2a36..9b0f49d 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -135,7 +135,11 @@ test_file_create(void) VERIFY(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes"); int iparm1; /*file-creation parameters */ +#ifdef H5_WANT_H5_V1_4_COMPAT + int iparm2; /*file-creation parameters */ +#else /* H5_WANT_H5_V1_4_COMPAT */ unsigned iparm2; /*file-creation parameters */ +#endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1.getSymk( iparm1, iparm2); VERIFY(iparm1, F1_SYM_INTERN_K, "FileCreatPropList::getSymk"); VERIFY(iparm2, F1_SYM_LEAF_K, "FileCreatPropList::getSymk"); @@ -185,7 +189,11 @@ test_file_create(void) VERIFY(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes"); int iparm1; /*file-creation parameters */ +#ifdef H5_WANT_H5_V1_4_COMPAT + int iparm2; /*file-creation parameters */ +#else /* H5_WANT_H5_V1_4_COMPAT */ unsigned iparm2; /*file-creation parameters */ +#endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1->getSymk( iparm1, iparm2); VERIFY(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk"); VERIFY(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk"); @@ -269,7 +277,11 @@ test_file_open(void) VERIFY(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes"); int iparm1; /*file-creation parameters */ +#ifdef H5_WANT_H5_V1_4_COMPAT + int iparm2; /*file-creation parameters */ +#else /* H5_WANT_H5_V1_4_COMPAT */ unsigned iparm2; /*file-creation parameters */ +#endif /* H5_WANT_H5_V1_4_COMPAT */ tmpl1.getSymk( iparm1, iparm2); VERIFY(iparm1, F2_SYM_INTERN_K, "FileCreatPropList::getSymk"); VERIFY(iparm2, F2_SYM_LEAF_K, "FileCreatPropList::getSymk"); |