summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [ci] Try simply running ubuntu-18.04 jobs on 20.04ci-test-ubuntu-20.04Olly Betts2023-04-191-264/+25
|
* [ci] Disable ubuntu-18.04 jobsOlly Betts2023-04-181-43/+43
| | | | | | | | | Github has now dropped support for running jobs on Ubuntu 18.04 and these jobs now sit un-run for a day and then fail. Hopefully many of these jobs can be resurrected on a newer Ubuntu version, but as a first step let's get git master back to a state where all the enabled jobs can be expected to pass.
* [ci] Update to latest actions/checkoutOlly Betts2023-04-161-1/+1
| | | | Should fix slew of warnings that "Node.js 12 actions are deprecated"
* Remove support for PHP7Olly Betts2023-04-1413-173/+56
| | | | | PHP7 security support ended 2022-11-28 so it doesn't make sense to include support for it in the SWIG 4.2.x release series.
* Octave 8.1 supportWilliam S Fulton2023-03-251-0/+3
|
* Merge branch 'alatina-master'William S Fulton2023-03-252-2/+9
|\ | | | | | | | | | | | | * alatina-master: Update octruntime.swg Update octrun.swg to work with Octave v8.1.0 Update octruntime.swg to work with Octave v8.1.0
| * Update octruntime.swgAndrea L2023-03-141-2/+3
| |
| * Merge pull request #2 from alatina/alatina-patch-octave-8.1.0Andrea L2023-03-141-1/+3
| |\ | | | | | | Update octruntime.swg to work with Octave v8.1.0
| | * Update octruntime.swg to work with Octave v8.1.0Andrea L2023-03-141-1/+3
| | |
| * | Merge pull request #1 from alatina/alatina-patch-octave-8.1.0-1Andrea L2023-03-141-1/+5
| |\ \ | | |/ | |/| Update octrun.swg to work with Octave v8.1.0
| | * Update octrun.swg to work with Octave v8.1.0Andrea L2023-03-141-1/+5
| |/
* | Merge branch 'bda_resolve_warnings'William S Fulton2023-03-242-1/+4
|\ \ | | | | | | | | | | | | | | | * bda_resolve_warnings: Use $self instead of self Lib/csharp: Resolve a few warnings about unused parameters
| * | Use $self instead of selfWilliam S Fulton2023-03-242-4/+4
| | |
| * | Lib/csharp: Resolve a few warnings about unused parametersMario Emmenlauer2023-01-102-1/+4
| | |
* | | Merge pull request #2499 from MyroslavaStopets/nullptr-utilizationWilliam S Fulton2023-03-242-22/+28
|\ \ \ | | | | | | | | [Java] Added usage of nullptr instead of NULL
| * | | Added usage of nullptr instead of NULLMyroslava Stopets2023-02-082-22/+28
| | | |
* | | | Merge pull request #2483 from fweimer-rh/c99William S Fulton2023-03-241-1/+4
|\ \ \ \ | | | | | | | | | | CCache: Do not rely on C89-only features in configure.ac
| * | | | CCache: Do not rely on C89-only features in configure.acFlorian Weimer2023-01-121-1/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | Add missing #include directives to obtain additional function prototypes. This avoids altering the result of this test with C99 compilers which do not support implicit function declarations.
* | | | document C# std_array.i enhancementsWilliam S Fulton2023-03-221-0/+3
| | | |
* | | | Merge branch 'bda_standardize_vector_array'William S Fulton2023-03-223-28/+72
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * bda_standardize_vector_array: std_array.i std_vector.i tweaks Lib/csharp: Better standardized std_vector.i and std_array.i
| * | | | std_array.i std_vector.i tweaksWilliam S Fulton2023-03-223-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Efficiency fixes and tidy up from previous commit. Add test case for constructing from differently sized containers. Issue #2478
| * | | | Lib/csharp: Better standardized std_vector.i and std_array.iMario Emmenlauer2023-01-102-29/+68
| |/ / /
* | | | Improved error checking when defining classes and using %template.William S Fulton2023-03-1310-85/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When a template is instantiated via %template and uses the unary scope operator ::, an error occurs if the instantiation is attempted within a namespace that does not enclose the instantiated template. For example, the following will now error as ::test::max is not enclosed within test1: Error: '::test::max' resolves to 'test::max' and was incorrectly instantiated in scope 'test1' instead of within scope 'test'. namespace test1 { %template(maxchar) ::test::max<char>; } 2. SWIG previously failed to always detect a template did not exist when using %template. In particular when instantiating a global template incorrectly within namespace. The code below now correctly emits an error: Error: Template 'test5::GlobalVector' undefined. namespace test5 { } template<typename T> struct GlobalVector {}; %template(GVI) test5::GlobalVector<int>; 3. Also error out if an attempt is made to define a class using the unary scope operator ::. The following is not legal C++ and now results in an error: Error: Using the unary scope operator :: in class definition '::Space2::B' is invalid. namespace Space2 { struct B; } struct ::Space2::B {};
* | | | Redefined identifer testcase now correctly errorsWilliam S Fulton2023-03-132-3/+5
| |_|/ |/| |
* | | Update errors tests to use new template errorWilliam S Fulton2023-03-092-3/+3
| | | | | | | | | | | | | | | Old: Error: Template 'X' undefined. New: No matching function template 'X' found.
* | | Fix duplicate const in generated code wrapping templatesWilliam S Fulton2023-03-086-2/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix duplicate const in generated code when template instantiation type is const and use of template parameter is also explicitly const, such as: template <typename T> struct Conster { void cccc1(T const& t) {} }; %template(ConsterInt) Conster<const int>; Above previously led to generated code: (arg1)->cccc1((int const const &)*arg2); instead of (arg1)->cccc1((int const &)*arg2);
* | | Cosmetic change in template terminologyWilliam S Fulton2023-03-033-17/+17
| | | | | | | | | | | | Prefer terminology from C++ standard: function templates and class templates
* | | Update partial specialization testWilliam S Fulton2023-03-011-8/+7
| | |
* | | Partial template specialization fixes to support default argumentsWilliam S Fulton2023-03-019-33/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default argments come from the primary template's parameter list. Example: template<class Y, class T=int> struct X { void primary() {} }; // Previously the specialization below resulted in: // Error: Inconsistent argument count in template partial specialization. 1 2 template<class YY> struct X<YY*> { void special(YY*) {} }; // Both of these correctly wrap the partially specialized template %template(StringPtr) X<const char *>; %template(ShortPtr) X<short *, int>;
* | | Revert "Allow Scilab 5.5 failure since downloads have moved"William S Fulton2023-02-181-1/+0
| | | | | | | | | | | | This reverts commit ef4c61c23cb2b3e8fe4238a21f275081ae0cfd3b.
* | | Duplicate parameter name handling improvementsWilliam S Fulton2023-02-183-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a method with duplicate parameter names is wrapped such as: void fn_3parms(int p_a, int p_a, double p_c); Previously all duplicate parameter names were changed in order to provide unique parameter names: void fn_3parms(int arg0, int arg1, double p_c) Now the parameter names changed are just the 2nd and subsequent duplicate parameter names: void fn_3parms(int p_a, int arg1, double p_c)
* | | Improved variadic parameter names expansionWilliam S Fulton2023-02-183-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Number the variadic parm names instead of not naming them. Such as: template<typename... T> int variadicmix1(T... t) { return 20; } %template(variadicmix1) variadicmix1<A,B,C>; Used to expand to: int variadicmix1(A T, B arg1, C arg2) now: int variadicmix1(A t1, B t2, C t3) Also test for generating duplicate parameter names which required a fix in R. Also results in a few minor changes to parameter names in generated R code.
* | | Make new testcase c++98 compliantWilliam S Fulton2023-02-171-5/+5
| | |
* | | Template partial specialization improvementsWilliam S Fulton2023-02-176-170/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #1300 Changes to support the first example below (partial specialization of template parameter types like Vect<int>). Previous implementation and design could only handle one template parameter name per template specialization argument, such as Vect<TS> for the first template specialization argument (for first example below) template<class TS, typename TTS> class Foo<Vect<TS>, int> { ... }; and not template<class TS, typename TTS> class Foo<Vect<TS, TTS>, int> { ... }; New approach is to not modify 'templateparms' in the template node, (except to fill in default args from primary template) Previous implementation also assumed a template parameter could not be used more than once in the specialized arguments, such as template<typename T> struct Hey<T, T> { void specialA() {} }; Examples ======== 1) For primary: template<class T, typename TT> class Foo { ... }; and specialization: template<class TS, typename TTS> class Foo<Vect<TS>, TTS> { ... }; Fix specialization template from (wrong) | templateparms - 'Vect< TS >,typename TTS' to (correct/new way) | templateparms - 'class TS,typename TTS' 2) For primary: template<typename P1 = int, typename P2 = double> struct Partialler { void primary(P1, P2) {}; }; and specialization: template<typename S1, typename S2> struct Partialler<S2, S1*> { void special(S1*, S2, bool) {}; }; Specialized template changes from (wrong) | templateparms - 'typename S2=int,typename S1=double' to (correct/new way, default args are removed) | templateparms - 'typename S1,typename S2' and subsequent change to partialargs from | partialargs - "Partialler<($1,p.$2)>" to | partialargs - "Partialler<($2,p.$1)>" so that the $n number is now more logically the nth template parameter in templateparms 3) For primary: template<typename X, typename Y> struct Hey { void primary() {} }; and specialization: template<typename T> struct Hey<T, T> { void specialA() {} }; old (wrong/old way) | templateparms - 'typename T,typename T' new (correct/new way) | templateparms - 'typename T' These are unchanged and are okay: | partialargs - "Hey<($1,$1)>" 4) For primary: enum Hello { hi, hello }; template <Hello, class A> struct C {}; and specialization: template <class A> struct C<hello,A> { ... }; old (wrong/old way) | templateparms - 'hello,class A' new (correct/new way) | templateparms - 'class A' and subsequent changes to partialargs from | partialargs - "C<(hi,$2)>" to | partialargs - "C<(hi,$1)>" Test-suite ========== Identical output as before in Python but in Java, an unimportant change in cpp11_variadic_function_templates.i results in one variadic parameter name being different. New testcase template_partial_specialization_more.i with more testcases added including above examples that are not already in the test-suite.
* | | Fix deduction of partially specialized template parametersWilliam S Fulton2023-02-174-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the specialized parameter is non-trivial, used in a wrapped method and the type to %template uses typedefs. For example: typedef double & DoubleRef; template <typename T> struct XX {}; template <typename T> struct XX<T &> { void fn(T t) {} }; %template(XXD) XX<DoubleRef>; The type of the parameter in the instantiated template for fn is now correctly deduced as double.
* | | Rewrite does_parm_match used in template partial specializationWilliam S Fulton2023-02-172-44/+38
| | | | | | | | | | | | | | | | | | Re-implement this function in preparation for fixing bugs in this function. This rewrite should result in no change in the way it previously worked for now.
* | | Add missing template_function_parm testcaseWilliam S Fulton2023-02-171-0/+1
| |/ |/|
* | Drop configure probe for popen()Olly Betts2023-02-031-8/+0
| | | | | | | | It was only used by the command encoder which we removed.
* | Fix a couple of typos in CHANGESOlly Betts2023-01-271-1/+2
| |
* | Add CHANGES.current entry for previous commitOlly Betts2023-01-271-0/+4
| |
* | Avoid unused parameter self warningJulien Schueller2023-01-271-1/+1
| |
* | configure: Check for php8.2 tooOlly Betts2023-01-181-1/+1
|/
* Fix seg fault using %templateWilliam S Fulton2023-01-034-1/+60
| | | | | | | | | Fix seg fault when instantiating templates with parameters that are function parameters containing templates, such as: %template(MyC) C<int(std::vector<int>)>; Closes #983
* Instantiation of C++11 variadic function templatesWilliam S Fulton2023-01-035-55/+132
| | | | | | Complete support for C++11 variadic function templates. Support was previously limited to just one template parameter. Now zero or more template parameters are supported in the %template instantiation.
* Move variadic function template tests to separate testcaseWilliam S Fulton2023-01-033-43/+83
|
* Merge branch 'OCaml-rename_rstrip_encoder-using2-runtime-tests'William S Fulton2022-12-302-0/+11
|\ | | | | | | | | | | * OCaml-rename_rstrip_encoder-using2-runtime-tests: Complete copy of testcase from Python [OCaml] Runtime tests for rename_rstrip_encoder and using2
| * Complete copy of testcase from PythonWilliam S Fulton2022-12-301-1/+3
| |
| * [OCaml] Runtime tests for rename_rstrip_encoder and using2Zackery Spytz2022-12-042-0/+9
| | | | | | | | | | | | | | Add runtime tests for rename_rstrip_encoder and using2. They are based on the runtime tests that already exist for other languages.
* | Merge pull request #2460 from swig-fortran/remove-python-sprintfWilliam S Fulton2022-12-301-3/+3
|\ \ | | | | | | [Python] Eliminate sprintf in generated code
| * | Eliminate sprintf in generated python codeSeth R Johnson2022-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | Newer clang versions emit warnings in generated code: ``` warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] ```