summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-04 17:36:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-04 17:36:17 (GMT)
commitd4eec753a1de150377773998db4f5035df60b21b (patch)
treeea4e3f2e61ac4c3f4667188f80417fbb0cea7275 /examples
parent3026ace6ae3873486664ef3f744dd803a323fe31 (diff)
downloadhdf5-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 'examples')
-rw-r--r--examples/h5_attribute.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 4f55998..d86bbcd 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -62,7 +62,8 @@ main (void)
float matrix[ADIM1][ADIM2]; /* Attribute data */
herr_t ret; /* Return value */
- unsigned i,j; /* Counters */
+ H5O_info_t oinfo; /* Object info */
+ unsigned i, j; /* Counters */
char string_out[80]; /* Buffer to read string attribute back */
int point_out; /* Buffer to read scalar attribute back */
int num_attr; /* Number of attributes */
@@ -191,8 +192,8 @@ main (void)
/*
* Find string attribute by iterating through all attributes
*/
- num_attr = H5Aget_num_attrs(dataset);
- for(i=0; i < num_attr; i++) {
+ ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT);
+ for(i = 0; i < (unsigned)oinfo.num_attrs; i++) {
attr = H5Aopen_idx(dataset, i);
atype = H5Aget_type(attr);
type_class = H5Tget_class(atype);