summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [php] Fix emitted PHP type declarations in corner casesphp-type-declaration-fixesOlly Betts2022-10-041-83/+215
| | | | See #2151
* Prefer !Equal() to Cmp() != 0Olly Betts2022-10-031-5/+5
|
* Merge pull request #2249 from geographika/pcre-nugetWilliam S Fulton2022-09-302-26/+90
|\ | | | | Update Windows CMake builds to use NuGet package for PCRE2
| * Split build and installsethg2022-09-272-3/+9
| |
| * Build and Install are in the same commandsethg2022-09-271-5/+1
| |
| * Move install to separate stepsethg2022-09-271-0/+4
| |
| * Switch Action and docs to use PowerShellsethg2022-09-272-18/+35
| |
| * Test using version rather than helpsethg2022-08-201-1/+1
| |
| * Add GitHub Action to test Windows builds using Nuget as described in the docssethg2022-08-201-0/+47
| |
| * Update Windows CMake builds to use NuGet package for PCRE2sethg2022-03-311-15/+9
| |
* | C# CreateWStringFromUTF32 optimisationWilliam S Fulton2022-09-301-3/+1
| | | | | | | | | | Avoid UTF-32 to UTF-8 conversion then get string from UTF-8 Missing change that should have gone into eaf468e9e8d3ef17f397ef6bc5e73807a2bf3594
* | Generate richcompare switch statements in sorted orderWilliam S Fulton2022-09-301-2/+4
| |
* | Add DohSortedKeys functionWilliam S Fulton2022-09-304-26/+29
| | | | | | | | Returns a list of sorted keys in a DOH Hash.
* | [ci] Revert continue-on-error for PHP 8.2Olly Betts2022-09-301-1/+0
| | | | | | | | Tests are now passing there.
* | Adjust the DOH string hash functionOlly Betts2022-09-302-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | The one we're currently using only considers the last five characters plus the least significant bit of the last-but-sixth character, which unsurprisingly generates a lot of many-way collisions. This change seems to give about a 4% reduction in wallclock time for processing li_std_list_wrap.i from the testsuite for Python. The hash collision rate for this example drops from 39% to 0! Closes #2303
* | Testcase overloading warning fixWilliam S Fulton2022-09-291-0/+2
| |
* | Runtime tables deterministic ordering (4)William S Fulton2022-09-293-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Output C/C++ type strings (| separated) in swig_type_info tables in fixed order. The types are output in alphabetically sorted order, with an exception. The final type is a fully resolved type, but does not necessarily include default template parameters. This type is the one used by SWIG_TypePrettyName which is commonly used to display a type when the wrong type is passed in as a parameter. Previously the order was not very deterministic due to the use of internal hash tables which do not have an ordering guarantee.
* | Runtime tables deterministic ordering (3)William S Fulton2022-09-291-4/+7
| | | | | | | | | | | | | | | | | | | | Output conversion functions used in the type tables in sorted order. Sorted order in this case is the type being converted from. So _p_BarTo_p_Foo comes before _p_ZarTo_p_Foo. Previously the order was roughly in the order that the types were parsed, but not necessarily due to the use of internal hash tables which do not have an ordering guarantee.
* | Runtime tables deterministic ordering (2)William S Fulton2022-09-291-29/+34
| | | | | | | | | | | | | | | | | | | | Output conversion functions used in the type tables in sorted order. Sorted order in this case is the type being converted to. So _p_BarTo_p_Foo comes before _p_BarTo_p_Zoo. Previously the order was roughly in the order that the types were parsed, but not necessarily due to the use of internal hash tables which do not have an ordering guarantee.
* | Runtime tables deterministic ordering (1)William S Fulton2022-09-291-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many parts of the runtime tables are alphabetically sorted before for the generated code. This patch sorts the elements within the swig_cast_info lists. Order now is first the elements without a converter then the elements with a converter. For example: new: static swig_cast_info _swigc__p_Foo[] = { {&_swigt__p_Foo, 0, 0, 0}, {&_swigt__p_Bar, _p_BarTo_p_Foo, 0, 0}, {&_swigt__p_Spam, _p_SpamTo_p_Foo, 0, 0}, {0, 0, 0, 0}}; old: static swig_cast_info _swigc__p_Foo[] = { {&_swigt__p_Bar, _p_BarTo_p_Foo, 0, 0}, {&_swigt__p_Foo, 0, 0, 0}, {&_swigt__p_Spam, _p_SpamTo_p_Foo, 0, 0}, {0, 0, 0, 0}}; Previously the order was roughly in the order that the types were parsed, but not necessarily due to the use of internal hash tables which do not have an ordering guarantee.
* | Fix a few documentation typosOlly Betts2022-09-294-7/+7
| |
* | [php] Add php:allowdynamicproperties featureOlly Betts2022-09-294-4/+86
| | | | | | | | | | | | | | This follows PHP 8.2 deprecating dynamic features. The new feature also provides a clean way to fix the remaining PHP test case failure under PHP 8.2.
* | [ci] Revert continue-on-error for PHP 8.0Olly Betts2022-09-291-1/+0
| | | | | | | | Tests are now passing there.
* | [php] Fix testcase segfaults with PHP 8.0Olly Betts2022-09-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These testcases were segfaulting: prefix director_using_member_scopes virtual_poly The fix here is admittedly a hack - we perform the initialisation of EG(class_table) from CG(class_table) which PHP will do, but hasn't yet. PHP doesn't seem to clearly document which API calls are actually valid in minit or other initialisation contexts, but the code we're generating works with all PHP 7.x and PHP 8.x versions aside from PHP 8.0 so it seems this is a bug in PHP 8.0 rather than that we're doing something invalid, and we need to work with existing PHP 8.0 releases so this hack seems a necessary evil. It will at least have a limited life as PHP 8.0 is only in active support until 2022-11-26, with security support ending a year later. Fixes #2383.
* | [php] Suppress -Wdeclaration-after-statement in php.hOlly Betts2022-09-291-3/+22
| | | | | | | | | | | | | | | | In PHP 8.2 zend_operators.h contains inline code which triggers this warning and our testsuite uses with option and -Werror. I don't see a good way to only do this within our testsuite, but disabling it globally like this shouldn't be problematic.
* | [php] Workaround PHP 8.2 header problemOlly Betts2022-09-282-2/+8
| | | | | | | | | | We need to include php.h before stdio.h (and probably before most other libc headers).
* | [php] Adapt swig_ptr_cast_object for PHP 8.2Olly Betts2022-09-281-0/+2
| | | | | | | | | | The required return type has changed from int to an enum, which gives a compiler warning when we assign a function pointer.
* | [php] Avoid creating dynamic properties in testsuiteOlly Betts2022-09-283-0/+6
| | | | | | | | This gives a deprecation warning with PHP 8.2.
* | [php] Avoid deprecated interpolation syntaxOlly Betts2022-09-281-5/+5
| | | | | | | | Avoid syntax deprecated in PHP 8.2.
* | [ci] Temporarily allow PHP 8.0 and 8.2 to failOlly Betts2022-09-281-0/+2
| | | | | | | | | | I'm actively working on fixing them, but meanwhile we don't want PR jobs failing on these.
* | [ci] Fix CI to actually test PHP 8.0; add PHP 8.2Olly Betts2022-09-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The CI job for PHP 8.0 was relying on not specifying a version giving us PHP 8.0, but actually it gives us 8.1 currently. This seems too brittle, so always specify the version explicitly as at worst it means uninstalling and reinstalling PHP packages in a case we could avoid. Also add PHP 8.2 testing. See #2383
* | C# CreateWStringFromUTF32 optimisationWilliam S Fulton2022-09-221-2/+1
| | | | | | | | | | Avoid UTF-32 to UTF-8 conversion then get string from UTF-8 Issue #2369
* | Fixes for classes with the same name in different namespacesFrank Schlimbach2022-09-214-5/+109
| | | | | | | | | | | | Includes the majority of patch #1484. Excludes changes in typepass.cxx for specializations which have no effect on the duplicate_class_name_in_ns testcase, nor the rest of the test-suite.
* | Fix -Wmisleading-indentation in Octave wrappersWilliam S Fulton2022-09-201-1/+1
| |
* | Remove swig.spec fileWilliam S Fulton2022-09-205-82/+6
| | | | | | | | Discussion #2316
* | Merge pull request #2374 from friedrichatgc/fix_octave_horzcatWilliam S Fulton2022-09-193-6/+18
|\ \ | | | | | | Fix octave operator horzcat test
| * | Extended the documentation for octave operator overloadingMarkus Friedrich2022-09-181-0/+10
| | | | | | | | | | | | | | | | | | Octave has more operators than C++. These operators can be overloaded for the type swig_ref using the standard Octave Object Oriented Programming mechanism. This is now added to the documentation.
| * | Reenable and fix octave horzcat operator testMarkus Friedrich2022-09-182-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test was disabled with 0a0743f25cc0bbb395d03a27ac62887c8cbee5cf since it fails with octave 7.2.0 The test function horzcat now uses a variable length argument list to fix this. Before octave 7 it seems to be possible to call a N-argument octave function with > N arguments without any error. With octave 7 this seems no longer to be possible which caused the test failure.
* | | Move SWIG_Octave_Raise into a functionWilliam S Fulton2022-09-191-2/+9
| | | | | | | | | | | | For efficiency and to fix some warnings
* | | std::string throws typemapsWilliam S Fulton2022-09-1924-12/+225
| | | | | | | | | | | | | | | | | | | | | Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that thrown string exception messages can be seen. Test all language for std::string throws typemaps
* | | Add catches_strings test to test throws char * typemapWilliam S Fulton2022-09-1921-0/+286
| | |
* | | Add Racket throws typemaps for char *William S Fulton2022-09-191-0/+4
| | |
* | | Javascript v8 object to string exceptions improvementWilliam S Fulton2022-09-192-2/+2
| | |
* | | Javascript, Octave, R - Improve exceptions for %catchesWilliam S Fulton2022-09-198-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | and exception specifications for native types. Now the raised exception contains the string value as the exception message instead of just the C/C++ type of the exception. R exceptions were completely swallowed beforehand
* | | Make method wrappers suffix optional and disabled by defaultVadim Zeitlin2022-09-193-4/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the changes of 26bf86322 (Use SWIG-specific for non-overloaded synthesized functions too, 2021-11-09) did break some existing code bases using SWIG as they hardcoded the old wrapper function names. So turn this off by default and add a global variable allowing to enable this, which can be done for a specific language only. This is ugly but, unfortunately, there is no way to use the Language object from the C function Swig_MethodToFunction(), so the only alternative would be to add another parameter to it, but it already has 6 of them, so it wouldn't really be that much better. See #2366, #2368, #2370.
* | Add missing typecheck typemaps for std::auto_ptr and std::unique_ptrWilliam S Fulton2022-09-1759-2/+442
| | | | | | | | To fix overloading when using these types.
* | Correct error handling in Guile pointer conversionWilliam S Fulton2022-09-161-0/+2
| |
* | Guile - Add error checking to SWIGTYPE and SWIGTYPE & in typemapsWilliam S Fulton2022-09-162-2/+12
| | | | | | | | To prevent seg faults when passing #nil to these parameter types.
* | Provide SWIGTYPE MOVE typemaps in swigmove.iWilliam S Fulton2022-09-1641-19/+909
| | | | | | | | | | | | | | | | | | | | | | | | For implementing full move semantics when passing parameters by value. Based on SWIGTYPE && and std::unique_ptr typemaps which implement move semantics. Added for all languages, but untested for: Go, Ocaml, R, Scilab (and unlikely to be fully functional for same reasons as for std::unique_ptr support). Issue #999
* | .gitignore for Lua examplesWilliam S Fulton2022-09-161-0/+8
| |