diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-09 23:27:44 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-09 23:27:44 +0900 |
| commit | a036cbea16f5c250af830794816040d19e531377 (patch) | |
| tree | cc52589e320d762e4fc8cdbc302736e6140a1538 /include | |
| parent | f1b1a8acd1c890f06cdd39bbbc3a85b3313a911d (diff) | |
| parent | 4de468e75414eb1adb3bafba19b72caba3a17044 (diff) | |
| download | mruby-a036cbea16f5c250af830794816040d19e531377.tar.gz mruby-a036cbea16f5c250af830794816040d19e531377.zip | |
Merge pull request #2373 from take-cheeze/static_assert
Add macro `mrb_static_assert`.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h index 390d593bc..598ff06cf 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -429,6 +429,12 @@ void mrb_atexit(mrb_state *mrb, mrb_atexit_func func); #define mrb_assert_int_fit(t1,n,t2,max) ((void)0) #endif +#if __STDC_VERSION__ >= 201112L +#define mrb_static_assert(exp, str) _Static_assert(exp, str) +#else +#define mrb_static_assert(exp, str) mrb_assert(exp) +#endif + mrb_value mrb_format(mrb_state *mrb, const char *format, ...); #if defined(__cplusplus) |
