Commit graph

2,445 commits

Author SHA1 Message Date
Dave Beazley
7e526a0b21 Turned on shadow classes by default.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-17 19:09:36 +00:00
Dave Beazley
80a9062f1d Removed config.h
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5576 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-17 19:09:17 +00:00
Dave Beazley
4d866f0f64 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5575 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-17 17:57:55 +00:00
Marcelo Matus
048663e2e9 fixing warning code 315 -> 321
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5574 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 06:01:38 +00:00
Marcelo Matus
ca3b23e9ca Adding missing built-in functions and names to pythonkw.swg and
fixing operator! warning code in python.swg


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5573 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 06:00:09 +00:00
Dave Beazley
6a6403d2bc Suppress warning 321 by default.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5572 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 03:43:51 +00:00
Dave Beazley
b459405a64 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5571 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 03:41:33 +00:00
Dave Beazley
7355bdcbd0 Changed warning to 321. 315 already used. Consult Warnings.html for list.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5570 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 03:40:00 +00:00
Dave Beazley
36570973db Changed warning message.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5569 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-16 01:58:23 +00:00
Marcelo Matus
512a9150f4 added reference to only global bad names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5568 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-15 20:24:47 +00:00
Marcelo Matus
20c05c4073 be sure the global bad names refer to global functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5567 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-15 19:29:09 +00:00
Dave Beazley
2201f0f30c *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5566 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-14 15:48:00 +00:00
Dave Beazley
b29f77f801 Weakened constructor name check to work around nested-class hack reported by
Gustavo Niemeyer.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5565 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-14 15:42:32 +00:00
William S Fulton
5fb27bf2a3 Test typemaps are being found for templated classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-14 00:17:22 +00:00
William S Fulton
187bc5e0a9 arrays of structures runtime test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-14 00:02:33 +00:00
William S Fulton
66a19d43b0 remove SWIG_exception for director protected methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 23:52:31 +00:00
Marcelo Matus
768093ccb4 added a new broken director case. the fix is simple but
it will require to modify lang.cxx, so, it will
wait the next release.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5561 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 09:05:54 +00:00
William S Fulton
c527709f74 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5560 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:27:05 +00:00
William S Fulton
51803c4b21 Director protected method wrapping tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5559 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:21:17 +00:00
William S Fulton
531e78b236 Added %javamethodmodifiers check
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:20:42 +00:00
William S Fulton
9055c5a7b5 Removed default %csmethodmodifiers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:18:32 +00:00
William S Fulton
6b3f076018 Removed default %javamethodmodifiers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:17:58 +00:00
William S Fulton
75002210be Windows path separator works on Cygwin in addition to the Unix path separator
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5555 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:17:09 +00:00
William S Fulton
c6de7c0de6 -dirprot display order
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5554 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:16:08 +00:00
William S Fulton
baa06d2509 %javamethodmodifiers (java) and %csmethodmodifiers (C#) operate slightly differently.
Previously this had to be present to set the method modifiers. Now this feature is only
used if it exists for the method being wrapped. The default is "public" as previous
however, when wrapping protected director methods it is "protected".


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:13:10 +00:00
William S Fulton
1215c1bdb6 Added missing function body which was causes linker errors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 23:19:07 +00:00
Dave Beazley
02526f0491 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5551 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 18:29:00 +00:00
Marcelo Matus
cbcd8925df added defined
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5550 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 08:25:10 +00:00
Marcelo Matus
1befff06dd *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 07:45:01 +00:00
Marcelo Matus
f49892c448 using code 315 for bad names only
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5548 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 07:15:00 +00:00
Marcelo Matus
39bdc96e3e added ocaml keywords
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5547 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 07:12:42 +00:00
Marcelo Matus
f790c57f5d Forgot #undefs, add python bad names, change names from
tclkw.swg and phpkw.swg to the right ones tcl8kw.swg and php8kw.swg.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 06:15:46 +00:00
Marcelo Matus
0c01d1edcc swig -DSWIG_ALLKW was too ugly. Use -Wallkw instead. Reverting swig.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5545 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 06:12:29 +00:00
Marcelo Matus
beb5d78df2 bad spelling in warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 06:09:53 +00:00
Marcelo Matus
ea0f636eae - Uniform the definition of the keyword warnings through
the supported languages.

- Added keyword list for most of the languages that didn't
  have one.

- "All keywords" warning support, through the -DSWIG_ALLKW
  option.

Read the Changes.current


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-12 02:23:52 +00:00
William S Fulton
b9fa8132dd *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5542 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:44:56 +00:00
William S Fulton
f805676234 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5541 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:39:08 +00:00
William S Fulton
272c42913e Added test for %import
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5540 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:33:34 +00:00
William S Fulton
3bd96d5bc6 no message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:31:14 +00:00
William S Fulton
0395926392 Added support for accepting the Unix directory separator '/' on Windows and the Mac
in addition to the native one ( '\' on Windows). This can be used in %import, %include
and commandline options taking a path, for example -I.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5538 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:21:42 +00:00
William S Fulton
302b099d9b Added test for %import
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5537 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:18:21 +00:00
William S Fulton
67d84e142a base() changed to basemethod() - base is a C# keyword
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 21:16:21 +00:00
Marcelo Matus
2c1c76d5bb it wasn't swig, it was my script
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5535 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 08:24:54 +00:00
Marcelo Matus
725e7fecc0 forgot to comment the last error fix and the dirprot implications
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5534 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 07:35:43 +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
14d87ed24d Lateral change to add runtime "reprotection" at the python
side for protected director members.

Lib/python/director.swg: added needed code for runtime checking
Source/Modules/python.cxx: added needed code for runtime checking
director_protected_runme.py: checks now that the runtime protection is working


The extra runtime checking is only done for protected members,
so, the old public directors members don't feel any overhead.

This finished the director protected support for the python language.
Java and Ocalm will need to add the "reprotection" mechanism latter.
But as in the python case, the changes will be localized in the
languages files, and there will be no need to touch the core
files anymore.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5532 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 01:59:12 +00:00
Marcelo Matus
5e8c64ea33 Added 'sleep 3' workaround.
When used, it reduces the time for compile the
test-suite from 23 minutes to 2 minutes. It also
reduces plain swig compilation

This is how it is used:

1.- copy or link the Tools/sleep program
    into a directory in your path, like ${HOME}/bin.

2.- check the right path for the real sleep program,
    now it says

       SLEEP=/bin/sleep

    but in your system could be different

3.- compile like this

      NOSLEEP=1 make
      NOSLEEP=1 make check-python-test-suite

    or

      export NOSLEEP=1
      make
      make check-python-test-suite

    just rembember to unset NOSLEEP if you are
    not using it anymore.

I don't see any problem in the compilation
if sleep is deactivated. But if in your
system/platform the compilation fails,
just don't set NOSLEEP, and the compilation
will go back to sleep as usual again.


This is just a work around until the the 'sleep 3'
problem is further analized.

Marcelo


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-11 00:14:57 +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
Logan Johnson
c15ba7905c *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5529 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-10 14:28:29 +00:00
Marcelo Matus
9bc97cf587 minor clean up
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5528 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 23:57:53 +00:00