Commit Graph

2039 Commits

Author SHA1 Message Date
William S Fulton 7c478b5e17 Note the LENGTH STRING typemap changes and tidy up 2025-07-28 23:02:52 +01:00
Erez Geva cb68446ece Fix Length & string reverse order typemap.
And add it to missing languages: C#, Java, Lua, PHP.

Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
2025-07-28 17:07:42 +02:00
crusaderky 6b556a6a1c Add -nogil opt-in flag to remove need for PYTHON_GIL=0
Closes #3215
2025-07-18 22:41:36 +01:00
William S Fulton 98641c78a2 Correct some docs about javapackage
Closes issue #2776

[ci-skip]
2025-06-28 16:09:06 +01:00
William S Fulton 1fa70fb4a7 Java docs enhancement for handling deleted objects
[skip-ci]
2025-06-27 18:36:04 +01:00
Ian Lance Taylor 93d67c9549 [Go] Use unsafe.Slice and unsafe.String in Go fragments
The existing code didn't work correctly for strings longer than 2GB.

This does require using at least Go 1.20, but that should be OK as
the last currently supported version of Go is 1.22.

This restores commit ff5c118aaa which
was rolled back by commit fe3a7af855
because Go was generating C code that uses declarations after
statements. The original commit now works because 1) commit
e0ecea47b1 sets the C standard to use,
and 2) the current minor versions of the relevant Go releases were
fixed to put the declarations first.

Fixes #3125
2025-06-25 13:55:43 -07:00
Julien Schueller 6c3bc2d18a Python: Use multi-phase initialization
Implements https://peps.python.org/pep-0489/
Bumps minimal python3 version from 3.4 to 3.5.
The idea is to move the initialization of the module into a new SWIG_mod_exec function.

Closes #3168
2025-06-23 22:04:47 +01:00
Olly Betts 43cc74f85d Clarify Java docs
In fact "javagetcptr" and "javaptrconstructormodifiers" were completely
removed, not just deprecated.
2025-06-17 14:14:14 +12:00
William S Fulton 7df18106fc Add SwigPyObjectType and SwigPyStaticVar to the swig runtime module
for default case (they have just been added for -builtin and
SWIG_HEAPTYPES in previous couple of commits).

These are only used by -builtin and were missed when when moving
SwigPyObject, SwigPyPacked and SwigVarLink were added to the swig
runtime module. Should fix potential warnings for these two types:

  DeprecationWarning: builtin type has no __module__ attribute

although this has not been seen in the test-suite.
2025-06-07 10:17:09 +01:00
Olly Betts 739997707c Handle C++14 auto return type function declaraction
Fix parse error for C++14 forward declaration of function with auto
return type and no trailing return type.

Fixes #3186
2025-05-28 14:10:03 +12:00
William S Fulton 6353914211 Documentation heading updates 2025-05-13 22:25:20 +01:00
William S Fulton 831fc60691 Add docs on the python runtime module 2025-05-13 21:49:37 +01:00
William S Fulton e1cf7b37ac Edit last few commits for python-3.14 and 3.15 support
GHA - python-3.14 testing changed to "can fail" as 3.14 is still in alpha status.

Restore __package__ fallback check as it was.

Correct docs given the import changes.

Issue #3159
Issue #2967

more
2025-04-28 22:57:17 +01:00
Julien Schueller 50e1cc8bc0 Python: Handle __package__ removal
Closes #2967
2025-04-25 22:13:46 +02:00
William S Fulton 4167b0275a Free threading python doc improvements
Move free threading docs to section on multithreading and clarify that users must make their own
code thread-safe.

Issue #3137
[skip ci]
2025-04-25 08:35:16 +01:00
William S Fulton c1cc807d50 Enhance docs for copying typemaps using
Issue #2521
[skip ci]
2025-04-25 07:53:58 +01:00
William S Fulton b0c7e23858 Add link to Python free threading site
See issue #3121
[skip ci]
2025-04-20 18:46:19 +01:00
William S Fulton 298c489dc6 Add docs for free threading Python
'make check-python-version' now uses -VV so that a free threading build
can be identified.
2025-04-17 18:51:33 +01:00
William S Fulton d96024bb0e HTML correction - release is in progress 2025-04-15 23:04:24 +01:00
Olly Betts c3b29f87ff Update manual section numbers 2025-04-01 14:05:28 +13:00
Olly Betts f3ea85af0b [MzScheme/Racket] Drop support
Closes #920
Closes #2830
2025-04-01 14:05:28 +13:00
William S Fulton 26b0911a74 Add support for $n special variable expansion in the names of typemap local variables
For example:

  %typemap(in) int MYINT (int $1_temp) { ... }

$1_temp is typically expanded to arg1_temp, arg2_temp etc depending on
which argument the typemap is applied to.
2025-02-19 20:44:40 +00:00
William S Fulton dcca453b45 More %interface docs
Improvements given comments in issue #3100.
2025-01-27 20:35:26 +00:00
William S Fulton e1b2d20f61 Destructor declaration correction in docs 2025-01-24 19:20:34 +00:00
William S Fulton db6f488fef Correct docs for libraries requiring .NET 4 2024-11-26 19:36:25 +00:00
William S Fulton 1e45590221 Add memory access violation message to C# docs
See #3006
2024-11-22 07:45:59 +00:00
William S Fulton d9edb22d1c %apply and typedefs improvement
Perform repeated typedef lookups instead of a single typedef
lookup on the type being applied in %apply when looking for a family
of typemaps to apply.

Closes #3064
2024-11-09 13:30:19 +00:00
William S Fulton 7fb816dcb2 typo fix in docs 2024-11-04 23:20:43 +00:00
William S Fulton 3769110139 Java docs code style corrections 2024-10-23 18:35:36 +01:00
William S Fulton c9ce79be77 C# docs code style corrections 2024-10-23 18:35:36 +01:00
William S Fulton 7635b40331 Improve C# Java docs for memory handling and member variable accessors 2024-10-23 18:35:36 +01:00
Olly Betts ce6d2dd11e Drop support for raw type strings in interface files
This is described in CHANGES as a "Secret developer feature" and
a "SICK HACK".  It was only documented in developer documentation, and
had no test coverage.

It allowed specifying an SWIG internal syntax type string, e.g.

  `p.a(10).p.f(int, p.f(int).int)` foo(int, int (*x)(int));

However there seems to be no good reason to support this - it's
better to use the C/C++ syntax:

  (*(*foo(int, int (*)(int)))[10])(int, int (*)(int));

Fixes #2998
Closes #3034
2024-10-22 09:05:54 +13:00
William S Fulton f84f80c315 Bump version to 4.4.0 2024-10-21 18:54:41 +01:00
William S Fulton 138507624b HTML updates 2024-10-20 17:16:08 +01:00
William S Fulton 307f1b1a1d Add swig-4.3.0 release date 2024-10-20 16:31:25 +01:00
William S Fulton ecf1765b99 Remove legacy Visual C++ 6 project files
Latest Visual Studio 2022 is unable to update/convert these project files.
It appears that Perl, R, Ruby use gcc mingw on Windows nowadays to compile
extensions, so Visual C++ is no longer supported (maybe incorrect, but it
is not clear to me how to compile C/C++ extensions for these languages
with Visual C++ nowadays).
2024-10-19 23:50:32 +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 49d393c042 Updates and corrections in the Preface chapter 2024-10-15 08:59:51 +01:00
William S Fulton ea8aa84b28 Documentation generation fix and update to changes file 2024-10-07 20:10:14 +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
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
Egor Konovalov 47034b1bdc
Fix typo in the documentation (#3042) 2024-10-01 18:37:34 +01:00
Olly Betts d3507febaa Document %shared_ptr/%unique_ptr incompatibility
Closes #3025
2024-09-28 15:08:05 +12:00
Olly Betts 25565c89ce Fix typo in manual 2024-09-28 15:08:05 +12:00
William S Fulton 447cd4dd14 Formalise the deprecation of target languages with a Deprecation status 2024-09-27 19:42:16 +01:00
Olly Betts b47e9b7785 [Go] Correct example setter name in manual 2024-09-27 10:52:16 +12:00