diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-02 10:58:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-02 10:58:26 +0900 |
| commit | 0bcf9e28fc6b41f75e78557295decfdcdb947b7a (patch) | |
| tree | f35fed4d182ee5dadeb91048a1bdba9da1d9063b /include | |
| parent | fdd92750fe7e65150b067bc5179e813e7b5e2312 (diff) | |
| download | mruby-0bcf9e28fc6b41f75e78557295decfdcdb947b7a.tar.gz mruby-0bcf9e28fc6b41f75e78557295decfdcdb947b7a.zip | |
Reorganize C++ exceptions; ref #3470
There are 3 levels of C++ exception handling:
* default - no C++ exception (use setjmp/longjmp)
* enable_cxx_exception (use C++ exceptions with C ABI)
* enable_cxx_abi (use C++ ABI including exceptions)
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/throw.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/mruby/throw.h b/include/mruby/throw.h index 010793027..5d3d214e7 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -7,8 +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 +#if defined(MRB_ENABLE_CXX_ABI) +# if !defined(__cplusplus) +# error Trying to use C++ exception handling in C code +# endif #endif #if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus) |
