Commit graph

1,850 commits

Author SHA1 Message Date
William S Fulton
cdf9a18603 Document improved variadic template support 2022-12-22 21:23:44 +00:00
William S Fulton
67c4c2186c Support multiple arguments in variadic templates.
Remove warning SWIGWARN_CPP11_VARIADIC_TEMPLATE which was issued if more
than one argument was used for a variadic template.

SwigType enhancement: 'v.' now represents a variadic argument.
2022-12-22 21:23:39 +00:00
William S Fulton
2a1711e436 Slightly better decltype() support for expressions
decltype now accepts C++ expressions instead of just an ID, such as:

  int i,j;
  ...  decltype(i+j) ...
  ...  decltype(&i) ...

These result in a warning for non-trivial expressions which SWIG cannot evaluate:

  Warning 344: Unable to deduce decltype for 'i+j'.

See 'Type Inference' in CPlusPlus.html for workarounds.

Issue #1589
Issue #1590
2022-11-26 01:16:20 +00:00
William S Fulton
5a8d58c3a7 Merge branch 'rtests2'
* rtests2:
  more r tests
  more r tests
  added testcase pointer_reference
  [PHP] Update docs for removal of -noproxy in SWIG 4.1.0

Conflicts:
	CHANGES.current
2022-11-23 21:12:07 +00:00
William S Fulton
eef3de6574 Variadic template docs correction 2022-11-23 20:39:24 +00:00
William S Fulton
4729cf2b1f Duplicate class template instantiations via %template changes
Named duplicate class template instantiations now issue a warning and are ignored.
Duplicate empty class template instantiations are quietly ignored.

The test cases are fixed for this new behaviour.

This commit is a pre-requisite for the near future so that the Python
builtin wrappers can correctly use the SwigType_namestr function without
generating duplicate symbol names.
2022-11-18 19:35:47 +00:00
Olly Betts
f1f77c218f [PHP] Update docs for removal of -noproxy in SWIG 4.1.0
Closes #2419
2022-11-13 15:23:42 +13:00
William S Fulton
fe2d781b42 Bump version to 4.2.0 and migrate CHANGES to CHANGES.current 2022-11-04 20:09:13 +00:00
William S Fulton
c9dcd0ee78 Add SWIG-4.1.0 release date 2022-10-24 19:47:03 +01:00
William S Fulton
1c70dbdb6c Bump doc version to SWIG-4.1 2022-10-15 00:28:09 +01:00
William S Fulton
7be1217d3e Allow wkhtmltopdf to access current directory
Fix for version 0.12.6, see https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4536
2022-10-15 00:28:04 +01:00
William S Fulton
54497fce49 html fixes 2022-10-14 08:45:38 +01:00
William S Fulton
f13de56e5f Revert "[xml] Move to "Experimental" target language status"
This reverts commit 22a4355f34.

Conflicts:
	CHANGES.current
	RELEASENOTES
2022-10-13 21:14:44 +01:00
Olly Betts
abf5c8a357 [python] Remove doc caveat for Python < 2.1
The minimum version we now support is Python 2.7.
2022-10-11 10:30:37 +13:00
Olly Betts
87a677b8b3 Fix doc typos 2022-10-11 10:30:33 +13:00
William S Fulton
cea25abca5 Completely remove CFFI
No meaningful progress to update CFFI to experimental status
has been made since CFFI was disabled in SWIG-4.0.0 as the first
stage to removal. This commit is the final stage to remove it.

See issue #1966 for an attempt at updating CFFI to experimental
status. Anyone wishing for SWIG to support CFFI again might
want to utilise this work.
2022-10-06 23:29:33 +01:00
Olly Betts
37c8185bd3 Replace reference to SWIG_POINTER_EXCEPTION in docs
This has only been present for backward compatibility since 2006
and now has the value 0 so doesn't do anything, so don't use it
as an example of a flag in the docs.
2022-10-06 18:06:36 +13:00
Olly Betts
5fb5c5f74d Update mingw links
The mingw.org domain is no longer associated with the project, and
they've also moved from sourceforge to osdn.
2022-10-06 13:46:12 +13:00
Olly Betts
a71234b25d Use https for links in docs where supported 2022-10-06 13:41:21 +13:00
Olly Betts
631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
William S Fulton
ba279ae939 Add support for parsing C++11 final classes
Such as:

  class X final {};

This no longer gives a syntax error.
This change has introduced one more shift-reduce conflict in the parser.
with a conflict with a C style variable declaration with name final:

  class X final;

resulting in a syntax error (for C++ not C). This is an an unusual style
for C++ code and more typical declarations do work:

  X final;

Closes #672
2022-10-05 22:42:17 +01:00
Olly Betts
06296a7128 Report errors in preprocessor expressions by default
Until now SWIG quietly ignored such errors unless -Wextra (or -Wall
which implies -Wextra) was passed, but this is unhelpful as it hides
problems.  To illustrate this point, enabling this warning by
default revealled a typo in the preproc_defined.i testcase in
SWIG's own testsuite.

If you really don't want to see this warning, you can suppress it
with command line option -w202 or by using this in your interface
file:

%warnfilter(SWIGWARN_PP_EVALUATION);

Both will work with older versions of SWIG too.

Fixes #1465
Fixes #2389
2022-10-05 17:07:06 +13:00
Olly Betts
befcd1bf58 Fix SWIG version reference in recent doc change
The upcoming release is 4.1.0 not 4.2.0.
2022-10-05 13:48:21 +13:00
Olly Betts
3096e8aa00 Fix doc typo 2022-10-05 12:41:34 +13:00
Olly Betts
4ac3c87a29 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
2022-10-05 12:40:15 +13:00
William S Fulton
28202a0e27
Merge pull request #2249 from geographika/pcre-nuget
Update Windows CMake builds to use NuGet package for PCRE2
2022-09-30 23:43:45 +01:00
William S Fulton
77b08daca7 Add DohSortedKeys function
Returns a list of sorted keys in a DOH Hash.
2022-09-30 22:48:04 +01:00
Olly Betts
3bf1da4298 Fix a few documentation typos 2022-09-29 18:17:32 +13:00
Olly Betts
9a4dea06c8 [php] Add php:allowdynamicproperties feature
This follows PHP 8.2 deprecating dynamic features.

The new feature also provides a clean way to fix the remaining PHP
test case failure under PHP 8.2.
2022-09-29 18:16:51 +13:00
sethg
e45d8d0efd Split build and install 2022-09-27 15:02:58 +02:00
sethg
95d255e16e Switch Action and docs to use PowerShell 2022-09-27 09:48:19 +02:00
Markus Friedrich
d1b7765838 Extended the documentation for octave operator overloading
Octave has more operators than C++. These operators can be overloaded for
the type swig_ref using the standard Octave Object Oriented Programming mechanism.
This is now added to the documentation.
2022-09-18 20:19:39 +02:00
William S Fulton
dad7c93ca0 Provide SWIGTYPE MOVE typemaps in swigmove.i
For implementing full move semantics when passing parameters by value.
Based on SWIGTYPE && and std::unique_ptr typemaps which implement move
semantics.

Added for all languages, but untested for: Go, Ocaml, R, Scilab (and
unlikely to be fully functional for same reasons as for std::unique_ptr
support).

Issue #999
2022-09-16 08:36:25 +01:00
William S Fulton
2212af3f4f rvalue reference outputs
Document rvalue reference outputs behaviour
Test rvalue reference outputs
2022-09-08 08:46:32 +01:00
William S Fulton
0b1d3e3e86 Docs on rvalue parameter changes 2022-09-02 08:24:30 +01:00
William S Fulton
ca9eebcb8d Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []
SWIG has always marshalled the null matrix into a NULL pointer; this remains
and now we have consistency in representing a NULL pointer.

This is a pre-requisite for a pending commit to fully support std::unique_ptr.
2022-08-31 19:40:13 +01:00
William S Fulton
c10a84c775 Cosmetic stray semi-colon removal after %typemap using quotes 2022-08-31 19:40:13 +01:00
William S Fulton
ec965840ce Cosmetic stray semi-colon removal after %typemap 2022-08-20 15:29:49 +01:00
William S Fulton
1f2338bf41 Typo fix in Go.html 2022-08-11 07:20:04 +01:00
Olly Betts
6bf2138fa0 [guile] Update status of Guile 1.8.0 support
See #1624
2022-08-05 10:21:20 +12:00
William S Fulton
c16d25d9d6 Update docs regarding 'modern' c++ standards testing 2022-08-04 09:03:32 +01:00
Olly Betts
fd0a47fee8 [guile] Update supported guile versions in docs
Document that Guile 2.2.x and 3.0.x work.

Document that Guile 1.8.x is believed to still work, but that we're
no longer able to easily test this.
2022-08-04 10:40:10 +12:00
William S Fulton
3bc754da10 html corrections 2022-07-30 17:42:44 +01:00
William S Fulton
d93a8c2db8 Minor editing of C++20 docs 2022-07-30 17:41:13 +01:00
Olly Betts
64d72483c6 Clean up Tcl version docs and handling
We require 8.4 now which simplifies things a bit.
2022-07-28 14:30:43 +12:00
Olly Betts
848cb3f95e Document lack of separate ISO C tag namespace
This is a long-standing limitation, but only seems to have been reported
once back in 2004.

Nobody's cared enough to address it in 18 years, but we can at least
document it in the manual rather than only in a source code comment in
Source/Swig/symbol.c.

Addresses https://sourceforge.net/p/swig/bugs/429/
2022-07-28 07:06:00 +12:00
Olly Betts
8182740b8e Add documentation 2022-07-27 09:36:27 +12:00
Olly Betts
02b4bd8eca Fix spaceship operator bugs, document, add tests
Remove some erroneously added brackets_increment() calls.

Reject <=> in preprocessor expressions with a clear error message (it
seems it isn't supported here - clang and gcc don't at least).

The type returned by `<=>` is not `bool`.  We pretend it's
`int` for now, which should work for how it's likely to be used
in constant expressions.

Fixes #1622
2022-07-27 09:12:40 +12:00
Olly Betts
06d375cdab [Tcl] Fix handling of long long on 32-bit platforms
Fixes https://sourceforge.net/p/swig/bugs/977/ reported by Vera and
Kjell Wooding.

Closes #2331
2022-07-27 07:53:45 +12:00
William S Fulton
8b654afdef Merge branch 'unique_ptr-inputs'
* unique_ptr-inputs:
  std::unique_ptr std::auto_ptr tidyup
  Add support for std::auto_ptr inputs
  Cosmetic formatting and doc updates in std_unique_ptr.i files
  Add Perl support for std::unique_ptr inputs
  Add Ruby support for std::unique_ptr inputs
  Add Python support for std::unique_ptr inputs
  Add C# support std::unique_ptr inputs
  Java unique_ptr test ownership enhancement to test
  Java unique_ptr enhance test for double release
  SWIGTYPE && input typemaps now assume object has been moved
  Add Java support for std::unique<T> for input parameters.

Closes #692

Conflicts:
	CHANGES.current
2022-07-19 20:26:18 +01:00