Commit graph

23,263 commits

Author SHA1 Message Date
Olly Betts
7eb54a38b1 Note workaround for -DFOO change
Code relying on FOO being defined as empty needs to change, but can
just use -DFOO= instead and remain compatible with older SWIG.

Fixes #2363
2022-09-14 10:11:36 +12:00
William S Fulton
ad1688055d Correct TCL integers testcase for 32-bit platforms 2022-09-09 22:53:29 +01:00
William S Fulton
c09020853d Update comments re _DEBUG redefinition before including Python.h 2022-09-09 22:53:29 +01:00
William S Fulton
0c2d0fea0f Move SwigValueWrapper to header section
Recent change to SwigValueWrapper required the <utility> header.
Included headers should be after the include of the language
specific header files (which go into the earlier runtime section).

Testcase required -Winit-list-lifetime warning suppression change
for Perl which somehow lost the warning suppression when put
into the %begin section.
2022-09-09 19:36:08 +01:00
William S Fulton
dcb2544a43 Visual C++ debug builds linking to Python release builds
Only use the corecrt.h workaround for #2090 when using
SWIG_PYTHON_INTERPRETER_NO_DEBUG as the problem seems to only
occur when undefining _DEBUG.

Also extend workaround for Visual Studio 2019 version 16.10 and 16.11
as per #2174 (_MSC_VER=1929).
2022-09-09 19:03:40 +01:00
William S Fulton
26c0a0c152 CHANGES file tweaks 2022-09-09 19:01:54 +01:00
William S Fulton
0a0743f25c Temporarily remove Octave concatenation test broken in octave-7.2.0 2022-09-09 08:46:26 +01:00
William S Fulton
db432300a9
Merge pull request #2344 from clintonstimpson/py3-slice-object
Use PyObject instead of PySliceObject throughout with Python 3.2+
2022-09-08 20:14:12 +01:00
William S Fulton
c79f7f3d85 Merge branch 'rvalue-move'
* rvalue-move:
  rvalue reference outputs
  Remove broken %implicitconv for const SWIGTYPE &&
  Remove unnecessary const SWIGTYPE & typemap
  Temporarily remove rvalue reference python runtime test
  std::auto_ptr emulation fix in test case
  Ocaml typemap typo fix
  Fix Racket tests using schemerunme directory
  Docs on rvalue parameter changes
  Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
  Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []
  Racket - NULL pointer handling
  SWIGTYPE && input typemaps now assume object has been moved - Go and OCaml
  SWIGTYPE && input typemaps now assume object has been moved
  SWIGTYPE && input typemaps now assume object has been moved - Java
  Cosmetic stray semi-colon removal after %typemap using quotes
  Cosmetic stray semi-colon removal after %typemap
2022-09-08 19:50:31 +01:00
William S Fulton
7ff686c5c1
Merge pull request #2352 from clintonstimpson/py_version_tag
Python:  Use PyType_Modified() instead of modifying flags.
2022-09-08 19:47:04 +01:00
William S Fulton
2212af3f4f rvalue reference outputs
Document rvalue reference outputs behaviour
Test rvalue reference outputs
2022-09-08 08:46:32 +01:00
Clinton Stimpson
e683168018 Use PyObject instead of PySliceObject throughout with Python 3.2+
This supports use of the Py_LIMITED_API.
2022-09-05 22:04:51 -06:00
William S Fulton
c5495fea79 Remove broken %implicitconv for const SWIGTYPE &&
Typemaps should be for SWIGTYPE &&, not just const SWIGTYPE &&.
Needs updating for new approach where the proxy object is moved
for a parameter containing an rvalue reference.
2022-09-05 09:20:59 +01:00
William S Fulton
859264ab94 Remove unnecessary const SWIGTYPE & typemap
This is a duplicate of SWIGTYPE & and the typemap rules result
in SWIGTYPE & being used if there is no const SWIGTYPE & tyemap.
2022-09-05 08:23:58 +01:00
William S Fulton
3ad1626dd3
Merge pull request #2351 from sashashura/patch-1
GitHub Workflows security hardening
2022-09-03 06:16:09 +01:00
William S Fulton
4588c41646 Temporarily remove rvalue reference python runtime test
Work in progress: SWIGTYPE && out typemaps need to take ownership
2022-09-03 05:53:54 +01:00
William S Fulton
c6664703f6 std::auto_ptr emulation fix in test case 2022-09-03 05:49:13 +01:00
William S Fulton
de13a0020b Ocaml typemap typo fix 2022-09-03 05:37:13 +01:00
Clinton Stimpson
2a0abbb7f6 Python: Use PyType_Modified() instead of modifying flags.
Closes #2345
Also supported with Py_LIMITED_API
2022-09-02 15:54:28 -06:00
William S Fulton
4c58bb558f Fix Racket tests using schemerunme directory
For out of source builds
2022-09-02 19:17:38 +01:00
Alex
891367d792
Update ci.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-02 17:07:45 +01:00
William S Fulton
0b1d3e3e86 Docs on rvalue parameter changes 2022-09-02 08:24:30 +01:00
William S Fulton
7934561874 Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
Also add missing unique_ptr tests for Lua and Racket.
2022-08-31 19:42:55 +01:00
William S Fulton
ca9eebcb8d Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []
SWIG has always marshalled the null matrix into a NULL pointer; this remains
and now we have consistency in representing a NULL pointer.

This is a pre-requisite for a pending commit to fully support std::unique_ptr.
2022-08-31 19:40:13 +01:00
William S Fulton
2cfd77b1c0 Racket - NULL pointer handling
SWIG now converts a C/C++ NULL pointer into a null value by calling
scheme_make_null(), so that scheme's null? is true for a NULL C/C++
pointer value.

Consistency with Guile and needed for a pending commit for handling
NULL and std::unique_ptr.
2022-08-31 19:40:13 +01:00
William S Fulton
3f622ea65e SWIGTYPE && input typemaps now assume object has been moved - Go and OCaml
Not fully implemented and Untested.
Go's implementation needs fixing to fully support typemaps
before this can be done.
OCaml implementation does not have support for releasing ownership
which is required to add error checking preventing double deletes.
2022-08-31 19:40:13 +01:00
William S Fulton
e139a36511 SWIGTYPE && input typemaps now assume object has been moved
Replicated Java implementation.

Fully implemented for:
- C#
- D
- Guile
- Javascript (UTL)
- Lua
- MzScheme
- Octave (UTL)
- Perl (UTL)
- PHP
- Python (UTL)
- Ruby (UTL)
- Tcl (UTL)

PHP std::auto_ptr std::unique_ptr minor tweaks and testcase corrections
2022-08-31 19:40:14 +01:00
William S Fulton
0634883089 SWIGTYPE && input typemaps now assume object has been moved - Java
Implementation tweak - better RAII.
SWIGTYPE && null pointer check.
2022-08-31 19:40:13 +01:00
William S Fulton
c10a84c775 Cosmetic stray semi-colon removal after %typemap using quotes 2022-08-31 19:40:13 +01:00
William S Fulton
ec965840ce Cosmetic stray semi-colon removal after %typemap 2022-08-20 15:29:49 +01:00
William S Fulton
0ba11023ac Rename debug in testcases to trace
To remove D specific keyword rename
2022-08-20 15:09:23 +01:00
sethg
ae0e62dd1a Test using version rather than help 2022-08-20 16:02:45 +02:00
sethg
dbebb2dac8 Add GitHub Action to test Windows builds using Nuget as described in the docs 2022-08-20 15:54:27 +02:00
William S Fulton
48c644ea6e Add Racket support for std::unique_ptr and std::auto_ptr
Equivalent to Guile implementation.

Slight tweak to proxy ownership was required by adding in
the own member to swig_mz_proxy.
2022-08-18 22:45:03 +01:00
William S Fulton
5365149ae4 Guile testing
- call gc instead of explicitly calling the destructor
- Guile li_std_auto_ptr testcase tweaks intended for use from Racket
2022-08-18 22:45:03 +01:00
William S Fulton
63143e8773 Guile testing - call gc instead of explicitly calling the destructor 2022-08-18 21:42:25 +01:00
William S Fulton
5b16e4fbd3 Guile cpp11_std_unique_ptr testcase tweaks for use from Racket 2022-08-18 21:31:20 +01:00
William S Fulton
c9f5a85e45 Add Racket test for %newobject
Uses common mzscheme test, but corrections for Racket error:

if: bad syntax (must have an "else" expression)
2022-08-17 08:16:47 +01:00
William S Fulton
748bad3db2 Add guile test for %newobject 2022-08-15 19:56:31 +01:00
William S Fulton
23ce0655a6 Add Guile support for std::unique_ptr and std::auto_ptr
Equivalent to Python/Ruby implementations.
2022-08-12 23:50:54 +01:00
William S Fulton
3a0721bfbc Remove inadvertent guile testing of auto_ptr and unique_ptr 2022-08-11 22:12:19 +01:00
William S Fulton
b34092c517 Add -pthread to lua testing
Required to fix linker errors in li_std_auto_ptr and cpp11_std_unique_ptr test cases
2022-08-11 22:08:10 +01:00
William S Fulton
41fddf61ec Add Lua support for std::unique_ptr and std::auto_ptr
Equivalent to Python/Ruby implementations.
2022-08-11 21:38:21 +01:00
William S Fulton
63632f80fb Correct raw pointer handling test for virtual inheritance 2022-08-11 18:44:36 +01:00
William S Fulton
1f2338bf41 Typo fix in Go.html 2022-08-11 07:20:04 +01:00
William S Fulton
6436c9408a GHA: Add ruby-3.1 testing 2022-08-07 08:12:49 +01:00
William S Fulton
fa9c7a7197 Add PHP support for std::unique_ptr and std::auto_ptr
Equivalent to Python/Ruby implementations.
2022-08-06 18:34:26 +01:00
William S Fulton
d4b1152d4b Add raw pointer handling test for virtual inheritance
This is a test added for D in previous commit, now expanded to all target languages.

Tidy up counting object instances.
2022-08-05 22:30:23 +01:00
William S Fulton
910fd1e3cf [D] Fix occasional undefined behaviour with inheritance hierarchies
Particularly when using virtual inheritance as the pointers weren't
correctly upcast from derived class to base class when stored in the
base's proxy class.

Fixes commented out test code in cpp11_std_unique_ptr_runme
and li_std_auto_ptr_runme D tests.
2022-08-05 22:30:23 +01:00
William S Fulton
5a379d317b Add Tcl support for std::unique_ptr and std::auto_ptr
Equivalent to C#/Java implementations.
2022-08-05 22:30:23 +01:00