diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-03-30 20:45:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-03-30 20:45:20 (GMT) |
commit | 0180863320994d8a7efba446f81bd73819315cd2 (patch) | |
tree | 20f05c3c8792ba079ca636a8264800891cfb4f25 /src/H5private.h | |
parent | b3e1ba581622ed413b7da5ddc7c7e99d37a00c73 (diff) | |
download | hdf5-0180863320994d8a7efba446f81bd73819315cd2.zip hdf5-0180863320994d8a7efba446f81bd73819315cd2.tar.gz hdf5-0180863320994d8a7efba446f81bd73819315cd2.tar.bz2 |
[svn-r8288] Purpose:
Bug fix/code cleanup
Description:
Copy Robb's feature in SSlib that checks that the name of the function
used in the FUNC_ENTER macro is actually the name of function.
Fixed a bunch of typos & copy-n-pasto's for functions with incorrect names.
Platforms tested:
FreeBSD 4.9 (sleipnir) w/parallel
too minor to require h5committest
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index 1d3e0db..be2c668 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1135,12 +1135,24 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ #endif +/* Check if the function name is correct (if the compiler supports __FUNCTION__) */ +#ifdef H5_HAVE_FUNCTION +#define H5_CHECK_FUNCNAME(func_name) \ + assert(func_name && !HDstrcmp(#func_name, __FUNCTION__)) +#else /* H5_HAVE_FUNCTION */ +#define H5_CHECK_FUNCNAME(func_name) \ + assert(func_name) +#endif /* H5_HAVE_FUNCTION */ + #define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) \ PABLO_SAVE (ID_ ## func_name) \ \ /* Check API status */ \ assert(asrt); \ \ + /* Check function name */ \ + H5_CHECK_FUNCNAME(func_name); \ + \ /* Start tracing */ \ PABLO_TRACE_ON (PABLO_MASK, pablo_func_id) |