summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix CanCastAsInteger if errno is set.Markus Wick2023-04-211-3/+5
| | | | | | | | | | 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
* [OCaml] Fix reference typemaps for std::stringZackery Spytz2023-04-211-21/+19
| | | | | | | | | | | | | | | | | | | 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
* Remove remaining traces of PHP7 supportOlly Betts2023-04-202-10/+3
| | | | | The bulk of this was already removed in e3b112c69ceed5c39cb07fa45a3ba62b27712679.
* [php] Remove unused exception.i includeOlly Betts2023-04-201-2/+0
|
* Make string& consistent in PHP's std_string.iOlly Betts2023-04-201-6/+6
|
* Merge branch 'go-argcargv'Olly Betts2023-04-201-0/+64
|\
| * Add argc and argv multi-argument to go.Erez Geva2023-04-191-0/+64
| | | | | | | | | | | | Make argc and argv test works in C. Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
* | scilab: detect version 2023 correctlyClément DAVID2023-04-201-17/+16
| |
* | Merge branch 'fix-undefining-allocator'Olly Betts2023-04-191-1/+1
|\ \
| * | Really fix "mixed declarations and code" warningOlly Betts2023-04-191-3/+1
| | |
| * | Fix "ISO C90 forbids mixed declarations and code" warningMaple Ong2023-04-121-1/+2
| | |
| * | Fix "undefining the allocator of T_DATA" error seen in Ruby 3.2Maple Ong2023-04-121-1/+2
| | | | | | | | | | | | | | | Ruby 3.2 issue: https://bugs.ruby-lang.org/issues/18007 Similar to https://github.com/robinst/swig/commit/9b5d37fd174331fa2b7113fe968fcf0570de43bf
* | | [scilab] Extract values with ":"Clément DAVID2023-04-194-5/+38
| |/ |/| | | | | Fixes #894
* | Remove support for PHP7Olly Betts2023-04-142-66/+3
|/ | | | | 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.
* 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
| | |
| * | 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
| |/
* | std_array.i std_vector.i tweaksWilliam S Fulton2023-03-222-19/+9
| | | | | | | | | | | | | | 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
|/
* 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] ```
* | Lua variadic templates sizeof... constants fixWilliam S Fulton2022-12-221-2/+2
|/
* Fix push/pop mismatchBernhard Rosenkränzer2022-11-291-0/+3
| | | | | | | | | Without this, perlhead.swg does `#pragma GCC diagnostic pop` if `__GNUC__ >= 10` - without any prior `#pragma GCC diagnostic push`. There's also a mismatch between the conditions that trigger `#pragma GCC diagnostic ignored` (where the `push` should be) and the attempt to `#pragma GCC diagnostic pop`.
* R rtypecheck typemapsWilliam S Fulton2022-11-051-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | Further switch to use rtypecheck typemaps instead of hard coded logic. The full switch to typemaps is deferred until swig-4.2 as it can't be fully backwards compatible. For now a warning is provided to help the transition. It provides the full typemap that should be placed into a user's interface file, for example: %typemap("rtype") int32_t * "integer" void testmethod(int32_t * i); void testmethod(); If there is no rtypecheck typemap for int32_t *, the warning shown is: example.i:7: Warning 750: Optional rtypecheck code is deprecated. Add the following typemap to fix as the next version of SWIG will not work without it: %typemap("rtypecheck") int32_t * %{ (is.integer($arg) || is.numeric($arg)) %} The warning is shown for any code that previously used "numeric", "integer" or "character" for the rtype typemap. Copying the rtypecheck typemap as shown into the user interface file will provide the appropriate fix and the warning will disappear. This is important to do as swig-4.2 will not be able to provide this helpful warning.
* Overloading fixes for R and rtypecheck typemapWilliam S Fulton2022-11-051-0/+6
| | | | | | | | - Fix for special variable $argtype expansion in rtypecheck typemap. - Remove unnecessary () brackets when using rtypecheck typemap for single parameter functions. - Add rtypecheck typemaps for shared_ptr so that NULL can be used in overloaded functions taking shared_ptr.
* Fix memory leak in R shared_ptr wrappersWilliam S Fulton2022-11-052-6/+16
| | | | | | | | | Fix leak when a cast up a class inheritance chain is required. Adds implementation of SWIG_ConvertPtrAndOwn for R. Closes #2386
* Use more portable PyUnicode_AsUTF8* methods.Clinton Stimpson2022-11-011-1/+8
| | | | | This supports the use of Py_LIMITED_API and also uses PyUnicode_AsUTF8AndSize if Py_LIMITED_API is set to 3.10 or newer.
* R shared_ptr fixesWilliam S Fulton2022-10-241-0/+19
| | | | | | | | Fix problems in shared_ptr wrappers where the class names were not consistent when using the shared_ptr template or the actual underlying type. Move $R_class substitution to typemaps. Issue #2386
* [python] Avoid undefined behaviourOlly Betts2022-10-201-5/+9
| | | | | | | Cast a parameter type explicitly rather than implicitly by casting the function pointer type, as the latter is undefined behaviour. Caught by ubsan.
* [Lua] Fix type resolution between SWIG-wrapped modulesOlly Betts2022-10-201-1/+1
| | | | See #2126
* [php] Fix handling of multi-module casesOlly Betts2022-10-181-1/+1
| | | | | | | | | | | | | | | | Look up unknown base classes using SWIG_MangledTypeQueryModule(). Revert to using SWIG_TypeCheck() instead of SWIG_TypeCheckStruct() as the latter doesn't seem to work for this case (at least for PHP right now). Add mod_runme.php as a regression test for this. Adjust the PHP test harness not to set up reflection for the module unless it's actually needed for a testcase. Currently the approach to find the module name doesn't work for multi-module testcases. See #2126
* R - Add support for std::vector<std::vector<std::string>>William S Fulton2022-10-171-3/+35
| | | | Closes #2385
* Fix for Java 7 - std::set and std::unordered_setWilliam S Fulton2022-10-152-0/+8
|
* Correct new Raise functions to be staticWilliam S Fulton2022-10-142-2/+2
|
* Remove STRING_VALUE to keep supporting older versions of RWilliam S Fulton2022-10-141-1/+1
| | | | | STRING_VALUE does not work with R_NO_REMAP in older versions (it broke 3.0.2)
* Merge branch 'fix-cast'William S Fulton2022-10-141-2/+2
|\ | | | | | | | | | | | | | | | | * fix-cast: add tests for new casting behavior skip tests when value is out of range refactor integers JS testcase to avoid repeating code Return uint64_t as double if is bigger than uint32_t Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match (#3)
| * Merge branch 'fix-cast' into masterSergio Garcia Murillo2021-11-2978-5876/+724
| |\
| * | Return uint64_t as double if is bigger than uint32_tSergio Garcia Murillo2021-11-291-2/+2
| | |
| * | Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match (#3)Sergio Garcia Murillo2021-03-051-1/+5
| | | | | | | | | Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match
* | | Define PY_SSIZE_T_CLEAN only when not defined yetMichal Suchanek2022-10-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users of swig 4.0.2 and python 3.10 will likely define the PY_SSIZE_T_CLEAN macro by hand when relevant because their bindings won't build otherwise. Unconditionally defining PY_SSIZE_T_CLEAN in swig 4.10 will lead to macro redefinition warning. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
* | | Add missing SWIGTYPE *const& typemapsWilliam S Fulton2022-10-131-2/+7
| | |
* | | Cleanup SWIG_VERSION definitionWilliam S Fulton2022-10-1311-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Swig_obligatory_macros which must be called by each target language to define SWIG_VERSION correctly in the generated code, as well as the language specific macro SWIGXXX where XXX is the target language name. Drop the #ifdef SWIGXXX that was previously generated - I can't see the point of this and if users are defining this macro somehow, then users will need to change this Closes #1050
* | | Quick fix SWIG_VERSION not being defined correctly in wrappersWilliam S Fulton2022-10-131-1/+0
| | |