Commit graph

152 commits

Author SHA1 Message Date
William S Fulton
f13de56e5f Revert "[xml] Move to "Experimental" target language status"
This reverts commit 22a4355f34.

Conflicts:
	CHANGES.current
	RELEASENOTES
2022-10-13 21:14:44 +01:00
Olly Betts
a71234b25d Use https for links in docs where supported 2022-10-06 13:41:21 +13:00
Olly Betts
631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
Olly Betts
06296a7128 Report errors in preprocessor expressions by default
Until now SWIG quietly ignored such errors unless -Wextra (or -Wall
which implies -Wextra) was passed, but this is unhelpful as it hides
problems.  To illustrate this point, enabling this warning by
default revealled a typo in the preproc_defined.i testcase in
SWIG's own testsuite.

If you really don't want to see this warning, you can suppress it
with command line option -w202 or by using this in your interface
file:

%warnfilter(SWIGWARN_PP_EVALUATION);

Both will work with older versions of SWIG too.

Fixes #1465
Fixes #2389
2022-10-05 17:07:06 +13:00
Olly Betts
848cb3f95e Document lack of separate ISO C tag namespace
This is a long-standing limitation, but only seems to have been reported
once back in 2004.

Nobody's cared enough to address it in 18 years, but we can at least
document it in the manual rather than only in a source code comment in
Source/Swig/symbol.c.

Addresses https://sourceforge.net/p/swig/bugs/429/
2022-07-28 07:06:00 +12:00
Olly Betts
22a4355f34 [xml] Move to "Experimental" target language status
The XML target language support is not in good shape and is likely to be
removed unless somebody steps up to bring it up to the expected standard
(it fails to even meet the criteria for "Experimental" currently).

Closes #2213
2022-07-08 16:34:19 +12:00
William S Fulton
1db04bf322 Improvements to the -debug command line options
The debug command line options that display parse tree nodes
(-debug-module, -debug-top, -debug-symtabs) now display previously hidden
linked list pointers which are useful for debugging parse trees.

Added new command line option -debug-quiet. This suppresses the display
of most linked list pointers and symbol table pointers in the parse tree nodes.

The keys in the parse tree node are now shown in alphabetical order.
2022-03-25 23:34:52 +00:00
William S Fulton
f995bad785 Add detailed docs and info on match in %rename 2022-02-26 12:49:07 +00:00
William S Fulton
546062fdf1 Add %rename matching docs and improvements
Add in %$isusing macro for %rename.
Improve docs for %$not and notmatch.
2022-02-26 12:49:07 +00:00
Olly Betts
467c530e65 Remove support for the "command" encoder
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
2022-02-07 09:47:01 +13:00
William S Fulton
34d80dcb8b attribute library documentation edits 2022-02-05 20:52:50 +00:00
William S Fulton
aef4a0f90a Merge branch 'doc-work' into upstream-master
* doc-work:
  Move the attribute.i docs into Library.html
  Move %attribute documentation into the manual
2022-02-05 20:52:42 +00:00
Olly Betts
11009f8e23 Document calling extend methods from C/C++
Note that it's necessary to use the naming scheme we already document
to do this.

Fixes https://sourceforge.net/p/swig/bugs/889/
2022-02-03 11:22:16 +13:00
Olly Betts
7ec2f89fe2
Remove redundant NULL checks before free()/delete (#2184)
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/
2022-01-29 22:03:48 +13:00
Corey Minyard
97b4cccbbd Talk about namespaces and unignoring
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
2022-01-29 09:18:33 +13:00
Corey Minyard
4949b2e760 Add an example for unignoring everything
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
2022-01-29 08:58:25 +13:00
Corey Minyard
69f94723d2 Fix the recent %rename docs
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".
2022-01-29 08:57:17 +13:00
Corey Minyard
562effb50f Move the attribute.i docs into Library.html
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>
2022-01-28 08:59:08 -06:00
William S Fulton
fa8c89ddf5 Move docs on replacing c++ class methods to C++ section
[skip ci]
2022-01-27 21:25:35 +00:00
Corey Minyard
f878b17679 Improve documentation on %rename
Add documentation on %rename of names replacing previous %renames of
the same name, and how to replace methods in classes using %rename.
2022-01-26 19:37:58 -06:00
Corey Minyard
f77af57bd7 Move %attribute documentation into the manual
It's fairly hidden where it is, put it where users can see it more
easily.

Fixes #2166
2022-01-26 09:18:55 -06:00
William S Fulton
f8e4a5cc25 Few more PCRE to PCRE2 changes 2022-01-21 18:35:20 +00:00
Olly Betts
f198ff0a43 Fix more "allows to" and other typos 2021-04-21 15:54:46 +12:00
Olly Betts
3584c7d49c Add initial support for PHP8
Testcase director_overload2 is failing, but the rest of the testsuite
passes.
2021-03-19 19:30:27 +13:00
William S Fulton
4c86ed4980 Macros wrapped as constants documentation improvements.
Closes #1618
2019-10-01 08:05:35 +01:00
Vadim Zeitlin
a4432a68da Correct %init documentation for C#/Java
For these languages, %init doesn't inject the code into the
initialization function (because there is none), but just puts it into
the global scope instead.

[skip ci]
2019-07-30 21:12:04 +02:00
William S Fulton
12a245183f Clear up some confusion over ANSI vs ISO C/C++ support
Issue #890
2019-04-18 20:04:20 +01:00
William S Fulton
6791f8b769 Add linkchecker3 make target to check internal links
Make sure all internal links use # anchors which are needed for wkhtmltopdf
2019-04-15 19:31:32 +01:00
William S Fulton
ad7f9cd8d7 Mark and setup OCaml as an experimental target language.
Issue #1437
2019-02-11 18:30:35 +00:00
William S Fulton
b4257fb1f2 Mark MzScheme as an experimental language 2019-02-09 17:58:06 +00:00
William S Fulton
df86ec5af6 Consistent use of target language version of options
If a version number is supported by the target language prefer to show it in the -help.
For example, -perl5 instead of -perl.
2019-02-05 19:18:46 +00:00
William S Fulton
264b39fd00 Disable CFFI Common Lisp target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:23 +00:00
William S Fulton
6d7e3df54e Disable Allegrcol target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:16 +00:00
William S Fulton
09e0577d95 Disable Chicken target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:12 +00:00
William S Fulton
cb4bd26422 Disable Common Lisp / CLISP target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:07 +00:00
William S Fulton
df51dc8e8f Disable Common Lisp / S-Exp target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:42:00 +00:00
William S Fulton
f63d0db21b Disable Common Lisp / UFFI target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:54 +00:00
William S Fulton
8aa4086136 Disable Pike target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:46 +00:00
William S Fulton
ee3aeb8177 Disable Modula3 target language
Clean up to disable target languages that have been neglected/not functional.
Target language be fully deleted in SWIG 4.1 unless a new maintainer brings
it up to an acceptable status (experimental or supported).

Issue #1447
2019-02-05 18:41:34 +00:00
William S Fulton
849512f565 Add missing command line options to documentation
Options were taken from the output of running swig -help.
2019-02-04 18:46:50 +00:00
Olly Betts
d6d5db122b Remove support for PHP5
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.

See #701.
2018-06-07 18:09:03 +12:00
Joshua Watt
bc89aad59f Add documentation for option files 2018-01-12 15:01:45 -06:00
William S Fulton
e67f9c5067 Enhance documentation with callback techniques
Add section about callbacks from C/C++ to target language via directors

[skip ci]
2017-11-01 07:47:54 +00:00
William S Fulton
9671613372 Doc corrections for %shared_ptr and enhancements for %inline 2017-09-15 19:21:26 +01:00
Artem V L
f1df34642b Merge branch 'master' into master 2017-09-14 22:04:25 +02:00
William S Fulton
9cc05a22f6 Improve docs for %rename and C++ features like default args 2017-09-14 18:51:36 +01:00
luav
d2b329f71d %rename for functions with default parameters explained, see #1087 2017-09-14 18:51:36 +01:00
luav
73fe0fdc7e %rename for functions with default parameters explained, see #1087 2017-09-12 04:13:24 +02:00
luav
f069d0a744 %shared_ptr usage for the templates documented, see #1049 2017-09-11 22:55:13 +02:00
luav
0587edd559 Includes inside %inline block documented, see #1068 2017-09-11 22:13:19 +02:00