diff --git a/SWIG/Lib/csharp/csharphead.swg b/SWIG/Lib/csharp/csharphead.swg index 42f340e81..860dee526 100644 --- a/SWIG/Lib/csharp/csharphead.swg +++ b/SWIG/Lib/csharp/csharphead.swg @@ -43,17 +43,13 @@ static SWIG_CSharpExceptions_t SWIG_csharp_exceptions[] = { { SWIG_CSharpArgumentOutOfRangeException, NULL }, { SWIG_CSharpNullReferenceException, NULL } }; -#if defined(SWIG_NOINCLUDE) -void SWIG_CSharpThrowException(SWIG_CSharpExceptionCodes code, const char *msg); -#else -void SWIG_CSharpThrowException(SWIG_CSharpExceptionCodes code, const char *msg) { +static void SWIG_CSharpThrowException(SWIG_CSharpExceptionCodes code, const char *msg) { SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpException].callback; if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpExceptionCodes)) { callback = SWIG_csharp_exceptions[code].callback; } callback(msg); } -#endif %} %insert(runtime) %{