[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
This commit is contained in:
@@ -1548,44 +1548,6 @@ H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_attr_count_real */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* 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
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user