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 /src/H5Oattribute.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 'src/H5Oattribute.c')
-rw-r--r-- | src/H5Oattribute.c | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c index 5050e5c..5c0a91a 100644 --- a/src/H5Oattribute.c +++ b/src/H5Oattribute.c @@ -1550,44 +1550,6 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh) /*------------------------------------------------------------------------- - * Function: H5O_attr_count - * - * Purpose: Determine the # of attributes on an object - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Monday, December 11, 2006 - * - *------------------------------------------------------------------------- - */ -int -H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id) -{ - H5O_t *oh = NULL; /* Pointer to actual object header */ - int ret_value; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count) - - /* Check arguments */ - HDassert(loc); - - /* Protect the object header to iterate over */ - if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_READ))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, FAIL, "unable to load object header") - - /* Retrieve # of attributes on object */ - ret_value = (int)H5O_attr_count_real(loc->file, dxpl_id, oh); - -done: - if(oh && H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_ATTR, H5E_PROTECT, FAIL, "unable to release object header") - - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_attr_count */ - - -/*------------------------------------------------------------------------- * Function: H5O_attr_exists_cb * * Purpose: Object header iterator callback routine to check for an @@ -1765,3 +1727,43 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5O_attr_bh_info() */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + +/*------------------------------------------------------------------------- + * Function: H5O_attr_count + * + * Purpose: Determine the # of attributes on an object + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Monday, December 11, 2006 + * + *------------------------------------------------------------------------- + */ +int +H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id) +{ + H5O_t *oh = NULL; /* Pointer to actual object header */ + int ret_value; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT(H5O_attr_count) + + /* Check arguments */ + HDassert(loc); + + /* Protect the object header to iterate over */ + if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, NULL, NULL, H5AC_READ))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, FAIL, "unable to load object header") + + /* Retrieve # of attributes on object */ + ret_value = (int)H5O_attr_count_real(loc->file, dxpl_id, oh); + +done: + if(oh && H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0) + HDONE_ERROR(H5E_ATTR, H5E_PROTECT, FAIL, "unable to release object header") + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O_attr_count */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + |