summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-02 10:58:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-02 10:58:26 +0900
commit0bcf9e28fc6b41f75e78557295decfdcdb947b7a (patch)
treef35fed4d182ee5dadeb91048a1bdba9da1d9063b /src/vm.c
parentfdd92750fe7e65150b067bc5179e813e7b5e2312 (diff)
downloadmruby-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 'src/vm.c')
-rw-r--r--src/vm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 458968524..c05afca9d 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2583,3 +2583,7 @@ mrb_top_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int sta
return v;
}
+
+#if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus)
+mrb_int mrb_jmpbuf::jmpbuf_id = 0;
+#endif