Commit graph

3,002 commits

Author SHA1 Message Date
Olly Betts
950473d77e [php] Whitespace improvements in generated C/C++ code 2019-02-12 10:14:25 +13: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
43438b66ab Re-organise some generate Python code for method creation and docstring support
Fix ‘PyMethodDef* SWIG_PythonGetProxyDoc(const char*)’ declared ‘static’ but
never defined [-Wunused-function]

Closes #1448
2019-02-10 22:55:16 +00:00
Olly Betts
ce5a249878 Drop -php4 option completely
SWIG's support for PHP4 was removed over a decade ago, and PHP4 itself
went out of security support more than a decade ago too - nobody is
realistically going to be trying to generate PHP4 bindings in 2019.
2019-02-11 10:49:20 +13:00
William S Fulton
c7ff070cd7 MzScheme - add missing return 2019-02-10 10:40:07 +00:00
William S Fulton
a8f927dd50 Merge branch 'mzscheme-experimental'
* mzscheme-experimental:
  Fix mzscheme name and unions testcases
  Terminology correction in html docs
  Suppress experimental language warning when running the test-suite
  Mark MzScheme as an experimental language
  Add mzscheme to Travis testing
  Format mzscheme help output
  Mzscheme out of source examples fixes
  Standardise Mzscheme simple example
  Standardise Guile simple example
  Fix mzscheme static variable wrappers
  MzScheme missing destructor added in, std_vector example fixed
  Fix mzscheme simple example
  Fix mzscheme multimap example
  Skip failing MzScheme tests
2019-02-10 00:50:35 +00:00
William S Fulton
9ab873f432 Merge branch 'ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn'
* ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn:
  [OCaml] Fix possible GC issues in generated director code

 Conflicts:
	Examples/test-suite/ocaml/director_unroll_runme.ml
2019-02-09 22:54:43 +00:00
William S Fulton
d7bb500315 Merge branch 'ZackerySpytz-OCaml-director-ctors'
* ZackerySpytz-OCaml-director-ctors:
  [OCaml] Fix a bug in the ctors of director classes
2019-02-09 22:28:10 +00:00
William S Fulton
d595a7a9ed Merge branch 'ZackerySpytz-OCaml-cache-caml_named_value'
* ZackerySpytz-OCaml-cache-caml_named_value:
  [OCaml] Cache the result of caml_named_value() in some cases
2019-02-09 22:14:10 +00:00
William S Fulton
5249dfefc5 Merge branch 'ZackerySpytz-OCaml-module-docstring'
* ZackerySpytz-OCaml-module-docstring:
  [OCaml] Add support for the docstring option in the module directive
2019-02-09 22:02:21 +00:00
William S Fulton
b4257fb1f2 Mark MzScheme as an experimental language 2019-02-09 17:58:06 +00:00
William S Fulton
a2db2a6e27 Format mzscheme help output
Also simplify -dynamic-load option help as it does more than
not emit scheme_initialize, scheme_reload, scheme_module_name.
2019-02-09 17:34:02 +00:00
William S Fulton
20344093ef Fix mzscheme static variable wrappers
$argnum needs to be expanded in the 'varin' typemap which shares
code used by the 'in' typemap.
Setting the static variable is also a function call (argnum=1).

Added class examples - needs static variables to work
Test newly working test cases with this fix
2019-02-09 14:44:33 +00:00
William S Fulton
b21a28f26a MzScheme missing destructor added in, std_vector example fixed 2019-02-09 14:44:33 +00:00
Olly Betts
123eabf200 [PHP] Wrap renamed constructor as static method
Previously it was wrapped as a non-static method, which results in
a diagnostic from PHP if called as a static method.
2019-02-09 12:51:45 +13:00
Olly Betts
3f9ebb31b9 [PHP] Don't generate code referencing undefined $r
This could happen in overloaded methods which returned void and took at
least one const std::string& parameter.
2019-02-08 18:09:52 +13:00
Zackery Spytz
28a846705f [OCaml] Fix possible GC issues in generated director code
Make `classDirectorMethod()` generate `CAMLreturn_type()` or
`CAMLreturn0` when there are local variables of type `value`.
2019-02-07 22:08:10 -07:00
Olly Betts
890617f5a5 Fix swig -help to exit with status 0
Fixes #1453
2019-02-08 17:18:30 +13:00
Zackery Spytz
828ce477c8 [OCaml] Fix a bug in the ctors of director classes
If a class was given the director feature, it was not possible
to use ctors with multiple parameters.

Add director_default_runme.ml (it is based on
director_default_runme.java).
2019-02-05 13:35:43 -07: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
29d30bd319 Consistent implementation for disabled languages
The deprecated php4 and php5 use the new Disabled language handling
recently implemented for a consistent implementation
2019-02-05 19:04:59 +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
William S Fulton
9defd8e033 Add support for differentiating target language statuses
Three status: Disabled, Experimental and Supported.

Any target language classified as 'Experimental' will issue new warning
524 SWIGWARN_LANG_EXPERIMENTAL.
Any target language classified as 'Disabled' will error out.

Languages will be classified in forthcoming commits.

Issue #1437
2019-02-04 18:46:16 +00:00
Zackery Spytz
bdc038b578 [OCaml] Cache the result of caml_named_value() in some cases
The result of caml_named_value() can be cached for (slightly)
improved performance.

This is mentioned in the OCaml reference manual.
https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html#sec453

In addition, fix incorrect use of CAMLreturn() in
caml_ptr_val_internal().
2019-02-03 17:37:46 -07:00
William S Fulton
b50e5fac8e Python docstring - add in missing Delete calls 2019-02-03 00:28:53 +00:00
William S Fulton
64a7678759 Remove some unnecessary casts in Python builtin code 2019-02-03 00:28:02 +00:00
William S Fulton
62c5ca89a6 Minor refactoring of generated Python code 2019-02-03 00:27:57 +00:00
William S Fulton
fddaf3f814 Minor refactoring of Python autodoc related code 2019-02-02 21:42:47 +00:00
William S Fulton
1e2190e6b8 Merge branch 'ahnolds-autodoc'
* ahnolds-autodoc:
  Apparently nicely lining things up violates pep8, so don't try
  Don't use bool in the generated files for C compatability
  Properly handle destructors as methods for autodoc and fix some stray newlines
  Fixing a bug where the cached doxygen docstring could be deleted while still in use, causing swig to segfault
  Fixing docstrings for variables and static functions for consistency
  Fixes so that fastproxy and autodoc work correctly with both low-level C API and high-level Python Shadow API
  Updating the changelog
  Also check documentation on the low-level API
  Fix a bug where anonymous arguments were misnumbered when used in constructors
  Fixing python docstring handling for -fastproxy

Conflicts:
	CHANGES.current
2019-02-02 21:39:48 +00:00
Olly Betts
ec72026285 Stop defaulting to Tcl
SWIG now requires a target language to be specified instead of
defaulting to wrapping for Tcl.  Specifying swig --help without
a target language now just shows the generic help.  The -nolang
option has been removed.
2019-02-01 12:57:00 +13:00
Zackery Spytz
08029e6642 [OCaml] Add support for the docstring option in the module directive
If given, the OCaml module will place the docstring at the very
beginning of the generated mli file, where it can be read by the
OCamldoc tool.

The implementation is based on the equivalent features in the Python
and Ruby modules.
2019-01-31 15:32:38 -07:00
William S Fulton
528f33e9e5 Merge branch 'ZackerySpytz-OCaml-eliminate-wno-write-strings'
* ZackerySpytz-OCaml-eliminate-wno-write-strings:
  [OCaml] Remove support for OCaml versions < 3.12.0
  [OCaml] Fix toplevel creation for ocamlmktop versions >= 4.04.0
  [OCaml] Eliminate use of -Wno-write-strings
2019-01-31 07:29:09 +00:00
William S Fulton
526b2cf0ae Merge branch 'ZackerySpytz-OCaml-director-classes-throw'
* ZackerySpytz-OCaml-director-classes-throw:
  [OCaml] Fix handling of exception specifications for director classes
2019-01-31 07:21:50 +00:00
William S Fulton
c6d2c7703e Merge branch 'ZackerySpytz-OCaml-overloaded-duplicates'
* ZackerySpytz-OCaml-overloaded-duplicates:
  [OCaml] Don't generate duplicate declarations for overloaded functions
2019-01-31 07:18:22 +00:00
Alec Woods
120a6df838 Apparently nicely lining things up violates pep8, so don't try 2019-01-26 13:39:50 -05:00
Alec Woods
ed81f8ac73 Don't use bool in the generated files for C compatability 2019-01-26 09:30:26 -05:00
Alec Woods
98023054c6 Properly handle destructors as methods for autodoc and fix some stray newlines 2019-01-26 09:30:26 -05:00
Alec Woods
e150d58092 Fixing a bug where the cached doxygen docstring could be deleted while still in use, causing swig to segfault 2019-01-26 09:30:26 -05:00
Alec Woods
5106573b29 Fixing docstrings for variables and static functions for consistency 2019-01-26 09:30:26 -05:00
Alec Woods
86e08c8e34 Fixes so that fastproxy and autodoc work correctly with both low-level C API and high-level Python Shadow API 2019-01-26 09:30:26 -05:00
Alec Woods
97a624f360 Fix a bug where anonymous arguments were misnumbered when used in constructors 2019-01-26 09:30:26 -05:00
Alec Woods
591a70378e Fixing python docstring handling for -fastproxy 2019-01-26 09:30:26 -05:00