Provide trivial SWIG_exception definition even in C mode

This is not really useful, but gets rid of an annoying warning when
running li_constraints.ctest unit test.
This commit is contained in:
Vadim Zeitlin 2019-08-05 14:15:18 +02:00
commit 649a1c3c98

View file

@ -267,11 +267,19 @@ typedef struct SwigObj SwigObj;
typedef struct SwigObj SwigObj;
%}
#endif // SWIG_CPPMODE
#ifdef SWIG_C_EXCEPT
%include "cexcept.swg"
#endif // SWIG_C_EXCEPT
#endif // SWIG_CPPMODE
#else // !SWIG_C_EXCEPT
// Still define the macro used in some standard typemaps, but we can't
// implement it in C, so just allow the user predefining their own version.
%insert("runtime") %{
#ifndef SWIG_exception
#define SWIG_exception(code, msg)
#endif
%}
#endif // SWIG_C_EXCEPT/!SWIG_C_EXCEPT
%insert("runtime") %{
#ifdef __cplusplus