Commit graph

2,465 commits

Author SHA1 Message Date
Vadim Zeitlin
300ccce46c Another merge with master.
Change Doxygen error codes to start at 740 instead of at 720 as the latter was
taken by Scilab in the meanwhile.

Resolve conflicts in autodoc_runme.py once again.
2015-02-16 23:46:39 +01:00
William S Fulton
37bd50ddf9 Guile - fix generated code for static const char member variables when defined and declared inline. 2015-02-11 23:34:23 +00:00
William S Fulton
1ef899a57b Merge branch 'stricter-warnings'
* stricter-warnings:
  Go changes for wrappers to compile as ISO C90
  Scilab typecheck typemaps fix for C90
  No error for one Javascript node warning
  Warning fix in testcase for Javascript node
  nested_extend_c testcase fix when compiled by C++ target languages
  Temporarily remove -Werror for Scilab testing
  C90 fixes for Javascript JSC
  There are a couple of testcases that aren't compliant and supression via pragmas doesn't work for gcc < 4.8
  Warning suppression change
  Scilab typemap fixes for C89
  compiler warning suppression correction in testcase
  Suppress pedantic warnings in C# testcases
  Suppress pedantic warnings in testcases
  Pedantic warning fix in testcase
  pedantic warning fix for D wrappers
  Travis testing to use testflags.py for setting CFLAGS and CXXFLAGS
  Add travis build for error-declaration-after-statement branch
2015-02-11 23:33:26 +00:00
William S Fulton
e3a8ee1927 Go changes for wrappers to compile as ISO C90
Fixes:
ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
2015-02-11 23:32:46 +00:00
William S Fulton
59ff3e6a3a C90 fixes for Javascript JSC 2015-02-11 23:32:45 +00:00
Ian Lance Taylor
1863b191bf [Go] Refactor some functions to make it easier to move to a new
approach for generating Go interfaces.  No functional changes.
2015-02-09 11:21:58 -08:00
Ian Lance Taylor
0a021a938e [Go] Remove all generated calls to _swig_makegostring, as it will no
longer as of Go 1.5.  In Go 1.5 or later user calls to
_swig_makegostring will fail at link time.

Instead, use goout and godirectorin typemaps to allocate strings in Go
code.

Change the Go typemaps support to ignore empty strings, so that we can
define empty strings for regular types so that %apply will override
the definitions for string types.

Fix the gccgo code to wrap SwigCgoCallback around all godirectorin
typemaps.

Add a few newlines after typemap code so that the typemaps don't have
to include them.
2015-02-05 10:15:37 -08:00
Ian Lance Taylor
2562c1eb41 [Go] Remove all calls to _swig_goallocate in the Go runtime, except
for the one from _swig_makegostring.  _swig_goallocate can not work
with the future Go 1.5 release.  When using Go 1.5 attempts to call
_swig_goallocate will fail at link time.
2015-02-04 16:08:44 -08:00
Ian Lance Taylor
2752d78ce6 [Go] Use a unique name for the wrapper functions, since they are
publicly visible.  This permits linking together different SWIG
wrappers in the same program if they wrap the same function.  The
unique name is generated by hashing the .swig file.
2015-02-04 13:18:00 -08:00
William S Fulton
39a75442a1 Fix Python -classic and property setting
Setting properties on classic classes was broken in swig-3.0.3 by attempting to use __setattr__. This regression is fixed now by using __dict__ again when using -classic.

Fixes patch #232.
2015-01-30 23:27:22 +00:00
William S Fulton
727d74f6be Python C89 fix mixed code and declarations compiler error in constants code from patch #250 2015-01-28 08:09:06 +00:00
William S Fulton
760d603918 Warning and error fixes for Solaris Sun Studio compiler 2015-01-27 19:30:24 +00:00
William S Fulton
1fae569960 Add missing SWIGSCILAB in wrappers and fix unions test for non-scilab languages 2015-01-26 21:03:45 +00:00
Simon Marchetto
0544765abd remove -nobuilder option 2015-01-26 12:29:40 +01:00
Simon Marchetto
4c66489fd7 remove useless direct_gateway function in wrapper 2015-01-26 12:11:13 +01:00
Simon Marchetto
adc4b788df Merge remote-tracking branch 'origin/master' into gsoc2012-scilab
Conflicts:
	.gitignore
	.travis.yml
	configure.ac
2015-01-26 10:50:20 +01:00
Olly Betts
b3003f1f9f [PHP] When wrapping a returned resource as an object, check if all
cases wrap it in the same class, and if so eliminate the pointless
switch statement wrapper we previously generated.
2015-01-23 13:56:13 +13:00
William S Fulton
d3051c5b04 Merge branch 'ConroyJ-master'
* ConroyJ-master:
  Updated usage string for -cppcast/-nocppcast in octave.cxx
  Attempting fixes for Octave shared_ptr support
2015-01-22 20:06:55 +00:00
William S Fulton
6f48e57090 Scilab command line options put in alphabetical order and some html tweaks 2015-01-22 20:03:16 +00:00
William S Fulton
96c19872bd Scilab cosmetics 2015-01-19 07:52:47 +00:00
William S Fulton
06fb68af5b Merge branch 'ptomulik-fix/py-object-const'
* ptomulik-fix/py-object-const:
  constant_directive_runme.py and classic classes
  additional fixes to %constant directive
  make %constant directive to work with structs/classes
2015-01-15 20:18:21 +00:00
William S Fulton
afba5b755a Fix Python default args when using kwargs
Recent default arg handling fixes didn't fix the case when kwargs is turned on
2015-01-15 07:54:36 +00:00
Simon Marchetto
b11f4d8e62 reduce slightly the gateway source 2015-01-14 15:43:46 +01:00
Olly Betts
0dd685bad2 Fix PHP crash in director_finalizer 2015-01-14 15:38:55 +13:00
Olly Betts
ea5be4e508 Fix PHP backend for default_args testcase 2015-01-14 10:44:54 +13:00
William S Fulton
944fbfb426 Python 3 default args fix
Fix 0U and 0L as default args for Python 3 (tests committed in
previously commit of default_args.i).
Relates to issue #294.
2015-01-13 07:55:31 +00:00
William S Fulton
9d87b9f099 Revert introduction of python:defaultargs feature
See issue #294
2015-01-12 21:35:47 +00:00
Simon Marchetto
18832e938c fix buildermode error with Scilab V6 2015-01-12 16:20:03 +01:00
Simon Marchetto
66f150b853 fix Scilab V6 support after merge of gateway & wrapper sources 2015-01-12 16:19:35 +01:00
Olly Betts
682b4dd843 [PHP] Fix segfault in director upcall check
Manifest only when using PHP built with ZTS enabled.
2015-01-12 13:53:01 +13:00
William S Fulton
06e361dbf2 Fix linux gcc warnings and strtol corrections 2015-01-11 17:30:25 +00:00
Vadim Zeitlin
adbe3f2e77 Python default arg improvements
Merge the code fixes from patch #294 to more reliably generate
default argument values into the python layer.
2015-01-11 16:42:21 +00:00
Jeremy
2696a6e0ff Updated usage string for -cppcast/-nocppcast in octave.cxx 2015-01-09 14:51:44 -05:00
William S Fulton
38ba81811e Fix Python default argument handing broken since swig-3.0.3
Default values are no longer generated as Python code by default.
They must be explicitly turned on using the "python:defaultargs" feature.

Closes #294
Closes #296

The problems in these two issues when "python:defaultargs" is turned
on still need to be fixed and should be addressed in separate patches.
The important thing is the default code generation is now fixed.
2015-01-09 00:34:17 +00:00
Simon Marchetto
9c5003b022 do no generate builder by default 2015-01-08 14:06:04 +01:00
Olly Betts
fc60a97ebe Drop deprecated warnings for ancient options
Support for -stat was removed in SWIG 1.3 Alpha 1 nearly 15 years ago,
and the documentation options were removed prior to that, so issuing a
warning that they are deprecated and ignoring them serves no useful
purpose now.
2015-01-08 10:55:58 +13:00
Olly Betts
cd16059c66 Provide -cppext as a general command line option
Provide -cppext as a general command line option for setting the
extension used for generated C++ files (previously it was specific
to the PHP backend).  Deprecate the equivalent -suffix option
provided by the Ocaml backend, but continue to support that for
now.
2015-01-08 10:54:37 +13:00
Olly Betts
0acebe2289 Split -help output into 4 chunks instead of 3
I believe the aim is to keep these below 2KB to avoid string literal
length limits on some compiler, but they slowly creep up in size, so
split into more chunks and rebalance the contents.
2015-01-08 10:14:18 +13:00
Simon Marchetto
78705a5175 gateway source is moved into wrapper source 2015-01-07 18:04:29 +01:00
Jeremy
e301457a43 Attempting fixes for Octave shared_ptr support 2015-01-05 10:53:06 -05:00
Paweł Tomulik
cfaf2f97fd additional fixes to %constant directive 2015-01-02 18:50:49 +01:00
Paweł Tomulik
c21e2423a0 make %constant directive to work with structs/classes 2015-01-02 18:50:49 +01:00
William S Fulton
2e01533b23 Partial support for %constant and structs
Test case is slightly modified from the test case in issue #250

Use of constant objects does not seem to work in Python - the type is
SwigPyObject instead of constant_directive.Type1.
2014-12-18 07:01:08 +00:00
Vadim Zeitlin
fd47e6870e Fix autodoc strings generated in Python builtin case and the test.
Use the proper AUTODOC_METHOD for autodoc strings generation when using
"-builtin", there is no reason to use AUTODOC_FUNC here when AUTODOC_METHOD is
used by default (i.e. without "-builtin").

This allows to (almost) stop differentiating between the two cases in the
autodoc unit test, allowing to simplify it significantly.

Also fix this test to pass after the recent changes removing docstring
indentation in the generated code.
2014-12-15 20:27:46 +01:00
Vadim Zeitlin
d5c5cd4521 Use class docstrings in "-builtin" Python case.
Put the docstring into tp_doc slot which exists exactly for this purpose.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin
410b508e9a Don't indent Doxygen doc strings in generated Python code.
This is unnecessary and inconsistent with "builtin" case in which the
docstrings are not indented in the generated C++ code, thus making it
impossible to write tests working in both cases.

Most of the changes in this commit simply remove the extra whitespace from the
expected values in the tests.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin
9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
William S Fulton
ae555c2339 Fix templated constructors regression
Templated constructors were incorrectly ignored because SWIG thought they were
methods without a return type.
Regression introduced in swig-3.0.0
Closes #245.
2014-12-09 23:48:37 +00:00
William S Fulton
7f8bb02d78 Fix regression in introduced in merge of C++11 strongly typed enums support
- Guile constants bad casts generated
- Go non-public enum value wrappers assert failure

Also cosmetic test comment correction
2014-12-07 21:31:14 +00:00
William S Fulton
b9b9b3cd21 Merge master and C++11 strongly typed enum support
Merging from master:
* 'master' of github.com:/swig/swig:
  Add more docs about _global_ prefix in typemap temporary variables
  Add clarification on _global_ prefix.
  fix for nested template defined out of class (issue #265)
  using an unknown constant emits a notice, not a warning
  Fix typo
  Consistently put whitespace outside of <tt>...</tt> and not inside
  wording tweak
  Go: Document memory management of C++ classes allocated in Go.  Fixes #266.
  revert unrelated file
  Fix #224
  Fixes for clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error
  delete unmeaningful macro
  Go: fix overload functions with polymorphic issue
  del tmp files
  GoLang:fix overload functions with polymorphic issue
2014-12-07 17:33:16 +00:00