diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-12 19:36:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-12 19:36:01 (GMT) |
commit | c7ad57374b5a3633e32a6675a8ca8345d626aaba (patch) | |
tree | 8fb34cde148119337435351e52f4f82d36e4959c /src/H5private.h | |
parent | 7dcf5b39721c7c230c07a403ea8e91f7fa2206d2 (diff) | |
download | hdf5-c7ad57374b5a3633e32a6675a8ca8345d626aaba.zip hdf5-c7ad57374b5a3633e32a6675a8ca8345d626aaba.tar.gz hdf5-c7ad57374b5a3633e32a6675a8ca8345d626aaba.tar.bz2 |
[svn-r15209] Description:
Bring back revision 15208 from trunk:
Add a "HDcompile_assert" macro for assertions that can/should be checked
at compile time, as opposed to run time. (And used it for a couple of simple
cases, to begin)
Tested on:
Mac OS X/32 10.5.3 (amazon)
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index 162feec..39ed8ce 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1882,6 +1882,9 @@ static herr_t H5_INTERFACE_INIT_FUNC(void); #define H5_GLUE(x,y) x##y #define H5_GLUE3(x,y,z) x##y##z +/* Compile-time "assert" macro */ +#define HDcompile_assert(e) do { enum { compile_assert__ = 1 / (e) }; } while(0) + /* Private functions, not part of the publicly documented API */ H5_DLL herr_t H5_init_library(void); H5_DLL void H5_term_library(void); |