Python function annotations containing C/C++ types are no longer
generated when using the -py3 option. Function annotations support
has been moved to a feature to provide finer grained control.
It can be turned on globally by adding:
%feature("python:annotations", "c");
or by using the command line argument:
-features python:annotations=c
The implementation is designed to be expandable to support different
annotations implementations. Future implementations could implement
something like the following for generating pure Python types:
%feature("python:annotations", "python");
or typing module types to conform to PEP-484:
%feature("python:annotations", "typing");
Closes#1561
Issue #735
- Improved documentation for using declarations.
- Issue new warning WARN_LANG_USING_NAME_DIFFERENT when there
is a conflict in the target language name to be used when
introducing a method via a using declaration. Previously
the method was silently ignored. Issue #1840. Issue #655.
This commit handles multi-version support at runtime, it
fixes:
* 5.5.2 - with cutted long identifier name
* 6.0.0 - with full string identifier
* 6.1.0 - with 1 or 0 output argument
It also improves the codebase by:
* Using `Char(X)` instead of `DohCheck(X)` and `Data(X)`
* Using `Len(X)` instead of `strlen()`
* Correctly detecting old Scilab versions
Add test for original syntax when using a single fragment key containing
the list of dependent fragments. I couldn't find a test for this.
Spaces in the fragment list don't seem to work - document it.
The "command" encoder was mostly intended for use in `%rename` - most
uses can be achieved using the "regex" encoder, so we recommend using
that instead.
The "command" encoder suffers from a number of issues - as the
documentation for it admitted, "[it] is extremely slow compared to all
the other [encoders] as it involves spawning a separate process and
using it for many declarations is not recommended" and that it "should
generally be avoided because of performance considerations".
But it's also not portable. The design assumes that `/bin/sh` supports
`<<<` but that's a bash-specific feature so it doesn't work on platforms
where `/bin/sh` is not bash - it fails on Debian, Ubuntu and probably
some other Linux distros, plus most non-Linux platforms. Microsoft
Windows doesn't even have a /bin/sh as standard.
Finally, no escaping of the passed string is done, so it has potential
security issues (though at least with %rename the input is limited to
valid C/C++ symbol names).
Fixes#1806
We were passing flags of DOH_REPLACE_ANY|DOH_REPLACE_FIRST in three
places, which doesn't make sense as those are mutually exclusive
concepts. In the current implementation DOH_REPLACE_FIRST wins in
this situation, so replace with that and clarify the docs.
Drop a method which has been deprecated then removed in Qt (but isn't
actually used in the example anyway) and clean up the steps a bit.
The example still doesn't build for me as the final step fails with:
File "_none_", line 1:
Error: Module `Dynlink' is unavailable (required by `Camlp4')
I know next to nothing about ocaml, so that may be something I've
failed to install, but I couldn't work out what. I think the Qt
library linking needs updating too - there doesn't seem to be a
single `-lqt` now, but I don't use Qt either.
Remove redundant NULL checks before free()/delete
The ISO C and C++ standards guarantee that it's safe to call these
on a NULL pointer, so it's not necessary for the calling code to
also check.
Fixes https://sourceforge.net/p/swig/feature-requests/70/
It was not obvious to at least one person that namespaces need to be
unignored just like classes and methods. Add an explicit reference to
that in the docs.
Also add something to unignore all classes in the example that shows how
to ignore all classes, as that might not be obvious.
Fixes#193
In the example for ignoring everything, it didn't show how to undo the
ignore all, and the obvious '%rename("") ""' didnt work.
'"%rename("%s") ""' is the right way to do that, so add it to the
example.
Fixes#2173
The example I recently added about renaming didn't compile. Here's the
fix.
There was also a use of the term "override" which should have been
changed to "replace".
Per comments on the merge request, this is the appropriate place for it,
and add a reference to it from the structures and unions section so
someone looking there will see it.
Also remove the changes in Contents.html, since that is regenerated and
those changes are just noise in the commit.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Document extern template functions support.
Extern templates result in new warning to differentiate
from template explicit instantiation definition warning.
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.