Commit graph

22,990 commits

Author SHA1 Message Date
Olly Betts
239ffe4b5b [ci] Add testing for guile 2.2 and 3.0 2022-08-04 10:35:33 +12:00
William S Fulton
2ccc9bd060 Add Octave support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
2022-08-02 00:00:54 +01:00
William S Fulton
1730e4126e GHA: Start testing python-3.11 2022-08-01 08:30:28 +01:00
William S Fulton
1d56bc6b85 Add initialisers for additional members in PyHeapTypeObject
(builtin mode) for Python-3.11 - _ht_tpname, _spec_cache.
2022-08-01 08:24:52 +01:00
William S Fulton
54e7bb606e Correct c17 testing with C++20 2022-07-31 22:23:39 +01:00
William S Fulton
89f57708e9 Suppress -Wvolatile gcc warnings in Perl headers for C++20
Seen in Perl 5.34 and earlier
2022-07-31 16:45:31 +01:00
William S Fulton
e0ed4cc62d Suppress -Wvolatile gcc warnings in Guile wrappers for C++20 2022-07-31 16:18:08 +01:00
William S Fulton
ac8864bc59 ruby 2022-07-31 16:15:00 +01:00
William S Fulton
d9fd09aa21 Suppress Ruby.h gcc warnings 2022-07-31 14:51:26 +01:00
William S Fulton
ae4642d4bb GHA: Test C17 with C++20 2022-07-31 09:08:40 +01:00
William S Fulton
842ae379aa GHA: Fix for pycodestyle check in examples
E275 missing whitespace after keyword
For pycodestyle 2.9.0 released on 30 July 2022.
2022-07-31 09:02:00 +01:00
William S Fulton
3fa8e1f38f Visual C++ warning fix
conversion from '__int64' to 'long', possible loss of data
2022-07-31 01:02:08 +01:00
William S Fulton
4e234c7604 Suppress Visual C++ deprecated warnings 2022-07-31 01:02:08 +01:00
William S Fulton
ea3570ddb1 -Wvolatile gcc warning fix for C++20 2022-07-31 01:02:08 +01:00
William S Fulton
ffbde7a132 Fixes for deprecated std::basic_string::reserve() 2022-07-31 01:02:08 +01:00
William S Fulton
675c94c575 Add in EXTRA_CFLAGS and EXTRA_CXXFLAGS for more flexible test-suite testing 2022-07-31 01:02:08 +01:00
William S Fulton
590de1642e MS_WIN64 no longer needed on Appveyor MinGW for Python
Not sure why - 64bit must be default now.
Fixes Appveyor and Python C++20 tests as the -std=c++20 flags were
not being passed to the compiler.
2022-07-31 01:02:08 +01:00
William S Fulton
db854dcef4 GHA: Python is already installed 2022-07-31 00:58:35 +01:00
William S Fulton
eb8346b958 Convert cpp20_spaceship_operator php test to python 2022-07-31 00:58:35 +01:00
William S Fulton
4a8447d503 Add c++-20 testing on experimental GHA Ubuntu 22.04 2022-07-31 00:58:22 +01:00
William S Fulton
c1bfda210f Fix configure messages when C++20 is not available 2022-07-31 00:42:08 +01: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
William S Fulton
26fbf99901 Add Tcl support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
2022-07-30 16:43:05 +01:00
Olly Betts
dce4254377 [php] Fix handling of friend functions
We were incorrectly considering them as methods of the class they
are a friend of for the purposes of calculate PHP type declarations.
2022-07-29 16:37:22 +12:00
Olly Betts
379d5b6742 Fix warning suppression in cpp20_lambda_template 2022-07-29 16:29:32 +12: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
8cc3d04a35 [perl] Note in -help that -proxy is on by default 2022-07-28 10:23:54 +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
346ede21c3 Fix spaceship preproc tests for previous change 2022-07-27 18:17:31 +12:00
Olly Betts
100d4d5350 Only recognise spaceship operator for C++
I don't think any valid C program can contain `<=>` in a tokenisable
context, but it's more helpful to fail with a syntax error at SWIG
parse time and not potentially generate C code trying to use `<=>` in
an expression which then fails at compile time.
2022-07-27 13:46:53 +12:00
Olly Betts
54ddefe410 Revert "Modify fix for << in array size"
This reverts commit 0ff9a0959a.

The modified fix breaks Java and C#, where C constant expressions
get used in the generated target language code in some cases.

Revert this fix for now.
2022-07-27 13:45:08 +12:00
Olly Betts
6e931b0399 Revert "Fix handling of array whose size contains <<"
This reverts commit 2227dc9e53.
2022-07-27 13:45:03 +12:00
Olly Betts
0ff9a0959a Modify fix for << in array size
The previous fix broke testcase arrays for Go.
2022-07-27 12:25:27 +12:00
Olly Betts
2227dc9e53 Fix handling of array whose size contains <<
Fixes https://sourceforge.net/p/swig/bugs/983/
2022-07-27 10:29:33 +12:00
Olly Betts
24ec116742 Merge branch 'cpp20-template-lambdas'
Fixes #1678
2022-07-27 09:36:42 +12:00
Olly Betts
8182740b8e Add documentation 2022-07-27 09:36:27 +12:00
Olly Betts
88f227b5da Add testcase 2022-07-27 09:30:39 +12:00
Olly Betts
e31de2aebb Tidy up indentation 2022-07-27 09:30:30 +12:00
Zackery Spytz
61928bd882 Add support for C++20 "templated" lambdas
Such as `auto lambda = []<typename T>(std::vector<T> t){};`
2022-07-27 09:15:32 +12:00
Olly Betts
4c14dc7010 Merge branch 'spaceship' 2022-07-27 09:12:47 +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
Zackery Spytz
cb887ed2d4 Add support for the <=> operator (C++20) 2022-07-27 09:12:40 +12:00
Olly Betts
36310c04e5 Add comments to clarify how #define gets wrapped
It took me a while to fully get my head around this, and I'd like to
help out future developers.
2022-07-27 09:10:51 +12:00
Olly Betts
b57248cc1a [php] Add parentheses around $value when casting
In some cases $value can be an expression without parentheses around
it, and we want to cast the result of the whole expression.
2022-07-27 08:49:15 +12:00
Olly Betts
a80e748565 [php] Add missing qualification in test suite helper
This would cause an error due to failing to find the function to
call if certain testcase checks failed.

Bug introduced in eaf311a650
2022-07-27 08:47:53 +12:00
Olly Betts
8c5c14b9ad Merge branch 'cpp-testing'
Closes #2329
2022-07-27 07:55:24 +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
Olly Betts
4f44d0a1ea Attempt to fix cpp11_result_of for MSVC
MSVC fails with:

cpp11_result_of_wrap.cxx(3211): error C2672: 'test_result_impl': no matching overloaded function found
cpp11_result_of_wrap.cxx(3211): error C2893: Failed to specialize function template 'std::result_of<Fun(Arg)>::type test_result_impl(Fun,Arg)'
cpp11_result_of_wrap.cxx(3150): note: see declaration of 'test_result_impl'
cpp11_result_of_wrap.cxx(3211): note: With the following template arguments:
cpp11_result_of_wrap.cxx(3211): note: 'Fun=double (__cdecl *)(double)'
cpp11_result_of_wrap.cxx(3211): note: 'Arg=int'

Try making the second parameter double to match the template.
2022-07-26 15:28:52 +12:00
Olly Betts
4a15f3934d Fix MSVC error in nested_class.i
MSVC now fails with:

error C4596: 'foo': illegal qualified name in member declaration

Such redundant qualification is invalid.  Compilers used to be
permissive here (so it's useful for SWIG to handle it), but compilers
increasingly complain about it so adjust the testcase to show the
compiler a valid version, and only test the redundant qualification
with SWIG.
2022-07-26 15:28:51 +12:00