diff options
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index 539b39d..e01edd2 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1891,6 +1891,30 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); FUNC_ENTER_NOAPI_INIT(err) \ { +/* Use this macro for all "normal" package-level functions */ +#define FUNC_ENTER_PACKAGE { \ + FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + H5_PUSH_FUNC \ + { + +/* Use this macro for package-level functions which propgate errors, but don't issue them */ +#define FUNC_ENTER_PACKAGE_NOERR { \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ + H5_PUSH_FUNC \ + { + +/* Use the following macro as replacement for the FUNC_ENTER_PACKAGE + * macro when the function needs to set up a metadata tag. */ +#define FUNC_ENTER_PACKAGE_TAG(dxpl_id, tag, err) { \ + haddr_t prev_tag = HADDR_UNDEF; \ + hid_t tag_dxpl_id = dxpl_id; \ + \ + FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + if(H5AC_tag(tag_dxpl_id, tag, &prev_tag) < 0) \ + HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \ + H5_PUSH_FUNC \ + { + /* Use this macro for all non-API functions, which propagate errors, but don't issue them */ #define FUNC_ENTER_NOAPI_NOERR { \ FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \ |