summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CommonFG.cpp
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-11-01 18:24:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-11-01 18:24:08 (GMT)
commit24f2310b1284c569ea277be00f57248bfd306378 (patch)
treea28e3e8ec585c963f73fc4ed1294f30f940e3a34 /c++/src/H5CommonFG.cpp
parentecaf22fa0450205a508c961b59dbe616d0449b0a (diff)
downloadhdf5-24f2310b1284c569ea277be00f57248bfd306378.zip
hdf5-24f2310b1284c569ea277be00f57248bfd306378.tar.gz
hdf5-24f2310b1284c569ea277be00f57248bfd306378.tar.bz2
[svn-r14229] Description:
Change H5O[gs]et_comment to H5O[gs]et_comment_by_name and re-add simpler forms of H5O[gs]et_comment. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'c++/src/H5CommonFG.cpp')
-rw-r--r--c++/src/H5CommonFG.cpp24
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;