Commit graph

2,222 commits

Author SHA1 Message Date
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
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
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
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
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
Alexey Pelykh
837d2bfd04 Removed useless code (it does not affect output, at least on our testcases) 2014-11-03 12:10:10 +02:00
William S Fulton
6d6cefa791 Fix 'self' parameter name clash when generating for Python builtin 2014-10-31 07:23:08 +00:00
William S Fulton
6029b2f7d8 Fix for 'self' being used as a parameter name 2014-10-30 07:22:59 +00:00
William S Fulton
cd725fbe94 Minor cosmetic source code changes 2014-10-28 07:07:44 +00:00
William S Fulton
36ae32e941 Merge remote-tracking branch 'vadz/py-args'
* vadz/py-args:
  Allow using enum elements as default values for Python functions.
  Don't always use "*args" for all Python wrapper functions.
  No real changes, just make PYTHON::check_kwargs() const.
  Refactor: move makeParameterName() to common Language base class.
  Remove long line wrapping from Python parameter list generation code.
2014-10-27 20:02:59 +00:00
William S Fulton
3dcc501ac0 Spelling fix 2014-10-21 07:55:07 +01:00
William S Fulton
bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
William S Fulton
b57a675d00 Cosmetic comment changes
Note: copyrights are in the COPYRIGHT file
2014-10-21 07:34:51 +01:00
Ian Lance Taylor
0577ff2220 [Go] Adjust last patch to avoid write-after-write data race on global
variable.  Only set the variable if another global variable is true,
but that variable is always false.  The effect is that the variable is
never written, but as far as the compiler is concerned it might escape.
2014-10-14 10:05:43 -07:00
Ian Lance Taylor
1226970b9f [Go] More fixes for Go 1.4. Ensure that values with argout or freearg
typemapes escape, and refer to them using local variables loaded at
the start of the function, in case the argout or freearg template
causes a stack copy.
2014-10-11 19:07:14 -07:00
William S Fulton
78b904764a Merge branch 'diorcety-python_property'
* diorcety-python_property:
  Changes file entry for Python director property fix
  Python: Fix property access with director

Conflicts:
	CHANGES.current
2014-10-11 00:22:21 +01:00
William S Fulton
376ebc2d85 Revert "Octave: whitespace/indentation/style cleanup of octave.cxx"
This reverts commit 5ac475cbcd.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:34:06 +01:00
William S Fulton
23373e9ffd Revert "Octave: cleanup/restructure library files"
This reverts commit bf12d76d03.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:34:02 +01:00
William S Fulton
a9c9c9c848 Revert "Octave: remove unused field SwigOctClass::constructor_doc"
This reverts commit afa9affcd9.

Reverting a series of Octave commits for re-applying again without
incorrect whitespace changes.
2014-10-09 19:33:40 +01:00
Anthony Li
d0b6a4bfc5 del tmp files 2014-10-06 19:35:33 +08:00
Anthony Li
60da096a07 GoLang:fix overload functions with polymorphic issue 2014-10-06 19:26:07 +08:00
Karl Wette
afa9affcd9 Octave: remove unused field SwigOctClass::constructor_doc 2014-10-05 20:54:20 +02:00
Karl Wette
bf12d76d03 Octave: cleanup/restructure library files
- Restructure runtime code into declarations, function
  and class definitions, and initialisation code
- Rename internal functions/types to follow SWIG_Octave...
  or SwigOct... naming styles
- Style/comment/whitespace cleanups
2014-10-04 19:18:32 +02:00
Karl Wette
5ac475cbcd Octave: whitespace/indentation/style cleanup of octave.cxx
- Used "astyle -A10 -s2 -N -p -H -U -k1" for style cleanup
- Replaced NewString("") with NewStringEmpty()
- Used 'w' instead of 'f' for Wrapper() objects
2014-10-04 13:29:46 +02:00
Yann Diorcet
558af639bd Python: Fix property access with director 2014-10-01 11:07:02 +02:00
Ian Lance Taylor
4b64ce71a3 [Go] Adjust generated code to work with upcoming Go 1.4 release. 2014-09-25 12:10:11 -07:00