Permalink
Browse files

Safeguard against trying to use C++ exception handling in C code

  • Loading branch information...
dabroz authored and matz committed Nov 22, 2016
1 parent 401ad45 commit 00e61212600c53e9c4f1629a6e3bcb93422417c2
Showing with 4 additions and 0 deletions.
  1. +4 −0 include/mruby/throw.h
View
@@ -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 {

0 comments on commit 00e6121

Please sign in to comment.