From 01277d700ca44e695d584838dc42c98e035ad514 Mon Sep 17 00:00:00 2001
From: Thomas Reitmayr
-cd C:\
-SET PATH=C:\Tools\CMake\CMake-win64.3.15.5\bin;%PATH%
-git clone https://github.com/PhilipHazel/pcre2.git
-cd pcre2
-cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX=C:/Tools/pcre2 -S . -B build
-cmake --build build --config Release --target install
-
C:\Tools\nuget install PCRE2 -Version 10.39 -OutputDirectory C:\Tools\pcre2
.
+ Note this is a x64 build, if this is not suitable PCRE2 can be built from source using https://github.com/PhilipHazel/pcre2/.
+ Alternatively, set WITH_PCRE=OFF to disable PCRE2 support if you are sure you do not require it.
+ + +- - +cd C:\swig SET PATH=C:\Tools\CMake\CMake-win64.3.15.5\bin;C:\Tools\bison\Bison.3.7.4\bin;%PATH% -SET PCRE_ROOT=C:/Tools/pcre2 +SET PCRE_ROOT=C:\Tools\pcre2\PCRE2.10.39.0 SET PCRE_PLATFORM=x64 cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install2" -DCMAKE_C_FLAGS="/DPCRE2_STATIC" ^ -DCMAKE_CXX_FLAGS="/DPCRE2_STATIC" -DPCRE2_INCLUDE_DIR=%PCRE_ROOT%/include -DPCRE2_LIBRARY=%PCRE_ROOT%/lib/pcre2-8-static.lib -S . -B build @@ -283,9 +278,8 @@ cmake --build build --config Release --target install REM to test the exe cd install2/bin swig.exe -help -
In addition to Release builds you can create a Debug build using:
From dbebb2dac81499b34505e6bcd460c90622e4df29 Mon Sep 17 00:00:00 2001 From: sethg+Octave has several operators for which no corresponding C++ operators exist. For example, the Octave code +
++x=[a,b,c]; +
+calls the Octave operator horzcat of the class of a. Hence, if a is of type swig_ref you can write an overload for this operator for your wrapped C++ class by placing a file @swig_ref/horzcat.m in the Octave load path (like for every Octave class, see Creating a Class). This Octave function file is then called whenever the above Octave code is executed for a variable of type swig_ref. +
+SWIG can be built using CMake and Visual Studio rather than autotools. As with the other approaches to building SWIG the dependencies need to be installed. The steps below are one of a number of ways of installing the dependencies without requiring Cygwin or MinGW. -For fully working build steps always check the Continuous Integration (CI) setups currently detailed in the Appveyor YAML file. +For fully working build steps always check the Continuous Integration (CI) setups currently detailed in the GitHub Actions YAML file.
C:\Tools\nuget install CMake-win64 -Version 3.15.5 -OutputDirectory C:\Tools\CMake+ Using PowerShell the equivalent syntax is:
&"C:\Tools\nuget" install CMake-win64 -Version 3.15.5 -OutputDirectory C:\Tools\CMakeAlternatively you can download CMake from https://cmake.org/download/.
C:\Tools\nuget install PCRE2 -Version 10.39 -OutputDirectory C:\Tools\pcre2. + Install the PCRE2 Nuget package using the following command:
C:\Tools\nuget install PCRE2 -Version 10.39 -OutputDirectory C:\Tools\pcre2Note this is a x64 build, if this is not suitable PCRE2 can be built from source using https://github.com/PhilipHazel/pcre2/. Alternatively, set WITH_PCRE=OFF to disable PCRE2 support if you are sure you do not require it.
git clone https://github.com/swig/swig.git+ using:
git clone https://github.com/swig/swig.gitIn this example we are assuming the source code is available at C:\swig
- Now we have all the required dependencies we can build SWIG using the commands below. We are assuming Visual Studio 2019 is installed. For other versions of Visual Studio change "Visual Studio 16 2019 -A x64" to the relevant + Now we have all the required dependencies we can build SWIG using PowerShell and the commands below. We are assuming Visual Studio 2019 is installed. For other versions of Visual Studio change "Visual Studio 16 2019 -A x64" to the relevant Visual Studio Generator and architecture. We add the required build tools to the system PATH, and then build a Release version of SWIG. If all runs successfully a new swig.exe should be generated in the C:/swig/install2/bin folder. @@ -268,16 +269,25 @@ For fully working build steps always check the Continuous Integration (CI) setup
cd C:\swig -SET PATH=C:\Tools\CMake\CMake-win64.3.15.5\bin;C:\Tools\bison\Bison.3.7.4\bin;%PATH% -SET PCRE_ROOT=C:\Tools\pcre2\PCRE2.10.39.0 -SET PCRE_PLATFORM=x64 -cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install2" -DCMAKE_C_FLAGS="/DPCRE2_STATIC" ^ --DCMAKE_CXX_FLAGS="/DPCRE2_STATIC" -DPCRE2_INCLUDE_DIR=%PCRE_ROOT%/include -DPCRE2_LIBRARY=%PCRE_ROOT%/lib/pcre2-8-static.lib -S . -B build + +$env:PATH="C:\Tools\CMake\CMake-win64.3.15.5\bin;C:\Tools\bison\Bison.3.7.4\bin;" + $env:PATH +$PCRE_ROOT="C:\Tools\pcre2\PCRE2.10.39.0" +$PCRE_PLATFORM="x64" + +cmake -G "Visual Studio 16 2019" -A "x64" ` +-DCMAKE_INSTALL_PREFIX="C:/swig/install2" ` +-DCMAKE_C_FLAGS="/DPCRE2_STATIC" ` +-DCMAKE_CXX_FLAGS="/DPCRE2_STATIC" ` +-DPCRE2_INCLUDE_DIR="$PCRE_ROOT/include" ` +-DPCRE2_LIBRARY="$PCRE_ROOT/lib/pcre2-8-static.lib" ` +-S . -B build + cmake --build build --config Release --target install -REM to test the exe +# to test the exe built correctly cd install2/bin -swig.exe -help +./swig.exe -version +./swig.exe -help
From 730e49d379cad28dcbafe63c1d51b1a9bc68b9ee Mon Sep 17 00:00:00 2001
From: sethg
+Historically PHP has supported dynamic class properties and SWIG +has implemented them too (because we implement the magic __get(), +__set() and __isset() methods we need to include explicit +handling). +
+ ++PHP 8.2 deprecates +dynamic class properties - initially they'll warn, and apparently they'll +not work by default in PHP 9.0. +
+ ++In PHP code dynamic properties can be enabled for a class by +marking that class with the attribute #[AllowDynamicProperties]. +
+ ++To follow this PHP change, as of SWIG 4.1.0 you now need enable dynamic +properties for any classes you want to support them. To enable for class +Foo: +
+ +
+%feature("php:allowdynamicproperties", 1) Foo;
++or to enable them for all wrapped classes: +
+ +
+%feature("php:allowdynamicproperties", 1);
++Note that unknown features are ignored, so you can add use these +unconditionally in your interface file and it'll work with older SWIG too. +
+ +The details of enumeration names and contents are stored in hidden R -environments, which are named according the the enumeration name - for +environments, which are named according to the enumeration name - for example, an enumeration colour:
diff --git a/Examples/python/import_packages/split_modules/README b/Examples/python/import_packages/split_modules/README index d2ca15e7a..41de834c1 100644 --- a/Examples/python/import_packages/split_modules/README +++ b/Examples/python/import_packages/split_modules/README @@ -4,7 +4,7 @@ and the C/C++ part is not in any package at all. Historically SWIG has supported this sort of thing. From SWIG 4.0.0 onwards, split modules are not supported by default. The %module directive needs to be customised with the moduleimport attribute -in order to import the a global C/C++ module. +in order to import a global C/C++ module. vanilla # "plane Jane" module both halves in pkg1 vanilla_split # python 1/2 in pkg1 C 1/2 in global namespace From acbe8ed49ce7ea9cb6bc9310557b433d646174bb Mon Sep 17 00:00:00 2001 From: William S Fulton+List *SortedKeys(Hash *h, int (*cmp) (const DOH *, const DOH *)) +
+ ++SWIG also defines SWIG_VERSION and a target language macro in +the generated wrapper file (since SWIG 4.2.0 - in older versions these +were defined for some target languages but this wasn't consistent). Best +practice is to use SWIG-time conditional checks because that results in smaller +generated wrapper sources. +
+In addition, SWIG defines the following set of standard C/C++ macros:
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index da90dd9fd..a308d53c2 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -788,6 +788,7 @@ C_TEST_CASES += \ preproc_gcc_output \ preproc_include \ preproc_line_file \ + preproc_predefined \ register_par \ ret_by_value \ simple_array \ diff --git a/Examples/test-suite/preproc_predefined.h b/Examples/test-suite/preproc_predefined.h new file mode 100644 index 000000000..8d6b6ee28 --- /dev/null +++ b/Examples/test-suite/preproc_predefined.h @@ -0,0 +1,27 @@ +/* This list will need updating when new target languages are added. */ +#if (0\ + +defined(SWIGCSHARP)\ + +defined(SWIGD)\ + +defined(SWIGGO)\ + +defined(SWIGGUILE)\ + +defined(SWIGJAVA)\ + +defined(SWIGJAVASCRIPT)\ + +defined(SWIGLUA)\ + +defined(SWIGMZSCHEME)\ + +defined(SWIGOCAML)\ + +defined(SWIGOCTAVE)\ + +defined(SWIGPERL)\ + +defined(SWIGPHP)\ + +defined(SWIGPYTHON)\ + +defined(SWIGR)\ + +defined(SWIGRUBY)\ + +defined(SWIGSCILAB)\ + +defined(SWIGTCL)\ + +defined(SWIGXML)\ + ) != 1 +# ifdef SWIG +# error Did not detect exactly one target-language-specific macro defined at SWIG time. +# else +# error Did not detect exactly one target-language-specific macro defined in the generated wrapper. +# endif +#endif diff --git a/Examples/test-suite/preproc_predefined.i b/Examples/test-suite/preproc_predefined.i new file mode 100644 index 000000000..7db5352f5 --- /dev/null +++ b/Examples/test-suite/preproc_predefined.i @@ -0,0 +1,40 @@ +%module preproc_predefined + +/* Test that SWIG_VERSION is defined at SWIG-time and in the wrapper. */ +#ifndef SWIG_VERSION +# error SWIG_VERSION not defined at SWIG-time +#endif +%{ +#ifndef SWIG_VERSION +# error SWIG_VERSION not defined in the generated wrapper +#endif +%} + +/* Test that SWIGVERSION is NOT defined at SWIG-time or in the wrapper. + * It used to be defined in the wrapper as a side-effect of how SWIG_VERSION + * was defined in the wrapper but was never documented and is redundant. + */ +#ifdef SWIGVERSION +# error SWIGVERSION should not be defined at SWIG-time +#endif +%{ +#ifdef SWIGVERSION +# error SWIGVERSION should not be defined in the generated wrapper +#endif +%} + +/* Test that SWIG is defined at SWIG-time but not in the wrapper. */ +#ifndef SWIG +# error SWIG not defined at SWIG-time +#endif +%{ +#ifdef SWIG +# error SWIG should not be defined in the generated wrapper +#endif +%} + +/* Test that SWIGxxx is defined at SWIG-time and in the wrapper. */ +%include "preproc_predefined.h" +%{ +#include "preproc_predefined.h" +%} diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 1f80d12a1..8514a7705 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -4,6 +4,8 @@ * C# typemaps * ----------------------------------------------------------------------------- */ +%include-The warnings on the right take precedence over the warnings on the left, so in the above example -Wextra adds numerous warnings including 452, but then -w309,452 overrides this and so 452 is suppressesed. +The warnings on the right take precedence over the warnings on the left, so in the above example -Wextra adds numerous warnings including 452, but then -w309,452 overrides this and so 452 is suppressed.
From befcd1bf586dfd2bb2d54ddb177f1e30a78e4e11 Mon Sep 17 00:00:00 2001
From: Olly Betts
SWIG also defines SWIG_VERSION and a target language macro in
-the generated wrapper file (since SWIG 4.2.0 - in older versions these
+the generated wrapper file (since SWIG 4.1.0 - in older versions these
were defined for some target languages but this wasn't consistent). Best
practice is to use SWIG-time conditional checks because that results in smaller
generated wrapper sources.
From 06296a71281f049cfc438b4a7fb05127a0474144 Mon Sep 17 00:00:00 2001
From: Olly Betts
+Preprocessor warning 202 ("Could not evaluate expression expr.") was
+formally off by default and enabled by -Wextra, but since SWIG 4.1.0
+this warning is on by default because suppressing it tends to hide genuine
+problems. If you really don't want to see it, you can suppress it with
+-w202 or using %warnfilter as described below. Both will work
+with older versions of SWIG too.
+
To selectively turn on extra warning messages, you can use the directives and options in the
previous section--simply add a "+" to all warning numbers. For example:
diff --git a/Examples/test-suite/errors/cpp_pp_expressions_bad.i b/Examples/test-suite/errors/cpp_pp_expressions_bad.i
index c95b9bfc4..2f71232fe 100644
--- a/Examples/test-suite/errors/cpp_pp_expressions_bad.i
+++ b/Examples/test-suite/errors/cpp_pp_expressions_bad.i
@@ -1,5 +1,5 @@
%module xxx
-/* Note: needs -Wextra to see these warnings */
+
/* Spaceship operator doesn't seem to be allowed in preprocessor expressions. */
#if (4 <=> 2) < 0
diff --git a/Examples/test-suite/errors/pp_expressions_bad.i b/Examples/test-suite/errors/pp_expressions_bad.i
index 0e67c78f8..eea178388 100644
--- a/Examples/test-suite/errors/pp_expressions_bad.i
+++ b/Examples/test-suite/errors/pp_expressions_bad.i
@@ -1,5 +1,5 @@
%module xxx
-/* Note: needs -Wextra to see these warnings */
+
/* Divide by zero */
#define ZERO 0
diff --git a/Examples/test-suite/preproc_defined.i b/Examples/test-suite/preproc_defined.i
index e1958515d..5ebf0a099 100644
--- a/Examples/test-suite/preproc_defined.i
+++ b/Examples/test-suite/preproc_defined.i
@@ -86,7 +86,7 @@ struct Defined {
void defined_not(TYPE);
#endif
-#if !( defined(AAA) \
+#if !( defined(AAA) &&\
defined(BBB) \\
&& defined(CCC) )
void bumpf_not(TYPE);
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 44d30e893..8a3259db8 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -41,8 +41,9 @@ extern "C" {
int UseWrapperSuffix = 0; // If 1, append suffix to non-overloaded functions too.
}
-/* Suppress warning messages for private inheritance, preprocessor evaluation etc...
- WARN_PP_EVALUATION 202
+/* Suppress warning messages for private inheritance, etc by default.
+ These are enabled by command line option -Wextra.
+
WARN_PARSE_PRIVATE_INHERIT 309
WARN_PARSE_BUILTIN_NAME 321
WARN_PARSE_REDUNDANT 322
@@ -50,7 +51,7 @@ extern "C" {
WARN_TYPE_RVALUE_REF_QUALIFIER_IGNORED 405
WARN_LANG_OVERLOAD_CONST 512
*/
-#define EXTRA_WARNINGS "202,309,403,405,512,321,322"
+#define EXTRA_WARNINGS "309,403,405,512,321,322"
extern "C" {
extern String *ModuleName;
From 6f1532e35a605bc52c85892d3094be552ca6483a Mon Sep 17 00:00:00 2001
From: William S Fulton
+Classes can also be marked as final, such as
+
+Compatibility note: Final methods were supported much earlier than final classes. SWIG-4.1.0 was the first version to support classes marked as final.
+
If you wish to report a problem or make a suggestion then please email
the SWIG developers on the swig-devel mailing list, see
-http://www.swig.org/mail.html
+https://www.swig.org/mail.html
ccache is released under the GNU General Public License version 2 or
later. Please see the file COPYING for license details.
diff --git a/Doc/Manual/Perl5.html b/Doc/Manual/Perl5.html
index c130cdef4..d8f24b094 100644
--- a/Doc/Manual/Perl5.html
+++ b/Doc/Manual/Perl5.html
@@ -604,7 +604,7 @@ source has a list of macros that are known to conflict with either standard head
other headers. But if you get macro type conflicts from other macros not included
in Lib/perl5/noembed.h while compiling the wrapper, you will
have to find the macro that conflicts and add an #undef into the .i file. Please report
-any conflicting macros you find to swig-user mailing list.
+any conflicting macros you find to swig-user mailing list.
The LICENSE file shipped with SWIG in the top level directory contains the SWIG license.
For further insight into the license including the license of SWIG's output code, please visit
-the SWIG legal page - http://www.swig.org/legal.html.
+the SWIG legal page - https://www.swig.org/legal.html.
@@ -98,7 +98,7 @@ The official location of SWIG related material is
@@ -111,7 +111,7 @@ You can also subscribe to the swig-user mailing list by visiting the page
@@ -125,7 +125,7 @@ about this can be obtained at:
@@ -357,7 +357,7 @@ Note:
If you checked the code out via Git, you will have to run ./autogen.sh
before ./configure. In addition, a full build of SWIG requires
a number of packages to be installed. Full instructions at
-SWIG bleeding edge.
+SWIG bleeding edge.
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index 0496299eb..c1cc1796d 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -3504,7 +3504,7 @@ The insert code can be seen at the start of the generated .py file:
diff --git a/Doc/Manual/Windows.html b/Doc/Manual/Windows.html
index c822d2ca3..e55077893 100644
--- a/Doc/Manual/Windows.html
+++ b/Doc/Manual/Windows.html
@@ -60,7 +60,7 @@ Usage within the Unix like environments MinGW and Cygwin is also detailed.
SWIG does not come with the usual Windows type installation program, however it is quite easy to get started. The main steps are:
The step by step instructions to download and install MinGW and MSYS, then download and build the latest version of SWIG from Github follow...
-Note that the instructions for obtaining SWIG from Github are also online at SWIG Bleeding Edge.
+Note that the instructions for obtaining SWIG from Github are also online at SWIG Bleeding Edge.
diff --git a/Examples/go/index.html b/Examples/go/index.html
index 370424c54..b8af100ff 100644
--- a/Examples/go/index.html
+++ b/Examples/go/index.html
@@ -94,6 +94,6 @@ All of the examples were last tested with the following configuration
Your mileage may vary. If you experience a problem, please let us know by
-contacting us on the mailing lists.
+contacting us on the mailing lists.
+struct FinalDerivedStruct final : BaseStruct {
+ virtual void ab() const override;
+};
+7.2.12 Null pointer constant
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index a308d53c2..091293016 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -592,6 +592,7 @@ CPP11_TEST_CASES += \
cpp11_director_enums \
cpp11_directors \
cpp11_explicit_conversion_operators \
+ cpp11_final_class \
cpp11_final_directors \
cpp11_final_override \
cpp11_function_objects \
@@ -755,6 +756,7 @@ C_TEST_CASES += \
enum_macro \
enum_missing \
extern_declaration \
+ final_c \
funcptr \
function_typedef \
global_functions \
diff --git a/Examples/test-suite/cpp11_final_class.i b/Examples/test-suite/cpp11_final_class.i
new file mode 100644
index 000000000..e6a29e988
--- /dev/null
+++ b/Examples/test-suite/cpp11_final_class.i
@@ -0,0 +1,129 @@
+%module cpp11_final_class
+
+%warnfilter(SWIGWARN_PARSE_KEYWORD) final; // 'final' is a java keyword, renaming to '_final'
+%warnfilter(SWIGWARN_PARSE_KEYWORD) override; // 'override' is a C# keyword, renaming to '_override'
+
+%ignore Space1::final::operator=;
+#if defined(SWIGPHP)
+%rename(Space1_final) Space1::final::final;
+#endif
+#if defined(SWIGOCAML)
+%rename(finale) Space2::FinalEnum1::final;
+#endif
+
+%inline %{
+struct FinalBase {
+ virtual ~FinalBase() {}
+};
+
+struct FinalClass1 final : FinalBase {
+ void method1() {}
+};
+
+class FinalClass2 final : public FinalBase {
+public:
+ void method2() {}
+};
+
+struct FinalClass3 final {
+ void method3() {}
+};
+
+struct FinalClass4 {
+ void method4() {}
+} final;
+
+struct override final {
+ void omethod() {}
+};
+%}
+
+%rename(Space1_final) Space1::final;
+
+%inline %{
+namespace Space1 {
+struct final final {
+ void finalmethod() {}
+ final() {}
+ final(const final &other) = default;
+ final& operator=(const final &other) = default;
+};
+struct FinalClass5 final {
+ void method5() {}
+ final final_member_var;
+ final get_final_member() { return final_member_var; }
+ Space1::final get_final_member2() { return final_member_var; }
+};
+struct FinalClass6 {
+ void method6() {}
+ virtual void final() final {}
+ virtual ~FinalClass6() = default;
+};
+typedef final Space1_final_typedef1;
+typedef struct final Space1_final_typedef2;
+}
+typedef Space1::final Space1_final_typedef3;
+typedef struct Space1::final Space1_final_typedef4;
+%}
+
+%inline %{
+namespace Space2 {
+class Y {
+public:
+ Y(int i=0) {}
+};
+
+struct FinalVar1 {
+ class Y notfinal;
+// class Y final; // SWIG (C++ only) fails to parse (same for struct and union)
+};
+struct FinalVar2 {
+ class Y notfinal = {};
+// class Y final = {}; // SWIG (C++ only) fails to parse (same for struct and union)
+};
+struct FinalVar3 {
+ class Y notfinal = Y();
+// class Y final = Y(); // SWIG (C++ only) fails to parse (same for struct and union)
+};
+struct FinalVar4 {
+ class Y* final;
+ FinalVar4() : final() {}
+};
+struct FinalVar5 {
+ Y final;
+};
+struct FinalVar6 {
+ Y final = {};
+};
+struct FinalVar7 {
+ Y final = Y();
+};
+struct FinalVar8 {
+ Y final{};
+};
+struct FinalVar9 {
+ Y final{9};
+};
+struct FinalVar10 {
+ void a10(class Y final) {}
+ void b10(Y final) {}
+};
+struct FinalEnum1 {
+ enum Enum1 { one, two, final };
+ void enum_in(Enum1 e) {}
+};
+struct FinalEnum2 {
+ enum Enum2 { one, two, three, four };
+ enum Enum2 final;
+};
+}
+%}
+
+%rename(Space3_final) Space3::final;
+%inline %{
+namespace Space3 {
+ typedef struct final {
+ void fmethod() {}
+ } final;
+}
+%}
diff --git a/Examples/test-suite/cpp11_final_override.i b/Examples/test-suite/cpp11_final_override.i
index 849655b16..ac14326e5 100644
--- a/Examples/test-suite/cpp11_final_override.i
+++ b/Examples/test-suite/cpp11_final_override.i
@@ -27,7 +27,7 @@ struct Base {
virtual ~Base() {}
};
-struct Derived /*final*/ : Base {
+struct Derived final : Base {
virtual void stuff() const noexcept override final {}
virtual void override1() const noexcept override;
virtual void override2() const noexcept override;
diff --git a/Examples/test-suite/final_c.i b/Examples/test-suite/final_c.i
new file mode 100644
index 000000000..448d08d1e
--- /dev/null
+++ b/Examples/test-suite/final_c.i
@@ -0,0 +1,11 @@
+%module final_c
+
+%inline %{
+struct Y {
+ int yval;
+};
+struct Y final;
+void init() {
+ final.yval = 123;
+}
+%}
diff --git a/Examples/test-suite/python/cpp11_final_class_runme.py b/Examples/test-suite/python/cpp11_final_class_runme.py
new file mode 100644
index 000000000..568a1ca1a
--- /dev/null
+++ b/Examples/test-suite/python/cpp11_final_class_runme.py
@@ -0,0 +1,62 @@
+from cpp11_final_class import *
+
+fc1 = FinalClass1()
+fc1.method1()
+
+fc2 = FinalClass2()
+fc2.method2()
+
+fc3 = FinalClass3()
+fc3.method3()
+
+fc4 = FinalClass4()
+fc4.method4()
+fc4final = cvar.final
+cvar.final.method4()
+
+fc5 = FinalClass5()
+fc5.method5()
+fc5.final_member_var.finalmethod()
+fc5final = fc5.get_final_member()
+fc5final.finalmethod()
+fc5final = fc5.get_final_member2()
+fc5final.finalmethod()
+
+fc6 = FinalClass6()
+fc6.method6()
+fc6.final()
+
+o = override()
+o.omethod();
+
+y = Y()
+fv4 = FinalVar4()
+yy = fv4.final
+
+fv5 = FinalVar5()
+yy = fv5.final
+
+fv6 = FinalVar6()
+yy = fv6.final
+
+fv7 = FinalVar7()
+yy = fv7.final
+
+fv8 = FinalVar8()
+yy = fv8.final
+
+fv9 = FinalVar9()
+yy = fv9.final
+
+fv10 = FinalVar10()
+fv10.a10(y)
+fv10.b10(y)
+
+fe1 = FinalEnum1()
+fe1.enum_in(FinalEnum1.final)
+
+fe2 = FinalEnum2()
+fe2f = fe2.final
+
+s3f = Space3_final()
+s3f.fmethod();
diff --git a/Examples/test-suite/python/final_c_runme.py b/Examples/test-suite/python/final_c_runme.py
new file mode 100644
index 000000000..9ef4ded62
--- /dev/null
+++ b/Examples/test-suite/python/final_c_runme.py
@@ -0,0 +1,6 @@
+import final_c
+
+final_c.init()
+f = final_c.cvar.final
+if (f.yval != 123):
+ raise RuntimeError("f.yval fail")
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index d9c00809b..16ccb1249 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -13,14 +13,14 @@
* some point. Beware.
* ----------------------------------------------------------------------------- */
-/* There are 6 known shift-reduce conflicts in this file, fail compilation if any
- more are introduced.
+/* There are a small number of known shift-reduce conflicts in this file, fail
+ compilation if any more are introduced.
Please don't increase the number of the conflicts if at all possible. And if
you really have no choice but to do it, make sure you clearly document each
new conflict in this file.
*/
-%expect 6
+%expect 7
%{
#define yylex yylex
@@ -1716,6 +1716,7 @@ static String *add_qualifier_to_declarator(SwigType *type, SwigType *qualifier)
%type
*
diff --git a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java
index 56272bf84..80087c65a 100644
--- a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java
+++ b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java
@@ -81,7 +81,7 @@ public class doxygen_translate_all_tags_runme {
" If not: SOMECONDITION {\n" +
" This is printed if not \n" +
" }\n" +
- "
\n" +
+ "
\n" +
" Some text \n" +
" describing invariant. \n");
diff --git a/Examples/test-suite/java/doxygen_translate_runme.java b/Examples/test-suite/java/doxygen_translate_runme.java
index b049a6466..c55c95150 100644
--- a/Examples/test-suite/java/doxygen_translate_runme.java
+++ b/Examples/test-suite/java/doxygen_translate_runme.java
@@ -69,7 +69,8 @@ public class doxygen_translate_runme {
" This is printed if not}\n" +
" \n" +
" \n" +
- "
\n" +
+ "
\n" +
+ " \n" +
" \n" +
"
\n" +
" \n" +
diff --git a/Examples/test-suite/python/doxygen_translate_runme.py b/Examples/test-suite/python/doxygen_translate_runme.py
index 38dca2ef9..a62df4a1d 100644
--- a/Examples/test-suite/python/doxygen_translate_runme.py
+++ b/Examples/test-suite/python/doxygen_translate_runme.py
@@ -58,6 +58,7 @@ If not: SOMECONDITION {
}
Image: testImage.bmp("Hello, world!")
+Image: "test image.jpg"("Test jpeg")
diff --git a/Source/Doxygen/javadoc.cxx b/Source/Doxygen/javadoc.cxx
index eafa57317..9f9f2e8e7 100644
--- a/Source/Doxygen/javadoc.cxx
+++ b/Source/Doxygen/javadoc.cxx
@@ -463,7 +463,11 @@ void JavaDocConverter::handleTagImage(DoxygenEntity &tag, std::string &translate
if (it != tag.entityList.end())
title = it->data;
- translatedComment += "
= 2 && file[0] == '"' && file[file.size() - 1] == '"')
translatedComment += file;
else
translatedComment += "\"" + file + "\"";
From 6f3f4fbdf163cef537960620e48190f36ad2c08b Mon Sep 17 00:00:00 2001
From: Olly Betts
31.2.7 Compiling for 64-bit platforms
diff --git a/Doc/Manual/Preface.html b/Doc/Manual/Preface.html
index 41f21d48d..9bb8bcb99 100644
--- a/Doc/Manual/Preface.html
+++ b/Doc/Manual/Preface.html
@@ -80,7 +80,7 @@ Some target languages were disabled as part of a clean up and others were given
-# This file was automatically generated by SWIG (http://www.swig.org).
+# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.0.0
#
# Do not make changes to this file unless you know what you are doing--modify
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index e3e11841d..bc4e9ad60 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -3664,8 +3664,8 @@ In the process of building an interface, SWIG may encounter syntax errors or
other problems. The best way to deal with this is to simply copy the offending
code into a separate interface file and edit it. However, the SWIG developers
have worked very hard to improve the SWIG parser--you should report parsing errors
-to the swig-devel mailing list or to the
-SWIG bug tracker.
+to the swig-devel mailing list or to the
+SWIG bug tracker.
5.7.2 The SWIG interface file
diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html
index 820c5088b..b4b9acb17 100644
--- a/Doc/Manual/SWIGPlus.html
+++ b/Doc/Manual/SWIGPlus.html
@@ -2147,7 +2147,7 @@ This error means that the target language module supports overloading,
but for some reason there is no type-checking rule that can be used to
generate a working dispatch function. The resulting behavior is then
undefined. You should report this as a bug to the
-SWIG bug tracking database
+SWIG bug tracking database
if this is due to one of the typemaps supplied with SWIG.
@@ -2324,7 +2324,7 @@ members (of all classes):
Note: the *:: syntax is non-standard C++, but the '*' is meant to be a
wildcard that matches any class name (we couldn't think of a better
alternative so if you have a better idea, send email to
-the swig-devel mailing list.
+the swig-devel mailing list.
-
@@ -370,7 +370,7 @@ The short abbreviated instructions follow...