Commit graph

81 commits

Author SHA1 Message Date
William S Fulton
faeaacf112 smartptr feature support - factor out common code 2015-09-25 22:57:59 +01:00
Vladimir Kalinin
d2ab75f907 obscure case workaround in std::set wrapper, where ignored type still need to be processed 2014-05-19 02:05:23 +04:00
Vladimir Kalinin
3692e175bc global unnamed structures ignored 2014-05-15 03:13:25 +04:00
Olly Betts
2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
Vladimir Kalinin
2f3d93e93a Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used. 2014-02-02 22:38:13 +04: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
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
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
b725625e6f Add support for thread_local when specified with other legitimate storage class specifiers - extern and static 2013-02-08 06:36:39 +00:00
William S Fulton
6399428a62 Add lambda functions to the symbol tables and add ability to suppress lambda warnings. 2013-02-04 20:05:34 +00:00
William S Fulton
e805d5f925 Merge branch 'master' into gsoc2009-matevz
parser.y still to be fixed up

Conflicts:
	Doc/Devel/engineering.html
	Examples/Makefile.in
	Lib/allegrocl/allegrocl.swg
	Lib/csharp/csharp.swg
	Lib/csharp/enums.swg
	Lib/csharp/enumsimple.swg
	Lib/csharp/enumtypesafe.swg
	Lib/java/java.swg
	Lib/python/pydocs.swg
	Lib/r/rtype.swg
	Source/Include/swigwarn.h
	Source/Modules/octave.cxx
	Source/Modules/python.cxx
	Source/Modules/ruby.cxx
	Source/Swig/scanner.c
	Source/Swig/stype.c
	Source/Swig/swig.h
	configure.ac
2013-01-28 07:01:37 +00:00
William S Fulton
7841a0d097 Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
William S Fulton
7d610dbd62 Remove unnecessary null check
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13926 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-22 23:20:57 +00:00
William S Fulton
684bd8e472 Minor warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:48:09 +00:00
William S Fulton
fd24b188e2 Fix Coverity 'Uninitialized pointer fields' - member variables are now initialized
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:17:28 +00:00
William S Fulton
61b4c1cbcd Fix 'name' attribute for explicitly defined constructors and destructors if the associated class was in a namespace, eg a correct fully qualified name might be Space::Klass::~Klass, but it was Space::~Klass, now it is simply ~Klass (names are now consistent with implicitly added constructors/destructors).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13884 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-13 22:21:51 +00:00
William S Fulton
6d655a7f41 Add scoped enums into correct correct scope in type system. Note that cpp0x_strongly_typed_enumerations.i still shows further language symbol table problems which need fixing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-20 18:17:52 +00:00
William S Fulton
bc43673a86 Add new warning if an empty template declaration is used on a base class, minor docs improvement for empty template declarations.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-14 22:25:35 +00:00
William S Fulton
e21bd46420 Resolve template parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13507 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-04 20:25:43 +00:00
William S Fulton
73b0431fbc Fix C enum forward declarations in some target languages (notably Java)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13030 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-01 18:44:22 +00:00
William S Fulton
36ab437443 Revert 12776, 12777 - %shared_ptr fixes with typedef. It breaks li_boost_shared_ptr testcase in Python. To resolve at a later date.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12953 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-03-25 19:10:33 +00:00
William S Fulton
d0081ebb82 %shared_ptr fixes when the type is a template using template parameters that are typedef'd to another type. Also fixed %shared_ptr when the template parameter has a default value.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-13 00:36:12 +00:00
William S Fulton
7d038d4bd7 Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-26 19:34:23 +00:00
William S Fulton
6c100423b8 Fix some scope and symbol lookup problems when template default parameters are being used with typedef - add the fully expanded template into the c symbol table and scope table.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12754 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-01 22:59:55 +00:00
William S Fulton
a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
William S Fulton
4a73d986dd Any 'using' statements in the protected section of a class were previously ignored with dirprot mode, certainly with Java and C#. Also directors - a call to a method being defined in the base class, not overridden in a subcalss, but again overridden in a class derived from the first subclass was not being dispatched correcly to the most derived class - affecting non-scripting languages. Fix for C# is based on recent fix for D.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:02:50 +00:00
William S Fulton
3d7799fe0d New warning when the smartptr feature is missing in some classes in an inheritance chain. Errors test-suite now uses Python instead of Tcl as testing language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12395 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-17 21:12:35 +00:00
William S Fulton
b01277a19b Various inherited class warning/error line number fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12223 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-18 01:14:21 +00:00
William S Fulton
257ce20f30 Fix uncompileable code when %rename results in two enum items with the same name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-03 17:44:42 +00:00
William S Fulton
12cfc251e4 Fix #2408232. Improve shared_ptr and intrusive_ptr wrappers for classes in an inheritance hierarchy. No special treatment is needed for derived classes, the SWIG_SHARED_PTR_DERIVED macro is deprecated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12036 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-22 22:49:47 +00:00
William S Fulton
3cf41050b5 Fix Octave C enums wrapping when the generated code is C++ compiled
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12022 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-11 22:53:33 +00:00
William S Fulton
1253657bb4 Add improved namespace support - the nspace feature, working for Java only at the moment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 21:27:23 +00:00
William S Fulton
cb64f65bae SWIG license change - Source moves to GPLv3
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:53:33 +00:00
William S Fulton
0a1c7c91b1 fix Java and C# enums when one of the enum items is ignored
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11279 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-16 19:29:08 +00:00
William S Fulton
629aae375c Additions to %types so that a user can specify the code to go into the casting / conversion function
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10222 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-31 22:45:59 +00:00
William S Fulton
575efcdd53 Fix using statements for overloaded methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10176 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-30 22:34:50 +00:00
William S Fulton
fe042d2ebc Replace cvs $Header$ with svn $Id$
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:42:11 +00:00
William S Fulton
75b1e083cf Fix warning display of templated base classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9962 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-30 19:27:40 +00:00
William S Fulton
3e5f30c94f conversion operator %rename improvements - the exact operator name must be specified now, rather than a fully qualified operator name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-26 00:06:45 +00:00
William S Fulton
f486588124 correction to last commit
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9654 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-03-19 21:28:16 +00:00
William S Fulton
337f63fd28 seg fault fix when parsing incorrect C++ namespace code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9653 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-03-16 23:39:28 +00:00
Dave Beazley
ff41049b1c Eliminated use of swigkeys.h/.c files.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 20:58:19 +00:00
Dave Beazley
c12550e4ad API cleanup. Documentation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 05:23:20 +00:00
Dave Beazley
264b7dff90 API cleanup. Documentation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-30 18:27:47 +00:00
William S Fulton
aa04c4c057 beautify/format source code with gnu indent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-01 23:54:54 +00:00
William S Fulton
7f74b8e7a3 Common template for head of each file detailing licence, distribution and authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8972 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-06 22:51:01 +00:00
Marcelo Matus
46318e8766 fix bug #1263457
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-23 23:45:28 +00:00
Marcelo Matus
54078c42b9 fix for non-void returning value and using + %extend
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-23 07:06:41 +00:00
Marcelo Matus
e99a8a707f fix using + extend as reported by William
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8859 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-22 01:21:43 +00:00