diff options
| author | Tomasz Dąbrowski <[email protected]> | 2016-11-22 13:22:02 +0100 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-24 09:28:00 +0900 |
| commit | 00e61212600c53e9c4f1629a6e3bcb93422417c2 (patch) | |
| tree | ec5fbe838324c1c1cede5ad294a5779f60cca445 /include | |
| parent | 401ad4586ffe8bc26740f49f9049132ad2c50539 (diff) | |
| download | mruby-00e61212600c53e9c4f1629a6e3bcb93422417c2.tar.gz mruby-00e61212600c53e9c4f1629a6e3bcb93422417c2.zip | |
Safeguard against trying to use C++ exception handling in C code
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/throw.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mruby/throw.h b/include/mruby/throw.h index 5dd1d0a9f..010793027 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -7,6 +7,10 @@ #ifndef MRB_THROW_H #define MRB_THROW_H +#if defined(MRB_ENABLE_CXX_EXCEPTION) && !defined(__cplusplus) +#error Trying to use C++ exception handling in C code +#endif + #if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus) #define MRB_TRY(buf) do { try { |
