summaryrefslogtreecommitdiff
path: root/Lib/mzscheme
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-07-20 15:05:21 +1200
committerOlly Betts <olly@survex.com>2022-10-05 12:40:15 +1300
commit4ac3c87a299368e22151bac3cae11e62cf23c730 (patch)
tree76d861abb572d942429d3d71999db138b4ecca0e /Lib/mzscheme
parentabc1c59c4e67f912c409a2bb6b8f70f0e2809c9e (diff)
downloadswig-4ac3c87a299368e22151bac3cae11e62cf23c730.tar.gz
Sort out predefined SWIG-specific macros
Ensure that SWIG_VERSION is defined both at SWIG-time and in the generated C/C++ wrapper code (it was only defined in the wrapper for some target languages previously). SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers to match behaviour for all other target languages. Stop defining SWIGVERSION in the wrapper. This only happened as a side-effect of how SWIG_VERSION was defined but was never documented and is redundant. The new testcase also checks that SWIG is defined at SWIG-time but not in the generated wrapper, and that exactly one of a list of target-language specific macros is defined. Fixes #1050
Diffstat (limited to 'Lib/mzscheme')
-rw-r--r--Lib/mzscheme/mzscheme.swg2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/mzscheme/mzscheme.swg b/Lib/mzscheme/mzscheme.swg
index f45c87250..8ded91f3e 100644
--- a/Lib/mzscheme/mzscheme.swg
+++ b/Lib/mzscheme/mzscheme.swg
@@ -5,6 +5,8 @@
* 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