summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Af.c
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 /fortran/src/H5Af.c
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 'fortran/src/H5Af.c')
-rw-r--r--fortran/src/H5Af.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 6b49624..8253781 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -924,7 +924,7 @@ done:
/*----------------------------------------------------------------------------
* Name: h5aget_num_attrs_c
- * Purpose: Call H5Aget_num_attrs to determine number of
+ * Purpose: Call H5Oget_info to determine number of
* attributes of an object
* Inputs: obj_id - object identifier
* attr_num - number of attributes
@@ -936,13 +936,17 @@ done:
int_f
nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
{
- int_f ret_value=0; /* Return value */
+ H5O_info_t oinfo; /* Object info */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Aget_num_attrs function.
- */
- if ((*attr_num = (int_f)H5Aget_num_attrs((hid_t)*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oget_info function.
+ */
+ if(H5Oget_info((hid_t)*obj_id, ".", &oinfo, H5P_DEFAULT) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Set number of attributes */
+ *attr_num = (int_f)oinfo.num_attrs;
done:
return ret_value;