Commit graph

4,854 commits

Author SHA1 Message Date
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
Marcelo Matus
2be2c1b02c added the using_pointers test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5527 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 23:48:54 +00:00
Marcelo Matus
35ab21edbb fixed the problem with 'using' and protected mebers. now it seems to be safe to generate the protected members as protected again. all the test are running and the director_protected_runme.rb now test for the right access control
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5526 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 23:46:39 +00:00
Marcelo Matus
3a2ad32d92 promote the 'using' methods to public. Also, fix a sef. fault for using with pointers, see using_pointers.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 23:24:37 +00:00
William S Fulton
6acb22fbfc Marcelo's suggestion for fixing polymorphic methods that return a polymorphic type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 22:13:31 +00:00
William S Fulton
e0f9276dc8 fix uninstall - runtime libraries not installed now.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5523 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 22:06:58 +00:00
William S Fulton
f0efb84549 pesky warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5522 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 22:06:14 +00:00
William S Fulton
a6f5837d17 Corrected SWIG_JavaThrowException to be static
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5521 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 21:54:59 +00:00
Dave Beazley
2327cddea4 PHP OS-X Changes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5520 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 18:53:52 +00:00
Dave Beazley
1077f7a3c0 PHP OS X changes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5519 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 18:53:39 +00:00
Logan Johnson
9905ae7733 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 18:49:26 +00:00
Logan Johnson
e129a25a66 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5517 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 18:39:19 +00:00
Logan Johnson
b8069b70f2 Fixed RUBY::create_command() so that we never define an instance method
by calling rb_define_protected_method(), even if the corresponding C++
member function is declared protected. The "protected" access modifier
has different interpretations in C++ and Ruby, and this was causing the
using_protected runtime test for Ruby to break.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 18:11:26 +00:00
Dave Beazley
f92e4b1c6c Added test case just to check a few things with protected/private virtual methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5515 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 17:50:29 +00:00
Sam Liddicott
86ee04e48d Add patch from Blair Zajac to use php-config where available to find php include directories.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5514 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 13:13:42 +00:00
Dave Beazley
c3a422cead *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5513 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 12:44:49 +00:00
Marcelo Matus
6b6b041b64 emitting and testing protected methods for director protected members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 10:38:34 +00:00
Marcelo Matus
8199b93d1d detecting polymorphic virtual methods properly
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5511 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 10:36:15 +00:00
Marcelo Matus
86edc68494 The dirprot feature is now disabled by default. Added dirprot option and ruby runtime examples.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 02:52:08 +00:00
Art Yerkes
d25b087a5a value_wrapper -> valuewrapper. My test suite depends on the module name
matching the file name.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5509 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 02:06:57 +00:00
Marcelo Matus
23fcdecaf7 setting the dirprot support to 0 in the meantime, can be set back with -dirprot
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5508 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-08 23:42:37 +00:00
Marcelo Matus
80baf404c3 fix problem with protected members, and add some of them to the test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5507 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-08 22:50:46 +00:00
Marcelo Matus
7ea7abf7ff preventing generation of director protected members for languages with no director support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-08 22:21:11 +00:00