Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 4.1.1 #175

Merged
merged 26 commits into from
Dec 2, 2022
Merged

Merge 4.1.1 #175

merged 26 commits into from
Dec 2, 2022

Conversation

sethrj
Copy link
Member

@sethrj sethrj commented Dec 2, 2022

No description provided.

wsfulton and others added 26 commits November 5, 2022 10:36
This was already in the manual, but not in -help output.

Fixes swig#2420
Synchronise test with Python version of testcase
Fix leak when a cast up a class inheritance chain is
required.

Adds implementation of SWIG_ConvertPtrAndOwn for R.

Closes swig#2386
when incorrect types passed are passed to the overloaded methods.

Old unhelpful error message:
  Error in f(...) : could not find function "f"

Example of new improved error message:
  Error in use_count(k) :
    cannot find overloaded function for use_count with argtypes (NULL)
- 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.
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.
Fixes infinite loop due to () brackets in a non-type template
parameter containing an expression

Fixes swig#2418

Non-trivial expressions are still not qualified properly though.
Signed-off-by: Alex <aleksandrosansan@gmail.com>
- swig library files must be installed relatively to the exe into PREFIX/bin/Lib
- unset SWIG_LIB_WIN_UNIX else swiglib returns a list of 2 paths which
  break cmake detection (and consistent to the provided windows binaries)
std::enable_if_t is in C++14, but std::is_integral_v
is in C++17
Fix undefined behaviour in swig's parser when handling default parameter
expressions containing method calls.

Fixes swig#2447

Conflicts:
	CHANGES.current
These cases don't trigger ubsan warnings and seem to work locally
for me, but CI was failing on a number of builds.

See swig#2447
Closes swig#961

Conflicts:
	Examples/test-suite/cpp17_enable_if_t.i
ccache.c:738:18: runtime error: null pointer passed as argument 1, which is declared to never be null
Fixes stderr redirect in testname CCACHE_CPP2, when the CCACHE_CPP2
environment variable is defined.

mdfour.c:91:20: runtime error: left shift of 139 by 24 places cannot be represented in type 'int'
Looks like this brings some stability to the md4 hash calculation.

Closes swig#2449

Conflicts:
	CHANGES.current
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`.
'Release version 4.1.1'
@sethrj sethrj merged commit 26536c5 into master Dec 2, 2022
@sethrj sethrj deleted the merge-4.1.1 branch December 2, 2022 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants