Commit graph

47 commits

Author SHA1 Message Date
William S Fulton
67c4c2186c Support multiple arguments in variadic templates.
Remove warning SWIGWARN_CPP11_VARIADIC_TEMPLATE which was issued if more
than one argument was used for a variadic template.

SwigType enhancement: 'v.' now represents a variadic argument.
2022-12-22 21:23:39 +00:00
Olly Betts
631b41ae7b Use https for swig.org links 2022-10-06 13:16:39 +13:00
William S Fulton
2ded25d138 Fixes for ISO C89 2022-03-28 19:25:11 +01:00
William S Fulton
51a7f27d1c Minor fix to Swig_print_node 2022-03-25 23:44:07 +00:00
William S Fulton
1db04bf322 Improvements to the -debug command line options
The debug command line options that display parse tree nodes
(-debug-module, -debug-top, -debug-symtabs) now display previously hidden
linked list pointers which are useful for debugging parse trees.

Added new command line option -debug-quiet. This suppresses the display
of most linked list pointers and symbol table pointers in the parse tree nodes.

The keys in the parse tree node are now shown in alphabetical order.
2022-03-25 23:34:52 +00:00
Olly Betts
d7625ee6b2 Fix fatal error implemented by assert
Calling assert() on a condition that's always false is not an
appropriate way to exit after emitting "Fatal error [...]" because
if NDEBUG is defined the assert() becomes a no-op and the error
stops actually being fatal.
2022-03-07 14:24:48 +13:00
Olly Betts
4467c94fe9 Fix removeNode() to really unset previousSibling
There was a typo in attribute name so we attempted to remove the
non-existent attribute prevSibling instead.
2021-12-10 18:34:21 +13:00
William S Fulton
024eaeaacf Improve debug display of parameters
Debug display now displays parameters as strings for "kwargs", "pattern",
"templateparms", "throw" elements in the parse tree (not just "parms"
and "wrap:parms").
Add in single quotes when displaying these parameter lists as strings.
2019-02-17 20:03:23 +00:00
William S Fulton
8173c5935e Show node pointer value when displaying a node tree
For easier debugging when using -debug-module, -debug-top etc
2015-10-10 15:19:52 +01: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
7841a0d097 Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
William S Fulton
dac89e16d4 const char * correctness fixes (in C code)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13939 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-26 20:30:37 +00:00
William S Fulton
7b58300cbd Fix display of pointers on 64 bit systems, only 32 bit values were being shown.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-21 22:52:30 +00:00
William S Fulton
9e624db5bf Better display of parms when using -debug-module and -debug-top
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-05-15 19:51:41 +00:00
William S Fulton
cfcad4ab69 Fix/Workaround unexpected call to Hash_str() when running make director_protected_overloaded.cpptest and director_using.cpptest
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12219 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-14 18:50:04 +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
5a3ba0d607 Modify -debug-tags output to use standard file name/line reporting so that editors can easily navigate to the appropriate line
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-09 17:20:11 +00:00
Haoyu Bai
6d2aef67d9 Replaced all [const] String_or_char * to const_String_or_char_ptr, by the following command:
sed -i "s/\(const \)\?String_or_char \*/const_String_or_char_ptr /g" CParse/* Include/* Modules/* Preprocessor/* Swig/*

This is a preparation for moving to new DOH, since for strong typed objects we need the const_String_or_char_ptr class to implicit convert to and from String * or const char *.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-24 13:15:51 +00:00
William S Fulton
27b7d1de5b Swig_print_node truncates to 80 characters now instead of 40
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10193 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-12-16 20:37:25 +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
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
Dave Beazley
7a826c8b6d Changed Header keyword to Id for SVN
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-05 21:57:44 +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
Olly Betts
d5d8f1a3ee Correct function name in comment
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9356 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-25 03:32:12 +00:00
Olly Betts
3c935aa489 Oops, can't Delete() a String* which we've passed to Setattr.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9342 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-24 03:44:08 +00:00
Olly Betts
8904cc86c1 Use DOH String instead of static char buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-23 23:10:49 +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
e598ab002b more swigkey unification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8196 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-03 09:26:42 +00:00
Marcelo Matus
55005e98ee Move rename/namewarn engine from parser.y to naming.c. The code was getting
too large to be in the parser.

Centralize the swig keys to avoid replication and wrong spellings.

Use more HashGetAttr where possible and other speed improvements
to compensate for the extra work introduced by the new rename/namewarn
mechanism.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-02 04:33:19 +00:00
Marcelo Matus
94a82526ec fix %extend(%typemaps + %fragments) before class declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-19 10:46:41 +00:00
Marcelo Matus
628dc6b32b add NewStringEmpty, use more StringEuqual and less Strcmp
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-28 17:32:56 +00:00
Marcelo Matus
d4e1bae364 use direct methods for string, hash and avoid Strstr/Strnstr
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7893 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-28 02:44:12 +00:00
Marcelo Matus
7a77a7feb9 several clean/speed ups
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-27 02:58:24 +00:00
William S Fulton
ee4450aaf2 function comments added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-10 23:37:56 +00:00
Dave Beazley
8ae4c60d39 Major refactoring of DOH List/Hash iterators. See CHANGES
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5101 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-11 20:26:57 +00:00
Dave Beazley
e19c73746d Enhancement to Swig_require(), Swig_save(), Swig_restore()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4436 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-06 21:10:49 +00:00
Dave Beazley
12a43edc2d The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00
Dave Beazley
300da52da5 Fixed minor const problem
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@960 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-12-18 03:07:47 +00:00
Dave Beazley
c15d662964 Bug fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-12-18 02:56:05 +00:00
Dave Beazley
28127aa9be Substantial changes for new module system.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@908 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-10-02 03:04:25 +00:00
Dave Beazley
0d5ed7dff5 Completely new type implementation. Almost everything broken. Typemaps sort of work. Tcl is the only working language module. More changes to follow over the next few days.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@651 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-08-14 22:09:56 +00:00
Dave Beazley
765ad025b9 A lot of work on the type system. Experimental language module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-07-05 04:04:17 +00:00
Dave Beazley
6d6243e279 Added warning message.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@406 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-04-11 22:48:42 +00:00
Dave Beazley
0313f7aa4b Rewrote.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@399 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-04-10 15:25:07 +00:00
Dave Beazley
9f42c8e363 Added matching code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@286 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-02-28 17:05:46 +00:00
Dave Beazley
a04d5c74a4 Added tree.c
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@262 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-02-25 00:20:04 +00:00