diff options
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/H5CommonFG.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index bcdc3c6..8386e03 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -455,10 +455,10 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const //-------------------------------------------------------------------------- void CommonFG::setComment( const char* name, const char* comment ) const { - herr_t ret_value = H5Oset_comment( getLocId(), name, comment, H5P_DEFAULT ); + herr_t ret_value = H5Oset_comment_by_name( getLocId(), name, comment, H5P_DEFAULT ); if( ret_value < 0 ) { - throwException("setComment", "H5Oset_comment failed"); + throwException("setComment", "H5Oset_comment_by_name failed"); } } @@ -483,10 +483,10 @@ void CommonFG::setComment( const H5std_string& name, const H5std_string& comment //-------------------------------------------------------------------------- void CommonFG::removeComment(const char* name) const { - herr_t ret_value = H5Oset_comment(getLocId(), name, NULL, H5P_DEFAULT); + herr_t ret_value = H5Oset_comment_by_name(getLocId(), name, NULL, H5P_DEFAULT); if( ret_value < 0 ) { - throwException("removeComment", "H5Oset_comment failed"); + throwException("removeComment", "H5Oset_comment_by_name failed"); } } @@ -517,23 +517,23 @@ H5std_string CommonFG::getComment (const H5std_string& name) const // temporary C-string for the object's comment char* comment_C = new char[bufsize+1]; - herr_t ret_value = H5Oget_comment(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT); + herr_t ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT); // if the actual length of the comment is longer than the anticipated - // value, then call H5Oget_comment again with the correct value + // value, then call H5Oget_comment_by_name again with the correct value if (ret_value > bufsize) { bufsize = ret_value; delete []comment_C; comment_C = new char[bufsize+1]; - ret_value = H5Oget_comment(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT); + ret_value = H5Oget_comment_by_name(loc_id, name.c_str(), comment_C, bufsize, H5P_DEFAULT); } - // if H5Oget_comment returns SUCCEED, return the string comment, + // if H5Oget_comment_by_name returns SUCCEED, return the string comment, // otherwise, throw an exception if( ret_value < 0 ) { - throwException("getComment", "H5Oget_comment failed"); + throwException("getComment", "H5Oget_comment_by_name failed"); } H5std_string comment = H5std_string(comment_C); delete []comment_C; @@ -555,12 +555,12 @@ H5std_string CommonFG::getComment( const char* name, size_t bufsize ) const // temporary C-string for the object's comment char* comment_C = new char[bufsize+1]; - herr_t ret_value = H5Oget_comment( getLocId(), name, comment_C, bufsize, H5P_DEFAULT ); + herr_t ret_value = H5Oget_comment_by_name( getLocId(), name, comment_C, bufsize, H5P_DEFAULT ); - // if H5Oget_comment returns SUCCEED, return the string comment + // if H5Oget_comment_by_name returns SUCCEED, return the string comment if( ret_value < 0 ) { - throwException("getComment", "H5Oget_comment failed"); + throwException("getComment", "H5Oget_comment_by_name failed"); } H5std_string comment = H5std_string(comment_C); delete []comment_C; |