From 1fae56996076f0c3b0c44344e41a55888c52303c Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 26 Jan 2015 21:03:45 +0000 Subject: [PATCH] Add missing SWIGSCILAB in wrappers and fix unions test for non-scilab languages --- Examples/test-suite/unions.i | 23 +++++------------------ Source/Modules/scilab.cxx | 3 +++ 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Examples/test-suite/unions.i b/Examples/test-suite/unions.i index edc263874..789b9608d 100644 --- a/Examples/test-suite/unions.i +++ b/Examples/test-suite/unions.i @@ -33,8 +33,6 @@ typedef union { /* This union checks the parser and will be used in a runtime test */ -#if not defined(SWIGSCILAB) - %inline %{ typedef struct { @@ -44,23 +42,12 @@ typedef struct { SmallStruct small; } uni; int number; -} EmbeddedUnionTest; - -%} - +} +#if !defined(SWIGSCILAB) +EmbeddedUnionTest; #else - -%inline %{ - -typedef struct { - union - { - BigStruct big; - SmallStruct small; - } uni; - int number; -} EmbedUnionTst; +EmbedUnionTst; +#endif %} -#endif diff --git a/Source/Modules/scilab.cxx b/Source/Modules/scilab.cxx index 18bfa15d3..6d9930431 100644 --- a/Source/Modules/scilab.cxx +++ b/Source/Modules/scilab.cxx @@ -195,6 +195,9 @@ public: /* Output module initialization code */ Swig_banner(beginSection); + Printf(runtimeSection, "\n#define SWIGSCILAB\n"); + Printf(runtimeSection, "\n"); + // Gateway header source merged with wrapper source in nobuilder mode if (!generateBuilder) startGatewayHeader(gatewayLibraryName);