diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-08-26 00:05:39 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-08-26 00:05:39 (GMT) |
commit | 767585b70f3e8c70b9558f32dfc5670533a26a4b (patch) | |
tree | 9414b9c8174e80b81b3a252ba49bb74712d85d34 /src | |
parent | 4939ee241909f476bc25ad6f3a7f7ee56c443fa8 (diff) | |
download | hdf5-767585b70f3e8c70b9558f32dfc5670533a26a4b.zip hdf5-767585b70f3e8c70b9558f32dfc5670533a26a4b.tar.gz hdf5-767585b70f3e8c70b9558f32dfc5670533a26a4b.tar.bz2 |
[svn-r27581] Fixed a bug in the FUNC_ENTER macros. API calls of the form H5xx_* were
flagged as H5XX_, which is a non-public API form.
Tested on: h5committest
Diffstat (limited to 'src')
-rw-r--r-- | src/H5private.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/H5private.h b/src/H5private.h index 65726da..5e968a0 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1721,9 +1721,24 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ *------------------------------------------------------------------------- */ -/* `S' is the name of a function which is being tested to check if its */ -/* an API function */ -#define H5_IS_API(S) ('_'!=((const char *)S)[2] && '_'!=((const char *)S)[3] && (!((const char *)S)[4] || '_'!=((const char *)S)[4])) +/* `S' is the name of a function which is being tested to check if it's + * an API function. + * + * BADNESS: + * - Underscore at positions 2 or 3 (0-indexed string). Handles + * H5_ and H5X_. + * - Underscore at position 4 if position 3 is uppercase or a digit. + * Handles H5XY_. + */ +#define H5_IS_API(S) (\ + '_'!=((const char *)S)[2] /* underscore at position 2 */ \ + && '_'!=((const char *)S)[3] /* underscore at position 3 */ \ + && !( /* NOT */ \ + ((const char *)S)[4] /* pos 4 exists */ \ + && (HDisupper(S[3]) || HDisdigit(S[3])) /* pos 3 dig | uc */ \ + && '_'==((const char *)S)[4] /* pos 4 underscore */ \ + )\ +) /* `S' is the name of a function which is being tested to check if it's */ /* a public API function */ |