From 1122c39ec418f87eb5bfc055dc488253452154c7 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Sat, 28 Jan 2006 17:35:22 +0000 Subject: [PATCH] add the SWIGUTL macro to identify a language using the Unified Typemap Library, and using it around git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8594 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/exception_order.i | 4 +++- Examples/test-suite/typemap_variables.i | 4 ++-- Lib/exception.i | 2 +- Lib/std_except.i | 2 +- Lib/typemaps/swigtypemaps.swg | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Examples/test-suite/exception_order.i b/Examples/test-suite/exception_order.i index 9aa26669c..7db474c5f 100644 --- a/Examples/test-suite/exception_order.i +++ b/Examples/test-suite/exception_order.i @@ -1,5 +1,7 @@ %module exception_order +%warnfilter(SWIGWARN_RUBY_WRONG_NAME); + %include "exception.i" %{ @@ -13,7 +15,7 @@ user's throw declarations. */ -#if defined(SWIGPERL) || defined(SWIGRUBY) +#if defined(SWIGUTL) %exception { try { $action diff --git a/Examples/test-suite/typemap_variables.i b/Examples/test-suite/typemap_variables.i index 1481420d4..142e35060 100644 --- a/Examples/test-suite/typemap_variables.i +++ b/Examples/test-suite/typemap_variables.i @@ -3,9 +3,9 @@ // Check typemap name matching rules for variables // Some of these are using qualified names, which is not right... the test will be adjusted as these get fixed -#if defined(SWIGPYTHON) || defined(SWIGRUBY) +#if defined(SWIGUTL) %{ -#define TYPEMAP_VARIABLES_FAIL goto fail; +#define TYPEMAP_VARIABLES_FAIL SWIG_fail; %} #else %{ diff --git a/Lib/exception.i b/Lib/exception.i index 5e7b776c4..2cafa7813 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -5,7 +5,7 @@ // // This SWIG library file provides language independent exception handling -#if defined(SWIGPERL) || defined(SWIGTCL) || defined(SWIGRUBY) || defined(SWIGPYTHON) +#if defined(SWIGUTL) #error "This version of exception.i should not be used" #endif diff --git a/Lib/std_except.i b/Lib/std_except.i index 5fa8e9dd0..5a27f4b11 100644 --- a/Lib/std_except.i +++ b/Lib/std_except.i @@ -17,7 +17,7 @@ // a new std_except.i file in the target library directory. // -#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGGUILE) || defined(SWIGPERL) || defined(SWIGTCL) || defined(SWIGRUBY) || defined(SWIGPYTHON) +#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGGUILE) || defined(SWIGUTL) #error "This version of std_except.i should not be used" #endif diff --git a/Lib/typemaps/swigtypemaps.swg b/Lib/typemaps/swigtypemaps.swg index 5ec1c7f5d..e78c53afc 100644 --- a/Lib/typemaps/swigtypemaps.swg +++ b/Lib/typemaps/swigtypemaps.swg @@ -38,6 +38,7 @@ */ +#define SWIGUTL SWIGUTL /* ----------------------------------------------------------------------------- * Language specialization section.