Commit Graph

25102 Commits

Author SHA1 Message Date
William S Fulton 1a799ee26e Update Tcl examples to Visual Studio 2019 project files 2024-10-19 23:43:25 +01:00
William S Fulton 7a1f9c345e Update Java examples to Visual Studio 2019 project files 2024-10-19 22:00:22 +01:00
William S Fulton 953e280f5e Update Python examples to Visual Studio 2019 project files 2024-10-19 15:45:21 +01:00
William S Fulton ef6e97ede2 Cleanup C# vcxproj files removing warnings 2024-10-19 15:36:08 +01:00
William S Fulton 3de322c13a Update C# examples to Visual Studio 2019 solutions 2024-10-19 15:36:08 +01:00
William S Fulton 46bee2dc83 Potentially uninitialised variable warning in visual c++ suppression 2024-10-19 16:15:43 +01:00
Olly Betts c1e0a68f86 Fix regression wrapping default const bool argument
We need to strip qualifiers before checking the type is `bool`.

This mainly affects Python.  In Ruby there's equivalent code, but
it is only use to generate documentation comments.

Fixes #3052
2024-10-19 15:48:04 +13:00
Olly Betts e528260b83 [ruby] Fix doc comments for bool parameter default value
Documentation comments now use `true` and `false` for bool parameter
default values, instead of `True` and `False` (which are the Python
names and wrong for Ruby!)
2024-10-19 15:46:25 +13:00
Olly Betts 500d3e1470 [python] Only include structmember.h if we need it
This header pollutes the namespace and can cause clashes with the
API being wrapped so it's helpful to only include it when we actually
need to (we actually never need to currently, but will if/when
SWIG_HEAPTYPES is fixed to work with -builtin).

See #2350
2024-10-19 13:58:11 +13:00
William S Fulton 07a7c939e3 Add nested classes to parse tree dumped out by -xml
Previously the parse tree contained the forward class declaration for
nested classes, the <classforward> XML element as nested class
support had not been turned on during parsing for -xml. The nested
class support has now been turned on so that the nested classes appear
in the parse tree in a <class> XML element.

Closes #874
2024-10-17 00:41:44 +01:00
William S Fulton af0e1e035d Error out if more than one target language specified
Multiple target language options were previously quietly ignored and only the last one was used.
2024-10-17 00:05:56 +01:00
William S Fulton 0135d04ace Documentation tweaks, additions for XML handling
Closes #2213
2024-10-17 00:05:52 +01:00
William S Fulton 8f8a7e7a04 Drop napi testing with C++11
The latest node headers require c++17 again
2024-10-15 08:59:51 +01:00
William S Fulton 49d393c042 Updates and corrections in the Preface chapter 2024-10-15 08:59:51 +01:00
William S Fulton 4516ddb8c3 Change Python example to use SWIG_AppendOutput 2024-10-15 08:59:51 +01:00
William S Fulton 86498e46c6 Remove -xmllang option used with -xml
which had no effect on the output.
2024-10-15 08:59:51 +01:00
William S Fulton 0d71191ece Update changes file for append functions
[skip ci]
2024-10-14 21:53:36 +01:00
William S Fulton 42b9e254f0 Use Py_ prefixed names Py_T_PYSSIZET and Py_READONLY
Prefer these over their globally polluting old names
2024-10-14 08:49:27 +01:00
William S Fulton 05c1f48166 Only include structmember.h for newer Python versions
structmember.h is only needed for python-3.11 and earlier.
Confines the global namespace pollution that it contains to just the older Python versions.
2024-10-11 19:07:08 +01:00
William S Fulton 56314f811d Keep to lowercase convention for PY_VERSION_HEX 2024-10-11 19:01:34 +01:00
Olly Betts 4be9274c82 Fix bug handling 0xff after #
We were treating byte 0xff as EOF after a `#` which wasn't handled by
the preprocessor on platforms with signed char, while EOF was treated as
byte 0xff on platforms with unsigned char.
2024-10-09 08:25:08 +13:00
William S Fulton ea8aa84b28 Documentation generation fix and update to changes file 2024-10-07 20:10:14 +01:00
Olly Betts c77db0468e Wrap entries to 80 columns
Some entries seem to have be wrapped at about 90 columns which makes
the text unnecessarily hard to read with the common terminal width of
80 columns.  Probably a result of cutting and pasting from git commit
messages and then indenting by 12 columns.
2024-10-08 08:01:18 +13:00
Olly Betts 35394740a4 Add note as to when t_output_helper was deprecated
Let's help our future selves know when it is reasonable to remove this.
2024-10-08 07:43:42 +13:00
Olly Betts 2c3e1ec749 Wording tweak 2024-10-07 13:36:55 +13:00
Olly Betts 5963c41c78 Avoid unused static function warnings
Mark SWIG_Php_AppendOutput as SWIGINTERN rather than static so it gets
the appropriate unused annotation for compilers that support that.
2024-10-07 13:35:36 +13:00
William S Fulton c85e7ff8ea Move SWIG_Php_AppendOutput out of the t_output_helper to the runtime
This append helper is now always in the runtime following the pattern
for all the other scripting languages.

The t_output_helper fragment is no longer needed to use
t_output_helper(), SWIG_Php_AppendOutput() nor SWIG_AppendOutput().
2024-10-06 20:34:05 +01:00
William S Fulton bb796b632a PHP - Fix returning NULL when using OUTPUT and INOUT typemaps.
Also replace t_output_helper with SWIG_AppendOutput and SWIG_Php_AppendOutput.

t_output_helper is deprecated. Replaced with the
commonly used SWIG_AppendOutput in other languages.

See #2907
2024-10-06 20:04:28 +01:00
William S Fulton 9e9e5e0312 Go code refactor to use is_void and returntype
Cosmetic, no change
2024-10-06 16:35:13 +01:00
William S Fulton 09001ee302 Add $isvoid special variable expansion for directors
Complete the removal of Ruby's output_helper macro and replacement
with SWIG_AppendOutput for director typemaps.
Requires $isvoid special variable support in director code.
2024-10-06 15:00:37 +01:00
William S Fulton a95017050e More maintainable warning messages 2024-10-06 12:28:17 +01:00
William S Fulton e3f35b4c5a Add inout testcase runtime tests for Guile 2024-10-06 11:54:10 +01:00
William S Fulton d6810a671d Add inout testcase runtime tests for Perl 2024-10-06 10:19:13 +01:00
William S Fulton df87bbe437 inout_typemaps test rework
Use more distinct numbers, now consistent across all languages
2024-10-06 08:57:41 +01:00
William S Fulton 822e1f46ec Fix test-suite warning suppressions
Warning strings with _MSG suffix were being used instead of warning
numbers, which is not strictly correct.
2024-10-06 00:59:12 +01:00
William S Fulton 53275db3e9 Suppress testcase warning 2024-10-06 00:50:14 +01:00
William S Fulton 94e320f4b0 Remove Ruby output_helper fragment and macro
Use SWIG_AppendOutput instead of output_helper (does not require the
output_helper macro).
2024-10-06 00:36:57 +01:00
William S Fulton d7c90c8f8f Rename inout testcase to inout_typemaps
inout is a D keyword
2024-10-06 00:11:40 +01:00
William S Fulton d85003849c Revert "Disable napi 18 CI tests"
This reverts commit 1f35c64e41.

Working again now!
2024-10-05 23:29:34 +01:00
William S Fulton 60a476982a Run inout testcase for all languages except D 2024-10-05 23:29:34 +01:00
William S Fulton 1e5eec5632 Ruby fix for non-void functions using INOUT typemaps
Add Ruby inout runtime test
2024-10-05 23:29:34 +01:00
William S Fulton d630e6f118 Add inout testcase runtime tests for tcl 2024-10-05 23:29:34 +01:00
William S Fulton 74560180ec Scilab testing of INOUT for non-void function 2024-10-05 23:29:34 +01:00
William S Fulton 8e65f9101e Add inout octave test
INOUT is not functional for more than one INOUT argument
2024-10-05 23:29:34 +01:00
Olly Betts c61da55db4 Remove unused field in struct Scanner
This was being initialized to NULL but never actually used.  The
filename gets tracked via the String objects being scanned.
2024-10-06 08:07:26 +13:00
Olly Betts dbbe636631 [doc] Add note that -dirvtable currently causes leaks
See https://sourceforge.net/p/swig/bugs/1073/
2024-10-06 07:48:29 +13:00
William S Fulton a9ececf43c html fix
[skip ci]
2024-10-04 22:34:40 +01:00
William S Fulton e6c9634c7d html fixes 2024-10-04 22:20:43 +01:00
William S Fulton 3f8e63c41d All you need to know about 'swig/python detected a memory leak' 2024-10-04 22:18:18 +01:00
Olly Betts e587e2be0d Fix DOH Printf formatting for %ld, %lld, etc
These were not handled correctly when sizeof(long) != sizeof(int)
or sizeof(long long) != sizeof(int) respectively.
2024-10-02 10:47:24 +13:00