summaryrefslogtreecommitdiffstats
path: root/src/H5EApkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-04-23 18:25:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-04-23 18:25:16 (GMT)
commitf098d20ab95c885414f82ee310b3692929e76227 (patch)
tree8f9eaca942902a988ccc12e983144d6b3d0b04c4 /src/H5EApkg.h
parentb1f8b21130a4f95d2dcd4b9343ed05e93c33f35c (diff)
downloadhdf5-f098d20ab95c885414f82ee310b3692929e76227.zip
hdf5-f098d20ab95c885414f82ee310b3692929e76227.tar.gz
hdf5-f098d20ab95c885414f82ee310b3692929e76227.tar.bz2
[svn-r16847] Description:
Bring r16846 from revise_chunks branch back to trunk: Fix broken (for how long?) H5_ASSIGN_OVERFLOW macro to actually detect overflows during assignments, along with several errors it [now] detected. Cleaned up a fix minor warnings and/or pieces of code also. Tested on: FreeBSD/32 6.3 (duty) in debug mode (h5committest not needed - multi-platform test performed on branch)
Diffstat (limited to 'src/H5EApkg.h')
-rw-r--r--src/H5EApkg.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/H5EApkg.h b/src/H5EApkg.h
index b2f837a..f64f520 100644
--- a/src/H5EApkg.h
+++ b/src/H5EApkg.h
@@ -39,7 +39,6 @@
/* Revisions to FUNC_ENTER/LEAVE & Error Macros */
/************************************************/
-#ifndef NDEBUG
/* `S' is the name of a function which is being tested to check if it's */
/* a public API function */
#define H5_IS_PUB(S) (((HDisdigit(S[1]) || HDisupper(S[1])) && HDislower(S[2])) || \
@@ -58,6 +57,7 @@
((HDisdigit(S[2]) || HDisupper(S[2])) && '_' == S[3] && '_' == S[4] && HDislower(S[5])) || \
((HDisdigit(S[3]) || HDisupper(S[3])) && '_' == S[4] && '_' == S[5] && HDislower(S[6])))
+#ifndef NDEBUG
#define FUNC_ENTER_NAME_CHECK(asrt) \
{ \
static hbool_t func_check = FALSE; \
@@ -72,13 +72,11 @@
} /* end scope */
#else /* NDEBUG */
#define FUNC_ENTER_NAME_CHECK(asrt)
-#define H5_IS_PUB(S)
-#define H5_IS_PRIV(S)
-#define H5_IS_PKG(S)
#endif /* NDEBUG */
-/* Macro for referencing package initialization variables */
+/* Macros for referencing package initialization symbols */
#define H5_PACKAGE_INIT_VAR(x) H5_GLUE3(H5_, x, _init_g)
+#define H5_PACKAGE_INIT_FUNC(x) H5_GLUE(x, __pkg_init)
/* Macros to check if a package is initialized */
#define H5_CHECK_PACKAGE_INIT_REG_YES(asrt) HDassert(H5_PACKAGE_INIT_VAR(pkg));
@@ -98,14 +96,18 @@
} /* end if */
#define H5_PKG_NO_INIT(pkg)
-/* Macros to declare package initialization variable, if a package initialization routine is defined */
+/* Macros to declare package initialization symbols, if a package initialization routine is defined */
#define H5_PKG_YES_INIT_VAR(pkg) extern hbool_t H5_PACKAGE_INIT_VAR(H5_MY_PKG);
#define H5_PKG_NO_INIT_VAR(pkg)
+#define H5_PKG_YES_INIT_FUNC(pkg) extern herr_t H5_PACKAGE_INIT_FUNC(pkg)(void);
+#define H5_PKG_NO_INIT_FUNC(pkg)
-/* Declare package initialization variable (if in a package) */
+/* Declare package initialization symbols (if in a package) */
#define H5_DECLARE_PKG_VAR(pkg_init, pkg) H5_GLUE3(H5_PKG_, pkg_init, _INIT_VAR)(pkg)
+#define H5_DECLARE_PKG_FUNC(pkg_init, pkg) H5_GLUE3(H5_PKG_, pkg_init, _INIT_FUNC)(pkg)
#ifdef H5_MY_PKG
H5_DECLARE_PKG_VAR(H5_MY_PKG_INIT, H5_MY_PKG)
+H5_DECLARE_PKG_FUNC(H5_MY_PKG_INIT, H5_MY_PKG)
#endif /* H5_MY_PKG */
/* API re-entrance variable */
@@ -226,6 +228,13 @@ func \
#define H5_PRIV_FUNC_INIT_FAILED(pkg_init) H5_GLUE3(H5_PRIV_, pkg_init, _FUNC_INIT_FAILED)
/* Macros for leaving different scopes of routines */
+#define FUNC_LEAVE_PKGINIT \
+ /* Leave scope for this type of function */ \
+ } \
+ \
+ /* Pop the name of this function off the function stack */ \
+ H5_POP_FUNC
+
#define FUNC_LEAVE_STATIC \
/* Leave scope for this type of function */ \
} \