summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-18 22:02:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-18 22:02:19 (GMT)
commita5984f59f71739531fb78c3933a726e73dd54328 (patch)
tree839fdd36b93e7976c97b9a351e3937266d1dd7b3 /c++
parentcf56cd041d119914d7a9bee79c22e59a8ce85059 (diff)
downloadhdf5-a5984f59f71739531fb78c3933a726e73dd54328.zip
hdf5-a5984f59f71739531fb78c3933a726e73dd54328.tar.gz
hdf5-a5984f59f71739531fb78c3933a726e73dd54328.tar.bz2
[svn-r14212] Description:
Make H5Tarray_create() and H5Tget_array_dims() versioned, and drop the "perm" parameter from the '2' versions. Shift internal library usage to '2' versions. Add simple regression tests for '1' versions. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5ArrayType.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 49be361..852658b 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -60,11 +60,9 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
// Get the dimensions of the existing array and store it in this array
dimensions = new hsize_t[rank];
//hsize_t rdims2[H5S_MAX_RANK];
- int ret_value = H5Tget_array_dims(id, dimensions, NULL);
+ int ret_value = H5Tget_array_dims2(id, dimensions);
if (ret_value < 0)
- {
- throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims failed");
- }
+ throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
}
//--------------------------------------------------------------------------
@@ -92,11 +90,9 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
{
- hid_t new_type_id = H5Tarray_create(base_type.getId(), ndims, dims, NULL);
+ hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
if (new_type_id < 0)
- {
- throw DataTypeIException("ArrayType constructor", "H5Tarray_create failed");
- }
+ throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
id = new_type_id;
rank = ndims;
dimensions = new hsize_t[rank];
@@ -139,11 +135,9 @@ int ArrayType::getArrayDims(hsize_t* dims)
// if the array's dimensions have not been stored, retrieve them via C API
if (dimensions == NULL)
{
- int ndims = H5Tget_array_dims(id, dims, NULL);
+ int ndims = H5Tget_array_dims2(id, dims);
if (ndims < 0)
- {
- throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims failed");
- }
+ throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
// store the array's info in memory
rank = ndims;
dimensions = new hsize_t[rank];