diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-04 17:36:17 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-04 17:36:17 (GMT) |
commit | d4eec753a1de150377773998db4f5035df60b21b (patch) | |
tree | ea4e3f2e61ac4c3f4667188f80417fbb0cea7275 /c++ | |
parent | 3026ace6ae3873486664ef3f744dd803a323fe31 (diff) | |
download | hdf5-d4eec753a1de150377773998db4f5035df60b21b.zip hdf5-d4eec753a1de150377773998db4f5035df60b21b.tar.gz hdf5-d4eec753a1de150377773998db4f5035df60b21b.tar.bz2 |
[svn-r14183] Description:
Move H5Aget_num_attrs() into deprecated routines section, replacing all
internal usage with H5Oget_info().
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
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5Object.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 494ee2c..b3b2982 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -235,14 +235,12 @@ int H5Object::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_da //-------------------------------------------------------------------------- int H5Object::getNumAttrs() const { - int num_attrs = H5Aget_num_attrs( id ); - if( num_attrs < 0 ) - { - throw AttributeIException(inMemFunc("getNumAttrs"), - "H5Aget_num_attrs failed - returned negative number of attributes"); - } + H5O_info_t oinfo; /* Object info */ + + if(H5Oget_info(id, ".", &oinfo, H5P_DEFAULT) < 0) + throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed"); else - return( num_attrs ); + return( (int)oinfo.num_attrs ); } //-------------------------------------------------------------------------- |