summaryrefslogtreecommitdiffstats
path: root/c++/src/H5Object.cpp
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2018-05-31 17:59:42 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2018-05-31 17:59:42 (GMT)
commit0de74a8dadc505f2669cc5341ff486e0d01c53aa (patch)
tree60a7bde0ea086f8a3750c5e8ce9619e813f59eeb /c++/src/H5Object.cpp
parente8ece625f223032db0d26cfffafc045e4ccdf37d (diff)
parent796dc16e3409b9f3746cfa4127adb6dd334ee8c9 (diff)
downloadhdf5-0de74a8dadc505f2669cc5341ff486e0d01c53aa.zip
hdf5-0de74a8dadc505f2669cc5341ff486e0d01c53aa.tar.gz
hdf5-0de74a8dadc505f2669cc5341ff486e0d01c53aa.tar.bz2
Merge pull request #1039 in HDFFV/hdf5 from ~VCHOI/my_hdf5_fork:develop to develop
* commit '796dc16e3409b9f3746cfa4127adb6dd334ee8c9': (1) Made the change according to the pull request feedback. (2) Removed the performance test form test/th5o.c: will decide on what needs to be done to show speedup via HDFFV-10463. Changes made based on feedback from pull request #1039. Fix for HDFFV-10180 Performance issues with H5Oget_info.
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r--c++/src/H5Object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 5d102d7..b95e222 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -244,7 +244,7 @@ unsigned H5Object::objVersion() const
unsigned version = 0;
// Use C API to get information of the object
- herr_t ret_value = H5Oget_info(getId(), &objinfo);
+ herr_t ret_value = H5Oget_info2(getId(), &objinfo, H5O_INFO_HDR);
// Throw exception if C API returns failure
if (ret_value < 0)
@@ -270,7 +270,7 @@ int H5Object::getNumAttrs() const
{
H5O_info_t oinfo; /* Object info */
- if(H5Oget_info(getId(), &oinfo) < 0)
+ if(H5Oget_info2(getId(), &oinfo, H5O_INFO_NUM_ATTRS) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
return(static_cast<int>(oinfo.num_attrs));