Commit Graph

11 Commits

Author SHA1 Message Date
William S Fulton 61dffc06d1 %interface regression fix for multiple inheritance and common bases
Regressio introduced in 7592722.

Closes #2875
2024-09-07 20:07:17 +01:00
Julien Schueller 0d523d337d Fix -Wunused-variable warning 2022-10-24 09:34:10 +02:00
Olly Betts 631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
William S Fulton 7592722e39 Order of interfaces generated for %interface macros
Ensure the order of interfaces generated in proxy interfaces for the
%interface family of macros is the same as that parsed from the bases in C++.
2022-07-20 19:50:53 +01:00
William S Fulton 69dba70319 Visual C++ warning fix 2022-05-07 11:56:06 +01:00
William S Fulton a87e722834 Use GetFlag instead of Getattr for feature:interface 2022-03-12 23:04:24 +00:00
William S Fulton b6ece11fc1 Fixes for the family of %interface macros for overloaded methods
When C++ methods are not able to be overloaded in a derived class,
such as when they differ by just const, or the target language
parameters types are identical even when the C++ parameter types
are different, SWIG will ignore one of the overloaded methods with
a warning. A %ignore is required to explicitly ignore one of the
overloaded methods to avoid the warning message. Methods added
in the derived classes due to one of the %interface macros are now
similarly ignored/not added to the derived class.

The adding of additional methods into the parse tree is now more
robust and complete resulting in support for %feature and %rename
for the added methods.

Closes #1277
2022-03-12 23:04:24 +00:00
Olly Betts 55377bdc08 Add DOH Exit() and SetExitHandler()
Exit() is a wrapper for exit() by default, but SetExitHandler() allows
specifying a function to call instead.

This means that failures within DOH (e.g. Malloc() failing due to lack
of memory) will now perform cleanup such as removing output files.

This commit also cleans up exit statuses so SWIG should now reliably
exit with status 0 if the run was successful and status 1 if there was
an error (or a warning and -Werror was in effect).

Previously in some situations SWIG would try to exit with the status set
to the number of errors encountered, but that's problematic - for
example if there were 256 errors this would result in exit status 0 on
most platforms.  Also some error statuses have special meanings e.g.
those defined by <sysexits.h>.

Also SWIG/Javascript tried to exit with status -1 in a few places (which
typically results in exit status 255).
2022-03-06 12:33:54 +13:00
William S Fulton 665b09ffc9 Fix seg fault with %interface and using declarations 2017-08-21 18:34:51 +01:00
William S Fulton 5117c77d4a Interface feature fix for typedef types 2016-03-07 21:42:27 +00:00
William S Fulton a1245ef398 Re-organization of the interface feature common code
Move code to new feature.cxx file.
Activate it in the allocate phase rather than in individual languages.
2016-03-03 08:55:20 +00:00