[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)
This commit is contained in:
Binh-Minh Ribler
2005-07-24 22:37:21 -05:00
parent f208550696
commit fab172d704
14 changed files with 65 additions and 28 deletions

View File

@@ -73,7 +73,7 @@ DataSpace DataSet::getSpace() const
hid_t dataspace_id = H5Dget_space( id );
// If the dataspace id is invalid, throw an exception
if( dataspace_id <= 0 )
if( dataspace_id < 0 )
{
throw DataSetIException("DataSet::getSpace", "H5Dget_space failed");
}
@@ -106,7 +106,7 @@ hid_t DataSet::p_get_type() const
DSetCreatPropList DataSet::getCreatePlist() const
{
hid_t create_plist_id = H5Dget_create_plist( id );
if( create_plist_id <= 0 )
if( create_plist_id < 0 )
{
throw DataSetIException("DataSet::getCreatePlist", "H5Dget_create_plist failed");
}