Commit graph

22,458 commits

Author SHA1 Message Date
Olly Betts
5f5a8f2d4a [php] Initialise zval in directorin typemaps
SWIG_SetPointerZval() requires the zval structure passed to be
initialised (so it can handle the constructor case where the zval is
already initialised as a PHP object.

I couldn't think of a suitable regression test for this, but it fixes 2
issues detected by running director_basic under valgrind.
2022-01-24 13:32:22 +13:00
Olly Betts
901d1fc061 Fix comment typo 2022-01-24 12:16:26 +13:00
William S Fulton
3de6fbddab Correct cmake pcreversion test 2022-01-22 23:36:08 +00:00
William S Fulton
7f42e2b3ca Cosmetic updates in mkwindows.sh 2022-01-22 16:36:11 +00:00
William S Fulton
99ceab2cdf Building SWIG on Windows doc re-organisation 2022-01-22 16:36:03 +00:00
William S Fulton
543994c8ee Merge branch 'pcre2' into upstream-master
* pcre2:
  Add changes entry for PCRE2
  Call -pcreversion during appveyor testing
  Few more PCRE to PCRE2 changes
  PCRE2
2022-01-22 16:35:51 +00:00
Olly Betts
5656da3f31 [php] Add runmes for more director testcases 2022-01-22 21:12:13 +13:00
Olly Betts
7b929dce82 [php] Fix director upcall check
This resolves an issue uncovered by adding a _runme.php for testcase
director_alternating.
2022-01-22 20:01:00 +13:00
Olly Betts
87c2e7d71a [php] Fix long long handling on 32 bit platforms
The typemaps for long long and unsigned long long didn't handle a
string input correctly, and long_long_runme.php had a flawed test
in this case.

Fixes #2155
2022-01-22 13:09:34 +13:00
Olly Betts
9b10534879 [php] Make internal function wrappers static 2022-01-22 13:03:58 +13:00
William S Fulton
8939470b05 Add changes entry for PCRE2 2022-01-21 19:22:11 +00:00
William S Fulton
da8eb35a51 Call -pcreversion during appveyor testing 2022-01-21 18:35:37 +00:00
William S Fulton
f8e4a5cc25 Few more PCRE to PCRE2 changes 2022-01-21 18:35:20 +00:00
Julien Schueller
15515f390c PCRE2
Closes #2120
2022-01-21 07:46:08 +01:00
Olly Betts
1c76000e38 [php] Add type declarations for optional params too
See #2151
2022-01-21 16:34:59 +13:00
Olly Betts
5d0679668d [tcl] Drop remnants of support for Tcl < 8
The documented minimum has been Tcl 8.0 since before the great
merge in 2002.
2022-01-21 15:54:06 +13:00
Olly Betts
4f5dfd596d [php] Provide zend_class_implements_interface() for 7.x
It seems instanceof_function_ex() isn't a viable option for PHP 7.3 and
earlier - the implementation is strangely wrong.

So let's just provide a compatibility implementation which does what
zend_class_implements_interface() does in 8.x and use that for all 7.x
so there are fewer variants to worry about testing.
2022-01-21 14:32:36 +13:00
Olly Betts
91470ca62d [php] Actually generate parameter type declarations 2022-01-21 13:27:54 +13:00
Olly Betts
772ea68084 [php] Fix minor version test 2022-01-21 13:09:47 +13:00
Olly Betts
c197ed719a Fix unterminated comment in previous commit
I'm an idiot - I noticed I'd used a // comment after testing, but failed
to retest after fixing that.
2022-01-21 12:34:38 +13:00
Olly Betts
ce4a9923ed [php] Fix zend_class_implements_interface() compat
The sense of parameter 3 of instanceof_function_ex() appears to have
changed in PHP 7.4 and we need to pass 0 for older versions and 1 for
PHP 7.4.  Words fail me.
2022-01-21 12:11:39 +13:00
Olly Betts
4d3d4839b0 [python] Add multivalue_runme.py 2022-01-21 11:10:30 +13:00
Olly Betts
d43f28a666 [php] Use -prefix setting in type declarations 2022-01-21 11:08:24 +13:00
Olly Betts
c417250b4e [php] Allow testing if an object is SWIG-wrapped
Since the switch to wrapping classes using PHP's C API, we now
internally need to be able to tell if a PHP object is of or derived
from a class that is wrapped by SWIG so we know if we can offset the
zend_object pointer to get to the swig_object_wrapper.  If we try to
do this to an object which isn't wrapped by SWIG then we invoke C/C++
undefined behaviour (and typically get a segmentation fault).

This check is implemented by having a SWIG\wrapped empty interface which
we make all SWIG-wrapped classes implement simply so we can test for it
to detect such classes.

Fixes #2125
2022-01-20 14:42:02 +13:00
Olly Betts
0cfc750d44 CHANGES.current: Add entry for previous commit 2022-01-20 10:17:57 +13:00
Olly Betts
1f1349741f
[php] Generate PHP type declarations
We now automatically generate PHP type declarations for PHP >= 8.0.

The generated code still compiles with PHP 7.x but without type declarations.
2022-01-20 10:07:44 +13:00
William S Fulton
76d5a9ec27 gcc-12 warning fix in test-case
Closes #2145
2022-01-18 21:37:02 +00:00
Olly Betts
748a9a5452 [perl] Require at least Perl 5.8.0
As discussed and agreed in #1629, it's become hard to test with Perl
5.6 or earlier, such old versions are no longer in active use, and
4.1.0 is an appropriate time to make such a change.

I've dropped the compatibility code that was obvious to me, but there's
probably more that can be cleaned up now.
2022-01-19 10:07:30 +13:00
William S Fulton
8c608d646c Fix Appveyor mingw builds - install autotools 2022-01-18 21:03:21 +00:00
William S Fulton
c8645aab9e Ensure GHA fails when testflags.py fails 2022-01-18 21:03:21 +00:00
Olly Betts
c839066405 [perl] Document explicitly not to use %OWNER directly
See #1771
2022-01-18 14:53:02 +13:00
Olly Betts
45c1255933 Fix missing HTML escaping in Octave docs 2022-01-18 13:56:07 +13:00
Olly Betts
0fbf23a77b Fix PHP docs formatting issue 2022-01-16 12:36:05 +13:00
William S Fulton
2272d00c1a Add Python testcase for testing flatstaticmethod syntax
For testing legacy flattened static method access for when
issue #2137 is applied.
2022-01-15 00:05:06 +00:00
William S Fulton
3aa302c08f %callback and Python class access for C++ static member functions fixes
Fix access to C++ static member functions using Python class
staticmethod syntax, such as Klass.memberfunction instead of
Klass_memberfunction, when using -fastproxy and -builtin in
combination with %callback.

The docstring containing the callback pointers were not being patched
during module initialisation.
2022-01-14 23:00:59 +00:00
William S Fulton
627f7214db [Python] Add missing Python kwargs builtin support
Accept keyword arguments accessing C++ static member functions when
using -builtin and kwargs feature and Python class staticmethod syntax.
The missing keyword argument support was only when using the
class staticmethod syntax, not when using the flat static method
syntax.
2022-01-14 23:00:42 +00:00
William S Fulton
cf8788c411 Update Python tests to not use flatstaticmethod access
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
2022-01-14 22:48:11 +00:00
Vadim Zeitlin
7610997209 Stop using Travis CI which doesn't work any longer
Unfortunately Travis CI can't be used for building open source projects
any longer in practice, as extra credits must be manually requested
every time from Travis support, which is just infeasible, as this would
need to be done every couple of days if not more often, and support
reply time is anything from a couple of days to more than a month.

So stop even trying to use it, as it doesn't work anyhow, and switch to
using GitHub Actions only.

Closes #2067
2022-01-10 20:31:28 +00:00
William S Fulton
b98c78441f GHA debug via ssh info 2022-01-10 20:13:16 +00:00
William S Fulton
3200a815d4
Merge pull request #2095 from vadz/extend-suffix
Use suffix for static methods added by %extend
2022-01-08 21:11:14 +00:00
William S Fulton
0a400f5230 Building distribution fixes and pcre version display
[skip-ci]
2022-01-08 19:23:02 +00:00
William S Fulton
3530b3356c Add recent change to changes file 2022-01-08 16:29:18 +00:00
ERROR
d73f933c4b
Support std::array in Golang (#2045)
Support std::array in Golang

Closes #2045
2022-01-04 12:12:56 +13:00
Olly Betts
48eba82ac8 Remove obsolete code to set SWIG_V8_VERSION
We've dropped support for the old V8 versions which lacked version
macros, and SWIG_V8_VERSION now gets automatically defined by
Lib/javascript/v8/javascriptruntime.swg which will #undef it first if
it's already defined.
2021-12-29 19:16:36 +13:00
Olly Betts
130813b320 Escape a literal > in PHP.html 2021-12-29 19:15:08 +13:00
Olly Betts
9e95f7f996 [php] Add director_ownership_runme.php
This serves as a regression test for
https://sourceforge.net/p/swig/bugs/1339/ which was presumably fixed by
the change to use PHP's C API to wrap classes.
2021-12-29 15:48:40 +13:00
Olly Betts
fa36d6fd28 [python] Add 3.10 to Python versions in configure 2021-12-24 16:43:25 +13:00
Olly Betts
c42e8970a4 [php] Improve wording in the manual 2021-12-24 15:53:00 +13:00
Olly Betts
9f87d81fae Clean up testcase source whitespace 2021-12-23 16:18:07 +13:00
Olly Betts
860731e0ea Remove redundant test cases
With C++ comments changed to C comments, these are now identical to
the two cases just above, aside from the `2` suffix on the names.

Follow-on for #2027.
2021-12-23 11:55:47 +13:00