summaryrefslogtreecommitdiff
path: root/CHANGES.current
Commit message (Collapse)AuthorAgeFilesLines
* Add CHANGES.current entryOlly Betts2023-05-181-0/+8
|
* [tcl] Add string_view supportOlly Betts2023-05-171-1/+1
| | | | See #1567
* Add CHANGES.current entryOlly Betts2023-05-121-0/+3
|
* [java] Suppress removal warnings for finalize()Olly Betts2023-05-121-0/+6
| | | | | | | | | 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
* Parse storage class more flexiblyOlly Betts2023-05-111-0/+12
| | | | | | | | | | | | | | 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-081-0/+4
| | | | | | | 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/+9
| | | | | | | | | | | 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
* Merge branch 'typedef-namespace'William S Fulton2023-05-061-0/+3
|\ | | | | | | | | | | | | | | | | | | * 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-061-0/+3
| | | | | | | | | | | | | | | | | | | | 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 #366 reference to fix for #1037Olly Betts2023-05-061-2/+2
| |
* | [D] Update docs for D1 removalOlly Betts2023-05-041-0/+6
| |
* | Fix CHANGES.current factual errorOlly Betts2023-04-291-3/+4
| |
* | Allow using snprintf() instead of sprintf() in wrappersOlly Betts2023-04-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch 'python-iterator-protocol'William S Fulton2023-04-261-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Add support for all STL containers to be constructible from a Python setWilliam S Fulton2023-04-261-0/+7
| | |
* | | Merge branch 'js-numinputs'Olly Betts2023-04-271-0/+3
|\ \ \ | | |/ | |/|
* | | [php] Add throws typemaps for string* + const string*Olly Betts2023-04-241-0/+3
|/ /
* | Update CHANGES.current for Javascript changesOlly Betts2023-04-231-0/+22
| |
* | Add CHANGES.current entryOlly Betts2023-04-221-0/+8
| |
* | [php] Support INPUT,INOUT,OUTPUT for std::string&Olly Betts2023-04-211-0/+8
| | | | | | | | | | | | | | 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.
* | Fix CanCastAsInteger if errno is set.Markus Wick2023-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | This method checks if the range of the input variable is fine. However if the errno variable was already set, it fails even for valid inputs. This fixes at least some random failures in the python castmode. Fixes: #2519
* | Add CHANGES.current entry for Ocaml std::string changesOlly Betts2023-04-211-0/+3
| |
* | Fix #ifdef and #ifndef to work inside a %defineOlly Betts2023-04-211-0/+6
| | | | | | | | | | | | | | | | 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
* | Merge branch 'go-argcargv'Olly Betts2023-04-201-0/+3
|\ \
* | | Note that #1882 is fixed by recent changeOlly Betts2023-04-201-4/+4
| | |
* | | scilab: add a gateway xml v6 with full function namesClément DAVID2023-04-201-2/+4
| | |
* | | scilab: detect version 2023 correctlyClément DAVID2023-04-201-0/+3
| | |
* | | Merge branch 'macro-partial-expansion'Olly Betts2023-04-191-0/+6
|\ \ \
| * | | Add CHANGES.current entryOlly Betts2023-04-191-0/+6
| | |/ | |/|
* | | Merge branch 'fix-undefining-allocator'Olly Betts2023-04-191-0/+4
|\ \ \
| * | | Add CHANGES.current entryOlly Betts2023-04-191-0/+4
| |/ /
* | | [scilab] Extract values with ":"Clément DAVID2023-04-191-0/+3
| |/ |/| | | | | Fixes #894
* | Remove support for PHP7Olly Betts2023-04-141-0/+7
|/ | | | | 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
|
* document C# std_array.i enhancementsWilliam S Fulton2023-03-221-0/+3
|
* Improved error checking when defining classes and using %template.William S Fulton2023-03-131-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 {};
* Fix duplicate const in generated code wrapping templatesWilliam S Fulton2023-03-081-0/+14
| | | | | | | | | | | | | | | 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);
* Partial template specialization fixes to support default argumentsWilliam S Fulton2023-03-011-0/+13
| | | | | | | | | | | | | | 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>;
* Template partial specialization improvementsWilliam S Fulton2023-02-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-0/+13
| | | | | | | | | | | | | 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.
* Add CHANGES.current entry for previous commitOlly Betts2023-01-271-0/+4
|
* Fix seg fault using %templateWilliam S Fulton2023-01-031-0/+6
| | | | | | | | | 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-031-1/+6
| | | | | | 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.
* Syntax error fixes parsing more elaborate parameter pack argumentsWilliam S Fulton2022-12-301-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | that are function pointers and member function pointers. template <typename... V> struct VariadicParms { void ParmsFuncPtrPtr(int (*)(V*...)) {} void ParmsFuncPtrPtrRef(int (*)(V*&...)) {} void ParmsFuncPtrPtrRValueRef(int (*)(V*&&...)) {} void ParmsFuncPtrRef(int (*)(V&...)) {} void ParmsFuncPtrRValueRef(int (*)(V&&...)) {} void ParmsMemFuncPtrPtr(int (KlassMemFuncs::*)(V*...)) {} void ParmsMemFuncPtrPtrRef(int (KlassMemFuncs::*)(V*&...)) {} void ParmsMemFuncPtrPtrRValueRef(int (KlassMemFuncs::*)(V*&&...)) {} void ParmsMemFuncPtrRef(int (KlassMemFuncs::*)(V&...)) {} void ParmsMemFuncPtrRValueRef(int (KlassMemFuncs::*)(V&&...)) {} }; %template(VariadicParms0) VariadicParms<>; %template(VariadicParms1) VariadicParms<A>; Also in various other places such as within noexcept specifiers: template<typename T, typename... Args> void emplace(Args &&... args) noexcept( std::is_nothrow_constructible<T, Args &&...>::value); Issue #1863
* Fix instantiation of variadic class templatesWilliam S Fulton2022-12-291-1/+12
| | | | | | | | | | | containing parameter pack arguments that are function pointers. template <typename... V> struct VariadicParms { void ParmsFuncPtrVal(int (*)(V...)) {} }; %template(VariadicParms0) VariadicParms<>; %template(VariadicParms1) VariadicParms<A>;
* Fix syntax error parsing variadic template parameter pack argumentsWilliam S Fulton2022-12-231-0/+4
| | | | | | that are function pointers Issue #1863
* Document improved variadic template supportWilliam S Fulton2022-12-221-0/+4
|
* Fix syntax error for misplaced Doxygen comment after struct/class member.William S Fulton2022-12-061-0/+5
| | | | | | | Fix syntax error using Doxygen member groups syntax, "///*}", when used after final struct/class member. Issue #1636
* Improved handling of Doxygen comments in parameter listsWilliam S Fulton2022-12-051-0/+4
| | | | | | | Fix garbled Doxygen post comments in parameter lists. Fix syntax error parsing a trailing Doxygen comment in parameter lists. Closes #2023
* Fix syntax error parsing of Doxygen comments after last enum itemWilliam S Fulton2022-12-031-0/+3
| | | | | | | It is unconventional to have a doxygen comment after an enum item. It is attached to the previous, that is, the enum item to match Doxygen behaviour. Closes #1609