diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-09-01 07:12:41 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-09-01 07:12:41 (GMT) |
commit | 96360ad86e25159be8ef0647f77f5618012b99e5 (patch) | |
tree | 47d7a383e8b8331312c9f8a436795805633a88be /src/H5private.h | |
parent | 49ef02b3a11f4757beecf1f4008ec47bd6006f52 (diff) | |
download | hdf5-96360ad86e25159be8ef0647f77f5618012b99e5.zip hdf5-96360ad86e25159be8ef0647f77f5618012b99e5.tar.gz hdf5-96360ad86e25159be8ef0647f77f5618012b99e5.tar.bz2 |
[svn-r27643] Merge of r27581, 27587, and 27601 from trunk
Added a new public API call: H5is_library_threadsafe
This API call can determine, at runtime, if the library was built with
thread-safety enabled.
Also fixes a minor bug in the FUNC_ENTER macros.
Tested on: h5committest
jam w/ threadsafe
Diffstat (limited to 'src/H5private.h')
-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 6534f6f..15bb61c 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1741,9 +1741,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 */ |