diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2005-07-25 03:37:21 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2005-07-25 03:37:21 (GMT) |
commit | fab172d704065dba31fbf34d3fe7e56c3e63fe36 (patch) | |
tree | 59a35e3b906d509134ed4d581e134054359e999e /c++/src/H5CommonFG.cpp | |
parent | f208550696646adcc6e59e339745b0433e28f770 (diff) | |
download | hdf5-fab172d704065dba31fbf34d3fe7e56c3e63fe36.zip hdf5-fab172d704065dba31fbf34d3fe7e56c3e63fe36.tar.gz hdf5-fab172d704065dba31fbf34d3fe7e56c3e63fe36.tar.bz2 |
[svn-r11151] Purpose: Fix bugzilla #407 and #408
Description:
PropList::copyProp has incorrect prototype; although it works,
it does cause users inconvenience.
Solution:
Added another overloaded function with correct prototype. The
old version will be removed in a future release. In the meantime,
"Obsolete" will be displayed in its RM page.
Also, changed several checks on the returned value of a C API from
non-positive to negative because id = 0 is no longer significant,
now that the C++ reference counting had been removed.
Platforms tested:
Linux 2.4 (heping)
IRIX64 with -n32 (modi4)
Linux 2.4 w/PGI (colonelk)
Diffstat (limited to 'c++/src/H5CommonFG.cpp')
-rw-r--r-- | c++/src/H5CommonFG.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 40558c1..9660096 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -71,7 +71,7 @@ Group CommonFG::createGroup( const char* name, size_t size_hint ) const hid_t group_id = H5Gcreate( getLocId(), name, size_hint ); // If the creation of the group failed, throw an exception - if( group_id <= 0 ) + if( group_id < 0 ) { throwException("createGroup", "H5Gcreate failed"); } @@ -109,7 +109,7 @@ Group CommonFG::openGroup( const char* name ) const hid_t group_id = H5Gopen( getLocId(), name ); // If the opening of the group failed, throw an exception - if( group_id <= 0 ) + if( group_id < 0 ) { throwException("openGroup", "H5Gopen failed"); } @@ -153,7 +153,7 @@ DataSet CommonFG::createDataSet( const char* name, const DataType& data_type, co hid_t dataset_id = H5Dcreate( getLocId(), name, type_id, space_id, create_plist_id ); // If the creation of the dataset failed, throw an exception - if( dataset_id <= 0 ) + if( dataset_id < 0 ) { throwException("createDataSet", "H5Dcreate failed"); } @@ -190,7 +190,7 @@ DataSet CommonFG::openDataSet( const char* name ) const hid_t dataset_id = H5Dopen( getLocId(), name ); // If the dataset's opening failed, throw an exception - if( dataset_id <= 0 ) + if( dataset_id < 0 ) { throwException("openDataSet", "H5Dopen failed"); } @@ -598,7 +598,7 @@ hid_t CommonFG::p_open_data_type( const char* name ) const hid_t datatype_id = H5Topen( getLocId(), name ); // If the datatype's opening failed, throw an exception - if( datatype_id <= 0 ) + if( datatype_id < 0 ) { throwException("openDataType", "H5Topen failed"); } |