summaryrefslogtreecommitdiff
path: root/Examples
Commit message (Collapse)AuthorAgeFilesLines
* Update comment wrt #1589Olly Betts2023-05-181-1/+1
|
* Support parsing arbitrary expression in decltypeOlly Betts2023-05-171-5/+0
| | | | | | | | | | 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)
* 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-172-1/+36
| | | | See #1567
* Document what c_spaceship.i is testingOlly Betts2023-05-161-1/+1
|
* Clean up double spaces between words in commentsOlly Betts2023-05-164-4/+4
|
* Merge branch 'JS-check-fix'Olly Betts2023-05-1212-1/+663
|\
| * 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>
* | 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-122-2/+2
| | | | | | | | | 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-112-0/+9
| | | | | | | | | | | | | | 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)
* Initial support for std::string_viewOlly Betts2023-05-0810-0/+580
| | | | | | | So far C#, Java, Lua and PHP are supported. Closes: #2540 See #1567
* [PHP] Wrap method with both static and non-static overloadsOlly Betts2023-05-081-0/+18
| | | | | | | | | | | 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-063-0/+35
|\ | | | | | | | | | | | | | | | | | | * 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-064-12/+19
| | | | | | | | | | | | | | | | | | | | 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
| |
* | Fix testcase comment typoOlly Betts2023-05-041-1/+1
| |
* | [D] Update docs for D1 removalOlly Betts2023-05-042-5/+2
| |
* | Drop D version 1Erez Geva2023-05-0463-4575/+26
| | | | | | | | See #2538
* | Merge branch 'python-iterator-protocol'William S Fulton2023-04-268-100/+52
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Remove undocumented and non-existent STL std::carrayWilliam S Fulton2023-04-264-100/+0
| | |
| * | Add support for all STL containers to be constructible from a Python setWilliam S Fulton2023-04-264-0/+52
| | |
* | | Merge branch 'js-numinputs'Olly Betts2023-04-271-0/+24
|\ \ \
| * | | take into account numinputs when counting argumentsMomtchil Momtchev2023-04-261-0/+24
| | |/ | |/|
* | | catches_strings_runme.php: Check exact exception messageOlly Betts2023-04-241-2/+2
| | | | | | | | | | | | There's no need to do a substring check here.
* | | [php] Add throws typemaps for string* + const string*Olly Betts2023-04-241-0/+26
|/ /
* | [js] Stop using swig -c++ for C examplesOlly Betts2023-04-2322-27/+41
| |
* | [js] Improve default for JSENGINEOlly Betts2023-04-223-17/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the default was always "node", even if nodejs wasn't detected by configure. This leads to a confusing failure from "make check" if you have another support JS engine installed but not node. Now the default it picked based on which engines configure found. If only one was detected, that should be used. If multiple are, you can override the default choice by specifying e.g. ENGINE=jsc on the make command line. Fixes #2453
* | [js] Turn on C++ output for node tooOlly Betts2023-04-221-1/+1
| | | | | | | | | | | | | | | | | | Nodejs is like V8 and needs C++ output enabled when wrapping C code. The testsuite was masking this bug by using SWIG options `-v8 -DBUILDING_NODE_EXTENSION=1` rather than `-node` when testing with nodejs, while the javascript examples currently all seem to all get processed with -c++.
* | [perl,ruby] Test OUTPUT string& typemapOlly Betts2023-04-212-1/+5
| |
* | [lua] Test INPUT,INOUT,OUTPUT for std::string&Olly Betts2023-04-212-1/+7
| |
* | [php] Support INPUT,INOUT,OUTPUT for std::string&Olly Betts2023-04-212-2/+36
| | | | | | | | | | | | | | By default SWIG/PHP wraps std::string& as a pass-by-reference PHP string parameter, but sometimes such a parameter is only for input or only for output, so add support for the named typemaps that other target languages support.
* | [OCaml] Fix reference typemaps for std::stringZackery Spytz2023-04-214-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings in the extend_template_method, li_std_string, and template_methods tests. std::string was missing a typecheck typemap. Add extend_template_method_runme.ml, li_std_string_runme.ml, and template_methods_runme.ml. Add INPUT, OUTPUT and INOUT typemaps for string & Use the INOUT typemap in the strings_test example. In the strings_test example, takes_and_gives_std_string() was relying on the silly fact that an argout typemap for string & was enabled by default. Remove the in, out, and typecheck typemaps for string &. Closes: #1439
* | [ocaml] Use CXXFLAGS when compiling C++ testcasesOlly Betts2023-04-211-3/+3
| | | | | | | | Fixes failure for cpp20_spaceship_operator.
* | Fix #ifdef and #ifndef to work inside a %defineOlly Betts2023-04-211-0/+35
| | | | | | | | | | | | | | | | Previously they were silently ignored in this context (but #if defined already worked here if you need a workaround which works for older versions). Fixes #2183
* | Add regression test for << in array size bugOlly Betts2023-04-202-1/+5
| | | | | | | | | | | | | | Go is happy with the testcase if the type is changed from int to char, so just go with that. See https://sourceforge.net/p/swig/bugs/983/
* | Remove remaining traces of PHP7 supportOlly Betts2023-04-202-67/+34
| | | | | | | | | | The bulk of this was already removed in e3b112c69ceed5c39cb07fa45a3ba62b27712679.
* | Merge branch 'go-argcargv'Olly Betts2023-04-202-1/+23
|\ \
| * | Clarify comment in _runme.goOlly Betts2023-04-201-1/+4
| | |
| * | Drop __cplusplus conditionals from testcaseOlly Betts2023-04-201-4/+0
| | | | | | | | | | | | This is a C++ testcase so these aren't useful.
| * | Add argc and argv multi-argument to go.Erez Geva2023-04-192-1/+24
| | | | | | | | | | | | | | | | | | Make argc and argv test works in C. Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
* | | Make y const in new testcaseOlly Betts2023-04-191-1/+1
| | | | | | | | | | | | Needed to get compilable code for Lua and guile.
* | | Merge branch 'macro-partial-expansion'Olly Betts2023-04-192-0/+37
|\ \ \
| * | | Adjust new testsOlly Betts2023-04-192-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a regression test based on https://sourceforge.net/p/swig/bugs/1163/ since this patch solves that case too. Replace the __attribute__ test case from #2525 with a variant of the 1163 regression test, since __attribute__ is specific to certain compilers. Adjust the self-referential test case to actually work - it wasn't valid C code before.
| * | | inline the header into the interface fileMomtchil Momtchev2023-04-172-22/+25
| | | |
| * | | actually test the valueMomtchil Momtchev2023-04-142-1/+4
| | | |
| * | | save missing files from previous commitMomtchil Momtchev2023-04-142-2/+3
| | | |
| * | | move the unit testsMomtchil Momtchev2023-04-142-11/+21
| | | |