summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-09-13 17:04:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-09-13 17:04:36 (GMT)
commit095762a736c3125c0190409b7c3ca01c42605ad7 (patch)
tree9dea87bb7845bafb44a9df81ef09ce560807d269 /c++/src
parent579284f422b6ed25b7a5f4a518c19740fff297c8 (diff)
downloadhdf5-095762a736c3125c0190409b7c3ca01c42605ad7.zip
hdf5-095762a736c3125c0190409b7c3ca01c42605ad7.tar.gz
hdf5-095762a736c3125c0190409b7c3ca01c42605ad7.tar.bz2
[svn-r14145] Description:
Move H5Gget_objname_by_idx() to deprecated symbols section. Replace internal usage with H5Lget_name_by_idx(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 2.10 (linew) Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5CommonFG.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index b76d8b0..af684d0 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -1010,16 +1010,16 @@ hsize_t CommonFG::getNumObjs() const
//--------------------------------------------------------------------------
H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
{
- // call H5Gget_objname_by_idx with name as NULL to get its length
- ssize_t name_len = H5Gget_objname_by_idx(getLocId(), idx, NULL, 0);
+ // call H5Lget_name_by_idx with name as NULL to get its length
+ ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, NULL, 0, H5P_DEFAULT);
if(name_len < 0)
{
- throwException("getObjnameByIdx", "H5Gget_objname_by_idx failed");
+ throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
// now, allocate C buffer to get the name
char* name_C = new char[name_len+1];
- name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, name_len+1);
+ name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len+1, H5P_DEFAULT);
// clean up and return the string
H5std_string name = H5std_string(name_C);
@@ -1047,10 +1047,10 @@ H5std_string CommonFG::getObjnameByIdx(hsize_t idx) const
ssize_t CommonFG::getObjnameByIdx(hsize_t idx, H5std_string& name, size_t size) const
{
char* name_C = new char[size];
- ssize_t name_len = H5Gget_objname_by_idx(getLocId(), idx, name_C, size);
+ ssize_t name_len = H5Lget_name_by_idx(getLocId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, size, H5P_DEFAULT);
if(name_len < 0)
{
- throwException("getObjnameByIdx", "H5Gget_objname_by_idx failed");
+ throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
}
name = H5std_string(name_C);
delete []name_C;