Commit graph

148 commits

Author SHA1 Message Date
Marcelo Matus
69bb860df7 added friend support and reduced spurious name(kw) warnings for non-wrapped symbols
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:32:13 +00:00
Marcelo Matus
96e80c76b7 fixed dirprot member detection and add code to detect when a node need to checked for kw warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 00:52:25 +00:00
William S Fulton
62ba646c89 Moved non static function declarations from source files into header files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5602 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-28 21:48:39 +00:00
William S Fulton
7c67214d9f Moved non static function declarations from source files into header files
Added header include guard


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5601 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-28 21:44:41 +00:00
Marcelo Matus
83013d7c0e Fixed more %rename errors, and moving
the function 'need_protected' outside parser.y,
ie, if more subtle cases appear, they can be
fixed without changing parser.y.

Now parser.y looks much more like the original 1.32.

 Source/CParse/parser.y: moving and fixing 'need_protected'
 Source/CParse/util.c:  moving and fixing 'need_protected'
 Examples/test-suite/director_protected.i: more %rename cases
 Examples/test-suite/director_using.i: fixing bad module name

The errors in question where related to the mix of
%rename + (typedef|static)  + protected + dirprot_mode:


%rename(s) Foo::p;
%rename(q) Foo::r;

%inline {
class Foo {
public:
  virtual ~Foo() {}

  int p(){ return 1;}
  int r(){ return 1;}

protected:

  typedef int q();
  static int s();
};

since q and s look like functions, the parser was adding them
completly to the symbol table, and clashing latter with the
attemped renames.

The error was only visible when dirprot was enabled, with
the old behavior it was ok.

Marcelo


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5533 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 03:59:18 +00:00
Marcelo Matus
7335663344 %rename(x) Foo::y();
%inline %{
class Foo {
protected:
    void x();
public:
    void y();
};

%}

will work in plain or plain director mode, but it will complain the
same as before with director protected support.

The reason is that the parser emmits the warning, and at that stage it
is not possible to decide if the protected Foo::x() could or not
conflict with the renamed Foo::y(), since Foo::x() could be virtual,
even when no "virtual" attribute is used.



Core:
 parser.y: Detect the dirprot mode and prevents the generation of
           protected symbols at the parsing stage.
 lang.cxx: Export the director_protected_mode for parser.y and the
           director protected member detection is much cleaner.
 main.cxx: Fix the -dirprot flag, it was working in SWIG_FEATURE but
           not in the command line.(minor thing not relate to the error).
 swigmod.h: added Lang::dirprot_mode() for cleaner detection.
 utils.cxx: is_member_director() centralizes and improve the test.

Test suite:
 protected_rename.i: added %inline, so it can compile now.
 director_protected.i: more cases, checking using %rename.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5530 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-10 23:10:31 +00:00
William S Fulton
f09d5cbc7a Warning fix for Visual C++. const is incorrectly being defined away to nothing.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5495 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-07 00:29:00 +00:00
Marcelo Matus
8accb4c083 Check the protected constructor case. They don't get into the director.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5486 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-05 06:08:54 +00:00
Marcelo Matus
75c1713b2d Fixes to support protected members with director, proper virtual member recognition and support of the nodirector feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-05 01:59:28 +00:00
Dave Beazley
69d88a944c Fixed parsing problem with = &x[]. This was causing the
Java java-lib_various.i test to fail.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-26 19:54:09 +00:00
Dave Beazley
c2af7898c0 [ 756552 ] missing default argument class scope with "|"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5403 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-25 19:27:17 +00:00
Dave Beazley
6b705938de [ 840878 ] support for %inline { ... } (PATCH)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5401 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-25 18:48:11 +00:00
Dave Beazley
c3eab02d6d Fixed [ 836903 ] C++ inconsistency (with void arguments).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5398 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-25 18:26:03 +00:00
Dave Beazley
9ed46ad4ca Fixed [ 791835 ] Default argument with cast: txt = (char *)"txt" syntax Error.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5392 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-25 16:48:51 +00:00
Dave Beazley
95f07cfd24 Added error message for using %template with qualified names inside of
a namespace.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5174 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-30 18:57:45 +00:00
Dave Beazley
4cf4dad108 Major refactoring of DOH List/Hash iterators. See CHANGES
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5101 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-11 20:26:57 +00:00
Dave Beazley
860baa7745 Fixed [ 794914 ] Wrong types in template specialization.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5060 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-01 19:59:39 +00:00
Dave Beazley
903a905640 Fixed [ 797573 ] no way to rename classes coming from C structures.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5051 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-01 17:54:22 +00:00
Dave Beazley
9040f3a579 Work on embedded typemaps. Highly experimental--probably broken
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5007 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-17 21:19:27 +00:00
Dave Beazley
23b6a985cd Fixed [ 775989 ] numeric template parameters
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4994 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-11 19:24:31 +00:00
Dave Beazley
95ebf5724d Further patch to :: space handling.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4991 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-11 17:55:04 +00:00
Dave Beazley
c9ecaaba02 Fixed [ 779062 ] Class"\n"::foo not supported.
Also changed 'char' to 'int' in a few places to silence warning messages.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4977 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-07 15:46:00 +00:00
Dave Beazley
c54a578384 Fixed template partial specialization argument expansion bug
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4650 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-01 19:08:25 +00:00
Dave Beazley
8a1dd3868a Fixed "bloody hell" expression evaluation problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4638 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-27 22:58:40 +00:00
Dave Beazley
fa9f0b96b2 Fixed default argument problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-26 23:21:04 +00:00
Dave Beazley
e789903b0f Fixed segfault problem. We should probably release 1.3.19 fairly soon as this
problem was serious.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-26 19:18:32 +00:00
William S Fulton
42422dd517 minor warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-21 22:24:18 +00:00
Dave Beazley
23a4205c59 Fixed overloaded constructor+%extend problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4606 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-21 17:11:06 +00:00
Dave Beazley
4138222abd Fixed odd class scope bug.
class Foo {
public:
    int Foo::bar(int x);
};

SWIG just drops the "Foo" prefix the method and continues (previously,
the declaration was ignored entirely).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4591 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-20 19:36:51 +00:00
Dave Beazley
8b7b551f88 Fix to escape code handling.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-10 14:03:05 +00:00
William S Fulton
3327e7095c gcc -Wall warnings fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4426 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-03 23:29:53 +00:00
Dave Beazley
671e5f23c7 Fixed [ 653548 ] error parsing casting operator definition.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-27 19:34:07 +00:00
Dave Beazley
ae590e26ed Added support for anonymous bit-fields.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-27 17:21:48 +00:00
Dave Beazley
eb54f48b97 Fixed [ 642112 ] Constants char bug
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4402 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-26 19:13:28 +00:00
Dave Beazley
1c61a931ad Extremely scary template patch to fix Luigi's partial specialization argument handling bug.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4398 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-26 17:44:28 +00:00
Dave Beazley
ef2ce5af37 Fixed arrayref.i test.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4396 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-25 22:37:41 +00:00
William S Fulton
fb97158615 enumvalue attribute always has a value now. If there is no explicit value set
in the code being wrapped, then a value is constructed which is
1+ the previous enum value. For example:
enum numbers { zero, one, seven=7, eight};
has enumvalue attributes of '0', 'zero+1', '7' and 'seven+1'

Based on patch by Heiner Petith.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4363 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-19 23:06:10 +00:00
Dave Beazley
67424ecc84 Fixed missing line break in %except warning message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4349 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-19 13:51:38 +00:00
Dave Beazley
3d51ba0040 Fixed Luigi's template+%extend magic trick.
Marcelo should verify that his codes still work... ;-).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4344 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-18 21:26:51 +00:00
Dave Beazley
36370cce28 Fixed explicit instantiation syntax error.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4305 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-12 17:18:35 +00:00
Dave Beazley
f9dfaf88bb Fixed [ 675491 ] parse error with global namespace qualification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4255 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-06 16:57:32 +00:00
Dave Beazley
046047d3a3 Added support for the unary plus operator in expressions.
Amazingly, this never seems to be have been added to SWIG
before ;-).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4247 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-01-31 17:28:51 +00:00
Luigi Ballabio
1b25a4d17d *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-01-22 08:11:51 +00:00
William S Fulton
8e3f05b007 Makefile.in files replaced by single Makefile.am
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-12-23 23:07:01 +00:00
William S Fulton
f7283ef229 swigver.h removed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4183 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-12-11 22:30:54 +00:00
Dave Beazley
b940c7ae94 Fixed template argument replacement bug.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4169 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-12-10 16:15:22 +00:00
Dave Beazley
1cd4a401d0 Removed DOH/Include
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4161 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-12-06 20:26:55 +00:00
Dave Beazley
516036631c The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00