summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-07-25 19:56:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-07-25 19:56:18 (GMT)
commit434643dd4d14a841abdcc73ad7b3a0a8e06e4438 (patch)
tree24ba05d5c24bc4845bcb5c0051d9fcafbfc5afd6 /src/H5private.h
parentf0e0137b6110fb4f0c3ffe40a9bb5d43111874a7 (diff)
downloadhdf5-434643dd4d14a841abdcc73ad7b3a0a8e06e4438.zip
hdf5-434643dd4d14a841abdcc73ad7b3a0a8e06e4438.tar.gz
hdf5-434643dd4d14a841abdcc73ad7b3a0a8e06e4438.tar.bz2
[svn-r22600] Description:
Bring r22251:22599 from trunk to revise_chunks branch. Tested on: Mac OSX/64 10.7.4 (amazon) w/gcc 4.7.1, C++ & FORTRAN (Not h5committested yet, as this branch doesn't require it)
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/src/H5private.h b/src/H5private.h
index d6e22eb..0bf990d 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1917,6 +1917,30 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
H5_PUSH_FUNC \
{
+/* Use this macro for all "normal" staticly-scoped functions */
+#define FUNC_ENTER_STATIC { \
+ FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
+ {
+
+/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */
+#define FUNC_ENTER_STATIC_NOERR { \
+ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \
+ H5_PUSH_FUNC \
+ {
+
+/* Use the following macro as replacement for the FUNC_ENTER_STATIC
+ * macro when the function needs to set up a metadata tag. */
+#define FUNC_ENTER_STATIC_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)); \
@@ -2160,11 +2184,11 @@ extern hbool_t H5_api_entered_g; /* Has library already been entered through
{{{
/* Macros for substituting the package name */
-#define FUNC_ENTER_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
-#define FUNC_ENTER_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
-#define FUNC_ENTER_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
-#define FUNC_ENTER_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENT_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENT_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
+#define FUNC_ENT_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
+#define FUNC_ENT_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
+#define FUNC_ENT_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
/* Macros for substituting a function prefix */
#define FUNC_PREFIX_STATIC static
@@ -2193,7 +2217,7 @@ func \
{ \
ret_typ ret_value = ret_init; \
H5_GLUE(FUNC_ERR_VAR_, use_err)(ret_typ, ret_init, err_value) \
- H5_GLUE(FUNC_ENTER_, scope)
+ H5_GLUE(FUNC_ENT_, scope)
/* Use this macro when entering functions that have no return value */
#define BEGIN_FUNC_VOID(scope, use_err, func) \
@@ -2203,7 +2227,7 @@ func \
/* Open function */ \
{ \
H5_GLUE(FUNC_ERR_VAR_, use_err)(void, -, -) \
- H5_GLUE(FUNC_ENTER_, scope)
+ H5_GLUE(FUNC_ENT_, scope)
/* Macros for label when a function initialization can fail */
#define H5_PRIV_YES_FUNC_INIT_FAILED func_init_failed: