Commit graph

3,338 commits

Author SHA1 Message Date
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
William S Fulton
fcd0480364 Fix some cases of C++11 exception specifications on constructors with =default or =delete 2013-11-22 00:13:48 +00:00
William S Fulton
f4ada30a7e Add support for C++11 noexcept specification in exception specifications 2013-11-21 20:20:56 +00: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
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
Vadim Zeitlin
72afb74f47 Add support for case conversion characters in regex substitutions.
Allow using Perl-like \l, \L, \u, \U and \E escape sequences in the
substitution string used with %rename("%(regex:/pattern/subst/)s").
This is useful for e.g. title casing all string after removing some prefix.

Closes #82
2013-10-15 07:17:56 +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
7b08378145 Minor cleanup prior to merging to master 2013-10-11 21:48:45 +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
738cc36aab Rename all C++0x to C++11 and cpp0x to cpp11 2013-10-07 20:37:00 +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
William S Fulton
f01b52c44c Tweak 'make beautify-file'
unix2dos and dos2unix were renamed to todos and fromdos - they aren't
really needed (on Linux anyway), so removed.
2013-09-15 01:35:28 +01:00
Sylvestre Ledru
7a88729c87 Remove trailing spaces in the generated code.
No functional changes
2013-09-13 10:02:39 +02: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
Miles Bader
c746ae7a0f Include Lua error locus in SWIG error messages
This is standard information in Lua error messages, and makes it much
easier to find bugs.
2013-08-30 06:56:33 +01:00
William S Fulton
f55ff50dd5 Skip the UTF-8 BOM of including files.
For avoiding illegal token error when parsing include files which have the UTF-8 BOM.

Closes #75.
2013-08-29 19:22:50 +01:00
William S Fulton
b58dabced9 %implicitconv is improved for overloaded functions.
Like in C++, the methods with the actual types are considered before trying implicit conversions.
2013-08-28 20:30:46 +01:00
Olly Betts
628b4710e5 [Python] Fix clang++ warning in generated wrapper code. 2013-08-24 08:40:08 +12:00
Olly Betts
b477cb66be Use offsetof() rather than icky homemade equivalent 2013-08-24 08:34:50 +12:00
William S Fulton
d0af4f50d3 Add %pythonbegin directive.
For adding code at the beginning of the generated .py file.
2013-07-05 06:30:16 +01:00
Olly Betts
d3252bbf7f Fix comment typo 2013-07-02 13:22:35 +12:00
William S Fulton
779dc402b6 Fix a const_cast in generated code that was generating a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
Affects Python, Ruby, Ocaml.

Based on SF patch #341.
2013-07-01 20:00:12 +01:00
Karl Wette
0d05b2a2d1 Octave: make texinfo strings static (internal linkage) 2013-06-13 17:46:34 +02:00
Olly Betts
918c64af84 Fix comment typos 2013-06-04 12:44:28 +12:00
William S Fulton
0f1e3da5de Fix the high passed to PyTuple_GetSlice in varargs wrappers.
Harmless bug as slices can take any size larger than the actual size for
the high value. Reported in SF Bug 1326.
2013-05-23 21:25:41 +01:00
William S Fulton
3f9d7ed416 Minor fixes after Coverity analysis 2013-05-16 08:13:56 +01:00
William S Fulton
9203c6d5c6 Remove deprecated Guile options from help.
Also use wording for deprecated options warning which is consistent with
elsewhere.
2013-04-29 08:02:18 +01:00
Geert Janssens
ce14abaf61 guile: emit warning when -gh or -scm option are used 2013-04-28 22:06:28 +02:00
Geert Janssens
b819d2a91e Drop guilegh interface
All of guile's interface files now use the scm interface.
This should not affect any users. Swig generated code
using the scm interface can be mixed with gh interface
using user code.
It does simplify maintenance of the guile swig code though.
2013-04-28 22:06:24 +02:00
William S Fulton
99231457db Fixes for warnings issued by clang 2013-04-28 17:59:40 +01:00
Yung Lee
6e06b50adf Remove non-ascii characters at a comment line in d.cxx that trouble VC++ 2013-04-22 18:28:26 +01:00