Commit graph

1,931 commits

Author SHA1 Message Date
William S Fulton
d1bb451eab Merge branch 'perl5-directors-minimal' of https://github.com/talby-/swig into talby--perl5-directors-minimal
* 'perl5-directors-minimal' of https://github.com/talby-/swig:
  try adding travis ci to this branch
  ran "beautify-file" make target over perl5.cxx patch hunks and rewrote callback and extend examples in the style of existing examples
  prefer polymorphism on existing destructor over custom destructor method
  fix string mangled by tidy
  eliminate dead director code and convert remaining blocks
  mitigate ConvertPtr director cost when directors are not enabled
  steals python director docs and adapts to perl5
  adds "callback" and "extend" examples
  don't forget the most important part
  steals python directors and adapts to perl5
2013-12-23 07:30:37 +00:00
William S Fulton
257a9865e9 Make save_value non-copyable 2013-12-19 18:12:19 +00:00
Vladimir Kalinin
b4fef06c42 fixed %template within %extend, test added
fixed language symbol table nested classes name separator, test added
fixed %feature "flatnested" working with %extend
fixed Swig_offset_string for empty string
added simple template to save/restore values in current scope (readability reasons)
2013-12-19 02:11:22 +04:00
Ian Lance Taylor
ba049db40b Remove Go -longsize option. 2013-12-17 17:37:55 -08:00
Ian Lance Taylor
532da6989c [Go] Add -go-pkgpath option. 2013-12-17 13:50:39 -08:00
Vladimir Kalinin
25689857eb Language::addSymbol fix, to handle classes correctly 2013-12-17 12:14:33 +04:00
Ian Lance Taylor
1dca0af024 Update for Go 1.2 release. Add support for linking SWIG code directly
into executable, rather than using a shared library.
2013-12-16 19:50:17 -08:00
William S Fulton
a1c17d585d Fix R unions seg fault
Started seg faulting since nested branch merge
2013-12-14 22:35:02 +00:00
William S Fulton
314fae460b Merge branch 'nested' - nested structs/classes support
* nested:
  Deprecation of the 'nestedworkaround' feature
  Ensure -c++out is not used with -c++
  Add missing header to new source file
  Nested C class setters restored in c++out mode for Octave
  Classprefix fixed after private nested classes some comments and spaces added
  Fix template partial specialization detection
  Minor tweaks in Swig_feature_set
  Swig_offset_string moved to misc.c
  nested private classes are discarded while parsing nested relate functions are moved to nested.cxx and renamed accordingly
  out-of-scope template definitions fixed nested_private test disabled again
  fixed out-of-scope nested class definitions, added a test enabled nested C structs assignment (still disabled for Octave), added Java runtime test fixed nested_private test case for Java & C#
  Testcase of private nested class usage causing segfault
  C nested struct passed by value example
  Add in Travis testing for nested branch
  Add C++ nested class example
  Minor code improvements
  Cosmetics/code beautification of nested class support
  Nested classes support
2013-12-14 15:12:07 +00:00
Ian Lance Taylor
4cf5de797f Add comment with SWIG file name in files generated for Go. 2013-12-13 11:56:31 -08:00
William S Fulton
2121e1217e Ensure -c++out is not used with -c++
Error checking for this combination implemented as well as correcting
Octave

Also refactor, replacing CPlusPlusOut variable with cparse_cplusplusout
for an implementation which more closely resembles cparse_cplusplus which
is also required in both .c and .cxx files.
2013-12-12 20:52:44 +00:00
William S Fulton
3b4d331310 Add missing header to new source file 2013-12-12 09:00:23 +00:00
Miklos Vajna
227192f80a Fix Examples/php/pointer to work with PHP 5.5
With this, all examples work with PHP 5.5 for me.
2013-12-12 15:52:51 +13:00
Olly Betts
cecd89f66f [PHP] The usage of $input in PHP directorout typemaps has been
changed to be consistent with other languages.  The typemaps
provided by SWIG have been updated accordingly, but if you
have written your own directorout typemaps, you'll need to
update $input to &$input (or make equivalent changes).

*** POTENTIAL INCOMPATIBILITY  ***
2013-12-12 15:40:15 +13:00
William S Fulton
6d97335d94 Minor tweaks in Swig_feature_set 2013-12-05 21:21:07 +00:00
William S Fulton
7103a06849 Swig_offset_string moved to misc.c 2013-12-05 20:59:09 +00:00
Vladimir Kalinin
b0afa8a95c nested private classes are discarded while parsing
nested relate functions are moved to nested.cxx and renamed accordingly
2013-12-05 20:41:22 +04:00
Vladimir Kalinin
e1a4e11bea fixed out-of-scope nested class definitions, added a test
enabled nested C structs assignment (still disabled for Octave), added Java runtime test
fixed nested_private test case for Java & C#
2013-12-04 01:53:42 +04:00
William S Fulton
b65ba2a8db Minor code improvements 2013-11-29 07:33:55 +00:00
William S Fulton
44a883a057 Cosmetics/code beautification of nested class support 2013-11-29 07:29:58 +00:00
Vladimir Kalinin
b63c4839fe Nested classes support
Closes #89
Squash merge branch 'master' of https://github.com/wkalinin/swig into wkalinin-nested

By Vladimir Kalinin
* 'master' of https://github.com/wkalinin/swig:
  CPlusPlusOut mode for Octave
  nested class illustration
  fixed "Abstract" flag for nested classes added an example enabled anonymous nested structs runtime test
  porting
  warnings disabled
  porting fixes
  java runtime tests ported
  nested class closing bracket offset fixed
  removed double nested template (not supported by %template parsing)
  template_nested test extended
  parent field made public
  property access fixed
  replaced tabs with spaces
  warning W-reorder
  deprecated warnings removed, derived_nested runtime test added
  optimized string indenting
  Nested classes indenting
  nested classes docs
  fixed the order in which flattened inner classes are added after the outer
  Private nested classes were getting into the type table.
  Java getProxyName() fix for nested classes fixes the case when nested classes is forward declared
  Fix for a case when a nested class inherits from the same base as the outer. (Base class constructor declaration is found first in this case)
  merge fix
  nested C struct first immediate declaration incorrectly renamed sample fixed
  tests updated to reflect nested classes support
  Java nested classes support (1)
  flattening should remove the link to the outer class
  access mode correctly set/restored for nested classes
  nested templates should be skipped while flattening (template nodes themselves, not expanded versions) also non-public nested classes should be ignored
  If nested classes are not supported, default behaviour is flattening, not ignoring flag "nested" is preserved, so, the nested classes can be ignored by user
  nested workaround test updated
  template instantiated within a class is marked as nested for ignoring purposes
  %ignore not applied to the nested classed, because "nested" flag is set too late
  typedef name takes precedence over the real name (reason?)
  unnamed structs should be processed for all the languages
  nested C struct instances are wrapped as "immutable"
  tree building
  typedef declaration for unnamed C structures fixed
  nested classes "flattening"
  fixed %ignoring nested classes
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  renamed "nested" attribute to "nested:outer" added "nested" flag, to be used with $ignore (it is not removed while flattening) added nestedClassesSupported() function to the Language interface
  tree iteration fix
  dirclassname variable names unified memory issue fixed
  merge error
  ignore unnamed structs for C++
  unnamed nested C structs naming & unnesting
  class added to classes hash under typedef name
  private nested classes skipped
  test updated due to nested templates support
  anonymous structs with inheritance fixed nested_class test to allow anonymous structs w/o declarator
  tests updated: nested workaround removed from namespace_class.i propagated nested template declaration to the C++ file
  injected members scope
  nested tempplates fixes, nested structures in "C" mode parsing added utility function "appendSibling" (like "appendChild")
  nested unnamed structures parsing fixes, access mode restored on nested class end, tdname is properly patched with outer class name prefix
  memory management fixes
  nested templates (1)
  Nested unnamed structs
  Nested class support (1)
  Nested class support (1)
2013-11-29 07:02:34 +00:00
Robert Stone
0db26ffee2 Merge remote branch 'upstream/master' into perl5-directors-minimal 2013-11-21 19:35:23 -08:00
William S Fulton
e566c5fa7f Add support for parsing C++11 =delete and =default
Although this was documented as working, it wasn't implemented
%typemap(default) failed without the idstring changes
Add some C tests using the C++ keyword delete
2013-11-20 19:12:16 +00:00
Robert Stone
43aefba9ee ran "beautify-file" make target over perl5.cxx patch hunks and rewrote callback and extend examples in the style of existing examples 2013-11-14 09:22:23 -08:00
Robert Stone
e0789366e7 prefer polymorphism on existing destructor over custom destructor method 2013-11-14 08:23:46 -08:00
Robert Stone
055cbc85de fix string mangled by tidy 2013-11-13 15:04:18 -08:00
Robert Stone
7d80d9b59e eliminate dead director code and convert remaining blocks 2013-11-13 13:30:54 -08:00
Robert Stone
0901a3e867 steals python directors and adapts to perl5 2013-11-12 12:45:03 -08:00
William S Fulton
c7b5316912 Merge branch 'master' of https://github.com/BrantKyser/swig
- Remove using directives from the generated C# code and fully qualify the use of all .NET
  framework types in order to minimize potential name collisions from input files defining
  types, namespace, etc with the same name as .NET framework members.
- Globally qualify the use of .NET framework types in the System namespace
- Remove .NET 1.1 support, .NET 2 is the minimum for the C# module

Closes #79

* 'master' of https://github.com/BrantKyser/swig:
  Correct spelling of compatibility.
  Update documentation to reflect fully qualifying the use of .NET types in the generated code.
  Add support for SWIG2_CSHARP macro to create SWIG 2 backwards compatability mode.
  Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members.
  Since SWIG 3.0 removes support for .NET 1.1, cleanup the C# library by removing the use of the SWIG_DOTNET_1 macro.
  Globablly qualify the use of types from the .NET framework's System namespace in the C# module and library.
  Add test case to demonstrate the name collision that occurs in the generated C# code when a namespace is named System.
2013-11-09 11:32:50 +00:00
William S Fulton
e717ed3056 Improve directorthrows patch
Separate $packagepath substitution from non-director code (as
documented). Some of the directorthrows code has been rewritten
so that fewer code changes are present compared to before the patch.

canonicalizeJNIDescriptor() refactored so it can be used for general
code, not just the directorin:descriptor typemap attribute.

Better implementation for substituting '$packagepath/$javaclassname' -
fixes some quirks in '$packagepath/$javaclassname' descriptor substitutions
if a dot was present in the descriptor string.
2013-10-31 23:16:09 +00:00
William S Fulton
cf4f5e8118 More conventional variable naming in directorExceptHandling 2013-10-24 08:03:33 +01:00
William S Fulton
fc13a24ecb directorthrows warning fixes
- Fix line number display - now the usual simpler warning message can be displayed
for WARN_TYPEMAP_DIRECTORTHROWS_UNDEF - it still points to the problem method.
- Use macro names for warning suppression in test.
2013-10-24 07:45:56 +01:00
William S Fulton
88678ed492 director:except tweaks Recode whitespace handling, remove unnecessary comments in generated code. 2013-10-24 07:06:55 +01:00
William S Fulton
f55e0092ef Remove pointless code from Java director:except patch 2013-10-23 18:43:36 +01:00
William S Fulton
97fd20a58d Minor improvements to Java director:except patch 2013-10-23 18:43:13 +01:00
William S Fulton
9237c4553c Code style conforming channges for Java director:except patch 2013-10-23 18:26:41 +01:00
Marvin Greenberg
6736e74127 Add feature director:except for improved director exception handling in Java
Closes #91
2013-10-22 20:44:35 +01:00
William S Fulton
ec1d5a5be1 Correct guile help for -Linkage.
-linkage does not work (it clashes with the generic -l option).
2013-10-21 21:36:07 +01:00
William S Fulton
d15220cba4 Remove a couple of unused variable warnings in generated code 2013-10-18 19:10:42 +01:00
Brant K. Kyser
adb93980f2 Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members. 2013-10-17 15:44:24 -05:00
Brant K. Kyser
3235570619 Globablly qualify the use of types from the .NET framework's System namespace in the C# module and library. 2013-10-17 13:27:48 -05:00
William S Fulton
9c7d014389 T_STRING is now const char * instead of char *
Fixes Guile constant wrappers removing -Wwrite-strings g++ warning.
2013-10-17 18:36:59 +01:00
Nikhil Shetty
aad30cf4de BUGFIX: superclass name not lispy
The superclass names were not lispified correctly and so the class was inheriting
from erroneous class symbols.

Closes #96.
2013-10-12 14:32:50 +01:00
William S Fulton
bcb7aee022 Merge branch 'master' into gsoc2009-matevz
Conflicts:
	Examples/Makefile.in
	Examples/guile/Makefile.in
	Lib/php/php.swg
	Makefile.in
	Source/CParse/parser.y
	configure.ac
2013-10-10 07:26:09 +01:00
William S Fulton
3fcbb40af9 Remove incorrectly and newly introduced assert
Was failing in li_boost_shared_ptr.i for some languages. A similar
testcase has been added into naturalvar_more.i.
2013-10-05 02:16:02 +01:00
William S Fulton
e186d2176a Fix %naturalvar and templated methods using enums
%naturalvar was not being picked up - use the symbol table instead for
looking up the feature.

use_naturalvar_mode() has been moved to Language class (not strictly necessary though)
2013-10-04 23:08:33 +01:00
William S Fulton
c4d40c7b64 PHP directors - generate call_user_function on one line 2013-10-01 22:13:57 +01:00
Olly Betts
12708c9241 Fix typos 2013-09-25 17:29:33 +12:00
Artem Serebriyskiy
c3f3880d0c Lua static member access improvements.
1) Static members and static functions inside class can be accessed as ModuleName.ClassName.FunctionName (MemberName respectively). Old way aka ModuleName.ClassName_FunctionName still works.
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
3) More 'runme' tests for lua + modifications to existing tests to test new changes.

Code is loosely based upon python implemenation of the same thing.

Patch #62.
2013-09-12 21:32:26 +01:00
William S Fulton
67659773cc Remove some Java references from C# module 2013-09-02 19:14:20 +01:00