summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'arbitrary-decltype-expressions'HEADmasterOlly Betts2023-05-183-17/+42
|\
| * Add CHANGES.current entryOlly Betts2023-05-181-0/+8
| |
| * Update comment wrt #1589Olly Betts2023-05-181-1/+1
| |
| * Support parsing arbitrary expression in decltypeOlly Betts2023-05-172-16/+33
| | | | | | | | | | | | | | | | | | | | Use parser error recovery to skip to the closing matching `)` and issue a warning that we can't deduce the decltype for the expression (like we already do for any expression which isn't a simple variable or similar). Fixes #1589 Helps #2335 (fixes the decltype-related examples)
* | More maintainable warning messageWilliam S Fulton2023-05-171-2/+2
| |
* | Simplify grammar rules for alternative start symbolsOlly Betts2023-05-181-8/+8
|/ | | | | | We have some rules to allow parsing just a type, parameter or parameter list. Instead of using a semicolon as an end marker for these, just use the special END token which always marks the end of input.
* Remove obsolete debug line from callback_runme.pyOlly Betts2023-05-171-1/+0
| | | | We stopped wrapping C++ static method A::bar as A_bar in SWIG 4.1.0.
* [tcl] Add string_view supportOlly Betts2023-05-175-2/+55
| | | | See #1567
* Use Putc instead of Append on a temp 1 or 2 char stringOlly Betts2023-05-161-17/+6
| | | | Easier to read code and probably a little more efficient.
* Document what c_spaceship.i is testingOlly Betts2023-05-161-1/+1
|
* Improve docs for Scanner_skip_balanced() return valueOlly Betts2023-05-162-1/+3
|
* Clean up double spaces between words in commentsOlly Betts2023-05-168-12/+12
|
* Emit extra message for missing typecheck typemapOlly Betts2023-05-161-0/+6
| | | | | | This has been reported too many times (#2404 #2528 #2581 recently) so explain that this may break dispatch and link to the relevant documentation.
* Use strchr/Strchr for single character searchesOlly Betts2023-05-156-13/+13
| | | | | | | | | | | This can be more efficient than using strstr/Strstr with a single character search string. GCC is able to optimise strstr() with a single character literal search string to strchr(), but clang doesn't, and likely no compiler can for Strstr() (unless some sort of inter-object optimisation such as LTO is used) since the literal string is in a different source file to the strstr() call.
* Add %rename to %pythoncode exampleOlly Betts2023-05-151-1/+7
| | | | | | | | | | Without this you get two set_transform() functions defined in the .py file, which can trigger warnings from linting tools. Renaming the SWIG-generated wrapper is a reasonably clean solution (though does leave an unused _set_transform() Python function). See #2578
* Add CHANGES.current entryOlly Betts2023-05-121-0/+3
|
* Merge branch 'JS-check-fix'Olly Betts2023-05-1213-1/+695
|\
| * Add li_constraints test, testing 'constraints.i'.Erez Geva2023-05-1212-1/+663
| | | | | | | | | | | | For: JavaScript, C#, go, Java, Lua, Perl, PHP, python, Ruby, TCL and Octave. Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
| * support check typemaps in JSMomtchil Momtchev2023-05-111-0/+32
| |
* | Expand li_std_string_runme.*Olly Betts2023-05-1210-10/+102
|/ | | | | Add testing of the empty and null cases for all languages which already have a runme.
* [java] Suppress removal warnings for finalize()Olly Betts2023-05-124-3/+9
| | | | | | | | | The "deprecation" warning has been changed to a "removal" warning with newer JDK versions. This needs to be addressed, but meanwhile it makes running the testsuite unusably noisy so suppressing it seems more helpful than not. Closes: #2556
* Fix SWIG warning from testcase cpp11_constexprOlly Betts2023-05-111-0/+3
| | | | Introduced by previous commit.
* Parse storage class more flexiblyOlly Betts2023-05-1111-62/+170
| | | | | | | | | | | | | | Previously we had a hard-coded list of allowed combinations in the grammar, but this suffers from combinatorial explosion, and results in a vague `Syntax error in input` error for invalid (and missing) combinations. This means we now support a number of cases which are valid C++ but weren't supported. Fixes #302 Fixes #2079 (friend constexpr) Fixes #2474 (virtual explicit)
* [doc] Fix SWIG_AsCharPtrAndSize arg typesOlly Betts2023-05-091-1/+1
|
* Initial support for std::string_viewOlly Betts2023-05-0818-11/+994
| | | | | | | So far C#, Java, Lua and PHP are supported. Closes: #2540 See #1567
* Removed unused default parameter valueOlly Betts2023-05-081-1/+1
|
* [PHP] Wrap method with both static and non-static overloadsOlly Betts2023-05-083-1/+45
| | | | | | | | | | | We now wrap this as a non-static method in PHP, which means the static form only callable via an object. Previously this case could end up wrapped as static or non-static in PHP. If it was wrapped as static, attempting to call non-static overloaded forms would crash with a segmentation fault. See #2544
* Tweak to struct name in testcase for RWilliam S Fulton2023-05-062-3/+3
|
* Merge branch 'typedef-namespace'William S Fulton2023-05-065-3/+41
|\ | | | | | | | | | | | | | | | | | | * typedef-namespace: Partial revert of previous commit for typedefs add an unit test tentative fix for typedef/using declaration to struct typedef Conflicts: CHANGES.current
| * Partial revert of previous commit for typedefsWilliam S Fulton2023-05-066-17/+25
| | | | | | | | | | | | | | | | | | | | Setting current symbol table for a typedef seems wrong. No difference to test-suite though. Testcase rename for C++11 testing and minor adjustments. Issue #2550 Closes #2551
| * add an unit testMomtchil Momtchev2023-05-062-0/+28
| |
| * tentative fix for typedef/using declaration to struct typedefMomtchil Momtchev2023-05-061-2/+4
| |
* | Add #366 reference to fix for #1037Olly Betts2023-05-061-2/+2
| |
* | Fix testcase comment typoOlly Betts2023-05-041-1/+1
| |
* | [D] Stop generating Examples/d/example.mkOlly Betts2023-05-042-2/+0
| | | | | | | | We no longer need to now we've dropped D1 support.
* | [D] Fix typo in -d2 option descriptionOlly Betts2023-05-041-1/+1
| |
* | [D] Update docs for D1 removalOlly Betts2023-05-047-13/+17
| |
* | Drop D version 1Erez Geva2023-05-0471-5047/+35
| | | | | | | | See #2538
* | Fix CHANGES.current factual errorOlly Betts2023-04-291-3/+4
| |
* | Fix typo: "temporal" which should be "temporary"Olly Betts2023-04-274-4/+4
| |
* | Allow using snprintf() instead of sprintf() in wrappersOlly Betts2023-04-2722-44/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We aim to produce code that works with C90 or C++98 so we can't assume snprintf() is available, but it almost always is (even on systems from before it was standardised) so having a way to use it is helpful. Enable this automatically if the compiler claims conformance with at least C90 or C++98 and check SWIG_HAVE_SNPRINTF to allow turning on manually, but disable if SWIG_NO_SNPRINTF if defined. The fallback is to call sprintf() without a buffer size check - checking after the call is really shutting the stable door after the horse has bolted, and most of our uses either have a fixed maximum possible size or dynamically allocate a buffer that's large enough. Fixes: #2502 (sprintf deprecation warnings on macos) Fixes: #2548
* | [Lua] Alternative SWIG_LUA_CONSTTAB_INT fixOlly Betts2023-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | SWIG_LUA_CONSTTAB_INT can be called with a constant expression containing commas (e.g. `SizeOf< int,int >::size`). This was addressed in b13f584258079dd88a4ca87412b87ac4464686df by making its second argument variadic, but (a) this doesn't work with our baseline of C90/C++98 and (b) the variadic syntax used is a GCC extension which doesn't work with all compilers (e.g. MSVC). We can solve this without needing variadic macros by simply wrapping this argument in an extra pair of parentheses when calling.
* | Revert "Lua variadic templates sizeof... constants fix"Olly Betts2023-04-271-2/+2
| | | | | | | | This reverts commit b13f584258079dd88a4ca87412b87ac4464686df.
* | Merge branch 'python-iterator-protocol'William S Fulton2023-04-2624-582/+149
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * python-iterator-protocol: Finish removal of SwigPySequence_Cont Remove undocumented and non-existent STL std::carray Remove assign method uses by the removed Python Sequence Protocol Remove now redundant use of Python Sequence protocol in STL wrappers Add support for all STL containers to be constructible from a Python set Iterator Protocol support for std::array wrappers STL support for copying Python objects supporting Iterator protocol Closes #2515 Conflicts: CHANGES.current
| * | Finish removal of SwigPySequence_ContWilliam S Fulton2023-04-261-13/+7
| | |
| * | Remove undocumented and non-existent STL std::carrayWilliam S Fulton2023-04-267-218/+0
| | |
| * | Remove assign method uses by the removed Python Sequence ProtocolWilliam S Fulton2023-04-2611-107/+0
| | |
| * | Remove now redundant use of Python Sequence protocol in STL wrappersWilliam S Fulton2023-04-262-252/+1
| | | | | | | | | | | | | | | | | | | | | | | | Removes SwigPySequence_Cont and support classes: SwigPySequence_ArrowProxy, SwigPySequence_Cont, SwigPySequence_Ref The recently added Iterator Protocol support should cover the Sequence Protocol usage for converting from Python containers to STL containers.
| * | Add support for all STL containers to be constructible from a Python setWilliam S Fulton2023-04-268-66/+120
| | |
| * | Iterator Protocol support for std::array wrappersWilliam S Fulton2023-04-262-33/+61
| | | | | | | | | | | | | | | Introduce swig::IteratorProtocol class and assign which can be partially specialized by different container types, such as std::array.