Commit graph

2,407 commits

Author SHA1 Message Date
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
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
William S Fulton
cf3be359cf Add c++11 strongly typed enum support for Guile 2014-11-28 23:27:22 +00:00
William S Fulton
713d3d5973 Add c++11 strongly typed enum support for Go 2014-11-28 20:40:37 +00:00
William S Fulton
be272ff8cd Add c++11 strongly typed enum support for Lua 2014-11-28 07:47:45 +00:00
William S Fulton
b1eb699ff0 C++11 strongly typed enum support
This should provide support for most of the scripting languages
2014-11-25 07:08:31 +00:00
William S Fulton
366948079f Add C# support for wrapping C++11 strongly typed enums 2014-11-25 07:07:47 +00:00
William S Fulton
0664ecdeb7 Fix strongly typed enums for Java when using simple enum wrappers 2014-11-24 07:04:54 +00:00
William S Fulton
fcef37d682 Fix incorrect symbol clash error in C# and Java when using %rename for enums
When using using 'simple enum' wrappers
2014-11-21 19:50:23 +00:00
William S Fulton
ede58b8744 Cosmetic formatting 2014-11-21 18:58:08 +00:00
William S Fulton
296d45aec5 Merge branch 'alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java'
* alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java:
  Enhance cpp11_strongly_typed_enumerations testcase and turn it on
  Simplify/improve strongly typed enum implementation for Java
  Rewrite some Java director nested class support code for strongly typed enums
  Expand director_nested_class test to test more than one level of nesting
  Add director_nested_class testcase
  Removed useless code (it does not affect output, at least on our testcases)
  Java/Fix: swig_connect_director used not-fully-qualified classname (proper)
  Java/Fix: swig_connect_director used not-fully-qualified classname
  Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/'
  Java: fix invalid director 'self' variable type name (wasn't fully qualified)
  Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass
  C++11 strongly-typed enums fix for Java only (proper)
  Revert "C++11 strongly-typed enums fix for Java only"
  Additional test cases for C++11 strongly-typed enums
  C++11 strongly-typed enums fix for Java only
2014-11-21 07:34:12 +00:00
William S Fulton
77b338151e Simplify/improve strongly typed enum implementation for Java 2014-11-21 07:32:15 +00:00
William S Fulton
089865ba57 Rewrite some Java director nested class support code for strongly typed enums 2014-11-20 07:26:09 +00:00
ianlancetaylor
da7133aa8e Merge pull request #235 from dontpanic92/master
Go: fix overload functions with polymorphic
2014-11-17 08:28:07 -08:00
David Nadlinger
a8cdd1798e D: Emit empty enums as int aliases instead of omitting them.
This fixes test-suite/enum_forward.i.
2014-11-06 23:04:35 +01:00
David Nadlinger
0d6472525c D: Fix name collision between im D module function pointer and actual C function.
Previously, the function pointers were not only declared with
extern(C) calling convention, but actually had C linkage
themselves. Thus, they were exported under their bare names,
potentially colliding with the actual function definitions
in the wrapped library if the dynamic linker decided to
resolve them the wrong way.

This fixes the sneaky1 test case, although I have no idea why
the add() reference in D_add() (via the PLT) is rebound to the
function pointer there and not in all other test cases and
real-world libraries. As far as I can see, there don't seem to
be any special symbol visibility/binding settings involved in
our build system.
2014-11-06 23:04:35 +01:00
David Nadlinger
0b42c6f653 D: Fix allprotected_not.i compilation.
The director cycle breaking code was emitted when protectors
were not actually enabled on the parent class, leading to
swigIsMethodOverridden being called but not declared.
2014-11-06 23:04:34 +01:00