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

This commit is contained in:
Tomasz Dąbrowski
2016-11-22 13:22:02 +01:00
committed by Yukihiro "Matz" Matsumoto
parent 401ad4586f
commit 00e6121260
+4
View File
@@ -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 {