summaryrefslogtreecommitdiff
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* Fix command line error handling to work like in 3.0.12William S Fulton2019-04-251-6/+8
| | | | | | | | | | | | Output is once again: $ swig -versioon Unable to find option or file '-versioon', Use 'swig -help' for more information. instead of $ swig -versioon No target language specified
* Fix Go tests to run in module modeIan Lance Taylor2019-04-241-2/+19
| | | | | | Stop using relative imports and add a go.mod file. Tested against Go 1.6 through Go pre-1.13, and gccgo.
* Merge branch 'enum-trailing-comma-doxygen'William S Fulton2019-04-241-36/+22
|\ | | | | | | | | * enum-trailing-comma-doxygen: Fix parsing of enums with trailing comma with -doxygen
| * Fix parsing of enums with trailing comma with -doxygenVadim Zeitlin2019-04-201-36/+22
| | | | | | | | | | | | | | | | | | | | | | To correctly parse Doxygen post-comments after the trailing comma, switch to right recursion in "enumlist" production rule definition: this does consume more stack space when parsing, but makes the rules much easier to write and to understand and hopefully shouldn't result in any problems with real code (which shouldn't have thousands of enums items in it). Closes #1514.
* | Don't crash if type is not available in Python Doxygen codeVadim Zeitlin2019-04-201-1/+6
|/ | | | | | | | | Fix crash if "@return" Doxygen tag was used on a node without any return type (such as a class, for example). Ignoring it might not be the best thing to do, but it's definitely better than crashing and it's not really clear what else could be done anyhow. Closes #1516.
* When generating Go code, make -cgo the default.Ian Lance Taylor2019-04-191-1/+5
| | | | | Add new -no-cgo option to disable the default. Keep -cgo as a no-op for existing users.
* Fix minor whitespace regression in Java generated codeWilliam S Fulton2019-04-181-1/+1
|
* Add the parameters typemap attribute to D and Java destructor wrapper typemapsWilliam S Fulton2019-04-082-6/+16
| | | | | | | Added to the javadestruct, javadestruct_derived, ddispose, ddispose_derived typemaps to mirror enhanced flexibility in the csdisposing and csdisposing_derived (C#) typemaps. If provided the contents are generated as the delete/dispose method's parameters declaration.
* Fix C# CA1063 warning by implementing the recommended Dispose methods.William S Fulton2019-04-081-19/+55
| | | | | | | | | | | | | | | Previously just the Dispose() method was generated. Now the Dispose() and Dispose(bool disposing) methods are generated. Changes are required if custom "csfinalize", "csdestruct" or "csdestruct_derived" typemaps are being used. Details in #421 on Github. SWIG will error out if one of the "csfinalize, "csdestruct" or "csdestruct_derived" typemaps are found. Example error message: foo.h:60: Error: A deprecated csfinalize typemap was found for Foo, please remove it and replace all csdestruct, csdestruct_derived and csfinalize typemaps by the csdispose, csdispose_derived, csdisposing and csdisposing_derived typemaps. Closes #421
* Always use fastunpack for Python swigconstant wrappersWilliam S Fulton2019-03-211-6/+2
|
* Always use fastunpack for Python swigregister functionWilliam S Fulton2019-03-211-6/+2
|
* Fix Python low-level static member setters.William S Fulton2019-03-201-1/+1
| | | | | | The low-level API for setting static member variables stopped working when the fastunpack option was turned on by default. The PyMethodDef setup requires METH_O, not METH_VARARGS with fastunpack.
* Merge branch 'REnums2018'William S Fulton2019-03-181-279/+369
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * REnums2018: Fix R return by C++11 const ref enum classes Remove unused code in r.cxx extra doc on anonymous enums ENH: FIX: references to enums now functioning DOC: Extended documentation on enumeration support in R FIX: Corrected path to output from R tests Reformat comments in R module ENH: Run test for enum_thorough in R Code style changes post review ENH: R Module: Enumerations with values set by calls to C code, allowing arbitarily complex value expressions. Setting enum values with calls to the C code.
| * Remove unused code in r.cxxWilliam S Fulton2019-03-181-12/+0
| |
| * ENH:Richard Beare2019-03-111-20/+4
| | | | | | | | | | Replaced the old getRClassName with the new one that uses the swig functions for detecting, adding and removing pointers andreferences.
| * FIX: references to enums now functioningRichard Beare2019-03-081-54/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | There is some consolidation work to be done. The core of the change is getRClassName2, which will probably eventually replace getRClassName. getRClassName seems to be in a funny state, with a middle argument that is commented out and never used. My next step is to verify whether the new version can replace it.
| * Reformat comments in R moduleRichard Beare2019-03-081-153/+172
| |
| * Code style changes post reviewRichard Beare2019-03-081-19/+21
| |
| * ENH: R Module: Enumerations with values set by calls to C code, allowingRichard Beare2019-03-081-14/+54
| | | | | | | | | | | | | | | | | | arbitarily complex value expressions. R-side initialization of the enumeration structure employs delayedAssign, which allows the initialization code to be sourced before loading the shared library, which is the usual behaviour for code in an R package.
| * Setting enum values with calls to the C code.Richard Beare2019-03-081-57/+139
| |
* | Fix some MSVC compiler warnings in the test suiteZackery Spytz2019-03-071-1/+1
|/ | | | | | nested_in_template_wrap.cxx(247): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data python_pybuffer_wrap.cxx(2788): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data Modules\python.cxx(2227) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
* Merge branch 'ZackerySpytz-director-classes-final-methods'William S Fulton2019-03-033-7/+59
|\ | | | | | | | | | | | | | | | | | | * ZackerySpytz-director-classes-final-methods: Warning tweaks for destructors that are final in director classes Documentation for directors and virtual final methods Fixes for final destructors in director classes Warning fix for final destructor in directors Remove a useless warning filter Fix the handling of director classes with final methods
| * Warning tweaks for destructors that are final in director classesWilliam S Fulton2019-03-031-1/+1
| |
| * Fixes for final destructors in director classesWilliam S Fulton2019-03-031-0/+3
| | | | | | | | | | A class marked as a director with a final destructor should not be a wrapped as a director class. Fix seg faults in this case.
| * Warning fix for final destructor in directorsWilliam S Fulton2019-03-021-0/+2
| | | | | | | | | | Fix suppression of final destructors used in director classes. Add testcase for final destructors in director classes.
| * Merge remote-tracking branch 'upstream/master' into ↵Zackery Spytz2019-02-241-1/+1
| |\ | | | | | | | | | director-classes-final-methods
| * | Fix the handling of director classes with final methodsZackery Spytz2019-02-223-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated SwigDirector_* classes were attempting to override methods marked as final. In addition, give a warning if the destructor of a director class is final. Closes #564.
* | | Merge branch 'ZackerySpytz-valid-floating-point-literals'William S Fulton2019-03-021-0/+6
|\ \ \ | | | | | | | | | | | | | | | | * ZackerySpytz-valid-floating-point-literals: Fix some rejections of valid floating-point literals
| * | | Fix some rejections of valid floating-point literalsZackery Spytz2019-02-211-0/+6
| |/ / | | | | | | | | | | | | Some valid floating-point literals were giving "Error: Syntax error in input(1)".
* | | Fix Python compile errors with overloading and varargsWilliam S Fulton2019-02-255-20/+47
| |/ |/| | | | | | | | | | | Fixes wrapping overloaded functions/constructors where a vararg function is declared after a non-vararg function. This is a long standing bug in the Python layer exposed since fastunpack was turned on by default.
* | [OCaml] Fix possible memory leaks in generated dispatch functionsZackery Spytz2019-02-231-1/+1
|/ | | | All paths now free argv.
* Fix regression parsing gcc preprocessor linemarkersWilliam S Fulton2019-02-191-1/+16
| | | | | | | | These are preprocessor statement in the form: # linenum filename flags Closes #1475
* Fix typemap matching to expand template parameters when the name contains ↵William S Fulton2019-02-171-0/+2
| | | | | | | | | | | | | | template parameters. In the %typemap below the type is T and the name is X<T>::make which now expands correctly to X< int >::make template<typename T> struct X { %typemap(out) T X<T>::make "..." T make(); }; %template(Xint) X<int>;
* Improve debug display of parametersWilliam S Fulton2019-02-171-2/+4
| | | | | | | Debug display now displays parameters as strings for "kwargs", "pattern", "templateparms", "throw" elements in the parse tree (not just "parms" and "wrap:parms"). Add in single quotes when displaying these parameter lists as strings.
* Template instantion fixes when template parameter is used twice in typeWilliam S Fulton2019-02-171-6/+18
| | | | | For example T in: Y<T>::YYY<T>::value_type
* Memory leak fixes calling Swig_scopename_splitWilliam S Fulton2019-02-163-14/+13
|
* Fix parser error containing multiple #define statements inside an enum.William S Fulton2019-02-161-4/+8
| | | | | | | | | | | | | | | | | The second #define fails to parse: enum FooEnum { ENUM1 = 0, ENUM2 = 1, #define MACRO_DEF1 "Hello" #define MACRO_DEF2 "World!" ENUM3 = 2, ENUM4 = 3, }; Bug mentioned at https://sourceforge.net/p/swig/patches/333/
* Merge pull request #1471 from ZackerySpytz/OCaml-segfaults-list-argsWilliam S Fulton2019-02-151-1/+12
|\ | | | | [OCaml] Fix segfaults when too few arguments are passed to a function
| * [OCaml] Fix segfaults when too few arguments are passed to a functionZackery Spytz2019-02-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Prevent segfaults when too few arguments are passed to a function. Length checks are not needed for the wrappers of overloaded functions -- the generated dispatch function already checks. Add default_args_runme.ml. Fix minor errors in some runtime tests. Extra args were being passed in some cases.
* | Add support for C++17 hexadecimal floating literalsZackery Spytz2019-02-131-1/+20
|/
* [php] Whitespace improvements in generated C/C++ codeOlly Betts2019-02-121-14/+14
|
* Merge branch 'ZackerySpytz-cpp14-binary-integer-literals'William S Fulton2019-02-111-0/+17
|\ | | | | | | | | * ZackerySpytz-cpp14-binary-integer-literals: Add support for C++14 binary integer literals
| * Add support for C++14 binary integer literalsZackery Spytz2019-02-101-0/+17
| | | | | | | | Closes #1030.
* | Mark and setup OCaml as an experimental target language.William S Fulton2019-02-111-1/+1
| | | | | | | | Issue #1437
* | Merge branch 'fix-ignore-param'Vadim Zeitlin2019-02-111-5/+8
|\ \ | | | | | | | | | | | | | | | Fix for wrongly renaming parameters to "$ignore" in Python. See https://github.com/swig/swig/pull/1462
| * | Don't apply %ignore to parametersVadim Zeitlin2019-02-101-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by 3f5c17824c5f20023bac58f7ebfc8de8532d6881 which resulted in using "$ignore" instead of the real parameter name in Python if an %ignore/%rename($ignore) for the parameter name was used (as could happen not necessarily intentionally when using wild card ignores with regex matches) by explicitly checking if we're dealing with a parameter node in apply_rename(), used by Swig_name_make(), and not renaming it to "$ignore" in this case. Extend the test suite to check for this case. Closes #1460.
* | | Re-organise some generate Python code for method creation and docstring supportWilliam S Fulton2019-02-101-17/+0
| |/ |/| | | | | | | | | | | Fix ‘PyMethodDef* SWIG_PythonGetProxyDoc(const char*)’ declared ‘static’ but never defined [-Wunused-function] Closes #1448
* | Drop -php4 option completelyOlly Betts2019-02-111-1/+0
| | | | | | | | | | | | SWIG's support for PHP4 was removed over a decade ago, and PHP4 itself went out of security support more than a decade ago too - nobody is realistically going to be trying to generate PHP4 bindings in 2019.
* | Merge branch 'ZackerySpytz-cpp11_u_U_char_encoding_prefixes'William S Fulton2019-02-101-2/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * ZackerySpytz-cpp11_u_U_char_encoding_prefixes: Document C++11 UCS-2 UCS-4 and C++17 UTF8 character literals support c++17 u8 character literals testcase C++17 u8 character literals fix C++17 u8 character literals testcase Fix the Java tests Add support for the C++11 u and U encoding prefixes for char literals
| * | C++17 u8 character literals fixZackery Spytz2019-02-101-2/+6
| | |