Commit graph

3,063 commits

Author SHA1 Message Date
William S Fulton
e7834c8daa Perl directors changes entry added and minor tidy up 2013-12-23 18:04:14 +00:00
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
cf92954bc0 C++11 tests re-organise - gcc-4.8 minimum expected for all to pass 2013-12-22 19:38:46 +00:00
William S Fulton
6250c288b5 Suppress gcc-4.9 auto_ptr deprecation in test 2013-12-22 17:49:16 +00:00
William S Fulton
32ad89668a Use RUNME consistently in examples makefile 2013-12-20 18:52:19 +00:00
Ian Lance Taylor
01ebdc0995 In Examples/Makefile.in, compile and link the program in go and
go_cpp, rather than in go_run.  This permits eliminating go_run_cpp.
2013-12-20 08:14:45 -08:00
William S Fulton
82990df573 Error test-suite updated for nested changes
WARN_DEPRECATED_NESTED_WORKAROUND test added
WARN_PARSE_NAMED_NESTED_CLASS test removed
2013-12-19 18:23:28 +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
8dba8b1fde Go: Don't require that Go environment variables be set when running
examples or testsuite.
2013-12-18 11:03:39 -08:00
Ian Lance Taylor
ba049db40b Remove Go -longsize option. 2013-12-17 17:37:55 -08: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
39bf2efdc9 Revert template_nested_typemaps to what it was before nested merge
The breaks were fixed in the last couple of commits
2013-12-16 19:28:11 +00:00
Vladimir Kalinin
865408874f fixed %template declared within class, next to template declaration
added a few tests for C# nested classes support
2013-12-16 11:43:28 +04:00
Geert Janssens
0cf116128b Skip unsigned (long) long integer tests on OS X with guile 1.8 2013-12-14 23:36:35 +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
William S Fulton
fb103f8db4 Minor expansion of nested C structs testing 2013-12-12 21:23:49 +00:00
William S Fulton
c256dd140b Add check-c and check-cpp targets for running just C and C++ test cases 2013-12-12 20:58:10 +00:00
William S Fulton
e95ac82651 Nested C class setters restored in c++out mode for Octave
Suitable casts are required so that assignment of instances of nested classes
work as the nested class is duplicated in the global namespace, eg:

struct Outer {
  struct Nested {
    int bar;
  } bar_instance;
};

Outer.bar_instance can now be assigned to.
2013-12-12 09:00:16 +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
Vladimir Kalinin
053c605df0 out-of-scope template definitions fixed
nested_private test disabled again
2013-12-04 16:21:33 +04:00
William S Fulton
b175df4e5f C++11 alias templates seg fault fix
Segfault fix when using alias templates, reported by Pierre-Henri Wuillemin
2013-12-03 23:38:54 +00:00
Vadim Zeitlin
ed28725a15 Add std_auto_ptr.i defining typemaps for returning std::auto_ptr<>.
These typemaps are currently defined for C#, Java and Python only and the
tests are provided only for these languages.

Also add a brief description of the new header to the documentation.
2013-12-03 23:45:20 +01: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
df67907168 Testcase of private nested class usage causing segfault
Needs fixing for C#/Java
2013-12-02 07:10:44 +00:00
William S Fulton
19f202cc16 C nested struct passed by value example
This was causing problems in Octave as wrappers were compiled as C++.
Solution has already been committed and required regenerating the inner struct into
the global C++ namespace (which is where it is intended to be in C).
2013-11-30 18:04:31 +00:00
William S Fulton
2d518c638c Add C++ nested class example
This also reverts the nested class additions to the Java/C# 'class' example
so that the 'class' example remains identical across different language modules
2013-11-30 09:23:16 +00:00
Robert Stone
8bb53e4120 Merge remote branch 'upstream/master' into perl5-directors-minimal 2013-11-29 12:50:42 -08:00
Klaus Kämpf
9e2c35f766 Make string encoding explitic
Ruby 2.0 enforces explicit string encodings. The char_constant
testcase fails because the internal (SWIG_FromCharPtrAndSize, using
rb_str_new) defaults to ASCII-8BIT while the test-suite file defaults
to the current shell LOCALE setting.

This patch sets the char_constant_runme.rb encoding to ASCII-8BIT.
2013-11-29 14:02:51 +01: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
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
cdefaaf794 Fixes for c_delete and c_delete_function tests 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
Robert Stone
bb6ab0318c Merge remote branch 'upstream/master' into perl5-directors-minimal 2013-11-16 12:06:34 -08:00
Robert Stone
81ce0a723e fix "long long" tests for perl v5.6 2013-11-14 11:24:24 -08: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
73e2de7538 adds "callback" and "extend" examples 2013-11-12 13:03:49 -08:00
Robert Stone
0901a3e867 steals python directors and adapts to perl5 2013-11-12 12:45:03 -08:00
William S Fulton
65de78b8b4 enum_plus testcase was never been run 2013-11-09 14:54:36 +00:00
William S Fulton
ca5327d0da Remove Lua specifics from keyword_rename testcase 2013-11-09 14:54:36 +00:00
Artem Serebriyskiy
8b35c0b5ce Add runfile to check for correct compatibility name generation
Checks that if OldClass was renamed to NewClass, then not only
OldClass.static_method is now NewClass.static_method, but also
compatibility name OldClass_static_method is now NewClass_static_method.
Same for enums, static vars etc
2013-11-09 14:54:36 +00:00
Artem Serebriyskiy
14de0de5e7 Tests for arrays and global vars 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
b901979d1c Tests for enum/consts old-style bindings and for static const char; bindings 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
89bc5576c9 More tests 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
b9ba05be81 Style patches 2013-11-09 14:54:34 +00:00
Artem Serebriyskiy
c9279ab0e7 More tests 2013-11-09 14:54:34 +00:00
Artem Serebriyskiy
dfc02f306d First banch of tests 2013-11-09 14:54:33 +00:00