diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-03-30 20:41:45 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-03-30 20:41:45 (GMT) |
commit | c3d9b510b4e65cd32ec9708fd369d31b77d76ea6 (patch) | |
tree | 832b08d9ee2005012e8266a010c5686e31d81737 /src/H5private.h | |
parent | 8eb5f818bab32fcf61cf805b880c5cc4dd1e98bc (diff) | |
download | hdf5-c3d9b510b4e65cd32ec9708fd369d31b77d76ea6.zip hdf5-c3d9b510b4e65cd32ec9708fd369d31b77d76ea6.tar.gz hdf5-c3d9b510b4e65cd32ec9708fd369d31b77d76ea6.tar.bz2 |
[svn-r8287] 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 2cf58f0..ac80564 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1144,12 +1144,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) |