diff options
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/H5private.h b/src/H5private.h index a67a6aa..8a10783 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1192,12 +1192,23 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); #endif /* H5_INTERFACE_INIT_FUNC */ +#ifndef NDEBUG #define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) \ - /* Check API status */ \ - assert(asrt); \ + static hbool_t func_check = FALSE; \ + \ + if(!func_check) { \ + /* Check API status */ \ + HDassert(asrt); \ + \ + /* Check function name */ \ + H5_CHECK_FUNCNAME(func_name); \ \ - /* Check function name */ \ - H5_CHECK_FUNCNAME(func_name); + /* Don't check again */ \ + func_check = TRUE; \ + } /* end if */ +#else /* NDEBUG */ +#define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) +#endif /* NDEBUG */ #define FUNC_ENTER_COMMON(func_name,asrt) \ static const char FUNC[]=#func_name; \ |