diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2022-10-13 19:46:51 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2022-10-13 19:47:43 +0100 |
commit | 46f7501d94f8fb3432863344aeda6d4fd85fb1a4 (patch) | |
tree | 01162c59beeaf74db67799578dd944d9c9815033 /Lib | |
parent | e123c2afe84ea29c5a7c9561c7e3355283001477 (diff) | |
download | swig-46f7501d94f8fb3432863344aeda6d4fd85fb1a4.tar.gz |
Cleanup SWIG_VERSION definition
Add Swig_obligatory_macros which must be called by each
target language to define SWIG_VERSION correctly
in the generated code, as well as the language specific
macro SWIGXXX where XXX is the target language name.
Drop the #ifdef SWIGXXX that was previously generated -
I can't see the point of this and if users are defining
this macro somehow, then users will need to change this
Closes #1050
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/csharp/csharp.swg | 2 | ||||
-rw-r--r-- | Lib/go/go.swg | 2 | ||||
-rw-r--r-- | Lib/guile/guile.i | 2 | ||||
-rw-r--r-- | Lib/java/java.swg | 2 | ||||
-rw-r--r-- | Lib/lua/lua.swg | 2 | ||||
-rw-r--r-- | Lib/mzscheme/mzscheme.swg | 2 | ||||
-rw-r--r-- | Lib/ocaml/ocaml.i | 2 | ||||
-rw-r--r-- | Lib/php/php.swg | 2 | ||||
-rw-r--r-- | Lib/typemaps/README | 1 | ||||
-rw-r--r-- | Lib/typemaps/swigmacros.swg | 2 | ||||
-rw-r--r-- | Lib/typemaps/swigversion.swg | 16 |
11 files changed, 0 insertions, 35 deletions
diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 8514a7705..1f80d12a1 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -4,8 +4,6 @@ * C# typemaps * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - %include <csharphead.swg> /* The ctype, imtype and cstype typemaps work together and so there should be one of each. diff --git a/Lib/go/go.swg b/Lib/go/go.swg index 47486ab75..348ae5f0d 100644 --- a/Lib/go/go.swg +++ b/Lib/go/go.swg @@ -4,8 +4,6 @@ * Go configuration module. * ------------------------------------------------------------ */ -%include <typemaps/swigversion.swg> - %include <gostring.swg> /* Code insertion directives */ diff --git a/Lib/guile/guile.i b/Lib/guile/guile.i index 10438f483..ef270d74b 100644 --- a/Lib/guile/guile.i +++ b/Lib/guile/guile.i @@ -4,8 +4,6 @@ * SWIG Configuration File for Guile. * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - /* Macro for inserting Scheme code into the stub */ #define %scheme %insert("scheme") #define %goops %insert("goops") diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 28eb8fd0d..8719818bb 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -4,8 +4,6 @@ * Java typemaps * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - %include <javahead.swg> /* The jni, jtype and jstype typemaps work together and so there should be one of each. diff --git a/Lib/lua/lua.swg b/Lib/lua/lua.swg index 263c3966f..12c635d77 100644 --- a/Lib/lua/lua.swg +++ b/Lib/lua/lua.swg @@ -5,8 +5,6 @@ * This file is parsed by SWIG before reading any other interface file. * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - /* ----------------------------------------------------------------------------- * includes * ----------------------------------------------------------------------------- */ diff --git a/Lib/mzscheme/mzscheme.swg b/Lib/mzscheme/mzscheme.swg index 8ded91f3e..f45c87250 100644 --- a/Lib/mzscheme/mzscheme.swg +++ b/Lib/mzscheme/mzscheme.swg @@ -5,8 +5,6 @@ * This file is parsed by SWIG before reading any other interface file. * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - /* Include headers */ %runtime "swigrun.swg" // Common C API type-checking code %runtime "swigerrors.swg" // SWIG errors diff --git a/Lib/ocaml/ocaml.i b/Lib/ocaml/ocaml.i index 117d0a9b5..cc26d1859 100644 --- a/Lib/ocaml/ocaml.i +++ b/Lib/ocaml/ocaml.i @@ -4,8 +4,6 @@ * SWIG Configuration File for Ocaml * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - /* Insert common stuff */ %insert(runtime) "swigrun.swg" diff --git a/Lib/php/php.swg b/Lib/php/php.swg index e14401236..fd0928076 100644 --- a/Lib/php/php.swg +++ b/Lib/php/php.swg @@ -4,8 +4,6 @@ * PHP configuration file * ----------------------------------------------------------------------------- */ -%include <typemaps/swigversion.swg> - // Default to generating PHP type declarations (for PHP >= 8) except for // cases which are liable to cause compatibility issues with existing // bindings. diff --git a/Lib/typemaps/README b/Lib/typemaps/README index 22a0fc0bb..65134578d 100644 --- a/Lib/typemaps/README +++ b/Lib/typemaps/README @@ -48,7 +48,6 @@ std_strings.swg Common macros to implemented the std::string/std::wstring typem strings.swg Common macros and typemaps for string and wstring (char *, wchar_t *) swigmacros.swg Basic macros -swigversion.swg Define SWIG_VERSION fragments.swg Macros for fragment manipulations diff --git a/Lib/typemaps/swigmacros.swg b/Lib/typemaps/swigmacros.swg index 7db6871d4..b772eb04b 100644 --- a/Lib/typemaps/swigmacros.swg +++ b/Lib/typemaps/swigmacros.swg @@ -109,8 +109,6 @@ nocppval #endif %enddef -%include <typemaps/swigversion.swg> - /* ----------------------------------------------------------------------------- * Casting operators * ----------------------------------------------------------------------------- */ diff --git a/Lib/typemaps/swigversion.swg b/Lib/typemaps/swigversion.swg deleted file mode 100644 index ac2e42439..000000000 --- a/Lib/typemaps/swigversion.swg +++ /dev/null @@ -1,16 +0,0 @@ -/* ----------------------------------------------------------------------------- - * Define SWIG_VERSION - * ----------------------------------------------------------------------------- */ - -/* Define SWIG_VERSION in the interface and the wrapper code. - * - * Best practice is to use SWIG-time checks for SWIG_VERSION, but SWIG_VERSION - * was unintentionally defined like this for many years, and while it was never - * documented there are likely user interface files which rely on it. - */ -%define %define_swig_version_()%#define SWIG_VERSION_ SWIG_VERSION %enddef -%insert("header") { -%define_swig_version_() -%#define SWIG_VERSION SWIG_VERSION_ -} -#undef %define_swig_version_ |