diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-10-02 04:05:38 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2014-10-02 04:05:38 (GMT) |
commit | 9c9326c7debc3b4f32602ec21cc67cfccafa6fc0 (patch) | |
tree | 5860b1568bae4fb51cd4051191e48a729e368cbc /c++/src/H5IdComponent.cpp | |
parent | 40c17513405c1056c90b7324a954df2a217efd65 (diff) | |
download | hdf5-9c9326c7debc3b4f32602ec21cc67cfccafa6fc0.zip hdf5-9c9326c7debc3b4f32602ec21cc67cfccafa6fc0.tar.gz hdf5-9c9326c7debc3b4f32602ec21cc67cfccafa6fc0.tar.bz2 |
[svn-r25653] Purpose: Fixed HDFFV-4259
Description:
- Used H5I_INVALID_HID instead of 0 to initialized member "id" in classes
that represent HDF5 objects. For PropList, H5P_DEFAULT has to be used
instead of H5I_INVALID_HID.
- Added try/catch block to some dynamically allocating memory code and
re-throw the bad_alloc exception with a message informing the location of
the failure.
(merged from trunk-r25640)
Purpose: Fixed HDFFV-8852
Description:
H5F_ACC_CREAT was included in the C++ API while the C library doesn't
allow it yet. Possibly, in the future, but not now. In addition, the
two flags H5F_ACC_RDONLY and H5F_ACC_RDWR were missing from the
documentation, causing confusion that appending is not supported.
Solution:
- Removed H5F_ACC_CREAT from the function until the C library support it
- Added H5F_ACC_RDONLY and H5F_ACC_RDWR to the comments to update the
documentation
(merged from trunk-r25632)
Platforms tested:
Linux/ppc64 (ostrich)
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
Diffstat (limited to 'c++/src/H5IdComponent.cpp')
-rw-r--r-- | c++/src/H5IdComponent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 99a8dc4..64297ee 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -145,7 +145,7 @@ int IdComponent::getCounter() const //-------------------------------------------------------------------------- H5I_type_t IdComponent::getHDFObjType(const hid_t obj_id) { - if (obj_id == 0) + if (obj_id <= 0) return H5I_BADID; // invalid H5I_type_t id_type = H5Iget_type(obj_id); if (id_type <= H5I_BADID || id_type >= H5I_NTYPES) @@ -339,7 +339,7 @@ H5std_string IdComponent::p_get_file_name() const //-------------------------------------------------------------------------- bool IdComponent::p_valid_id(const hid_t obj_id) { - if (obj_id == 0) + if (obj_id <= 0) return false; H5I_type_t id_type = H5Iget_type(obj_id); |