Commit graph

507 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
William S Fulton
a4f5f79349 Multiple inheritance workarounds for C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5503 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-08 21:31:05 +00:00
Marcelo Matus
7bbbe3b274 Moving the director protected member support to the top level. Now it should works in all the languages. Test it.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5498 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-07 23:00:02 +00:00
Marcelo Matus
c3d8839dcb Moved director+protected members test to BROKEN
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5497 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-07 04:07:46 +00:00
William S Fulton
5dfe42a6bc Added STRING_OUT typemap test.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-06 23:03:30 +00:00
Art Yerkes
dc9314406f String from ptr example. Demonstrates use of out typemap and handling of
return value with argout.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5490 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-05 22:59:42 +00:00
Art Yerkes
dc36dabaea Added string-from-ptr example.
-- Response to a question asked by Thaddeus L. Olczyk


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5489 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-05 22:58:56 +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
e6c59f1b0f Fixed configure bug
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-04 19:15:07 +00:00
Art Yerkes
50ade4b291 Added checklist entry and corrected warning.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5479 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-04 06:59:49 +00:00
Art Yerkes
87f4bcef2e This example both shows the new enum literal facility, and is a regression
test against the enum scoping problem I had.

Ocaml.cxx: Accidentally reintroduced the enum scoping problem, so I added
an example that will fail if this is ever broken again.

I encountered the actual problem in avifile.h


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5478 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-04 06:57:57 +00:00
Art Yerkes
fbb9c8481d shapes example: slight correction to depth map.
makedebugtop: include swig.cmo
Lib: factored out more common code, slightly reorganized class type.
     added director define and exceptions.
     std_string: length from the original ocaml string (no longer depends on
      null termination)
     ocamldec.swg/ocaml.swg: added caml_string_len
Examples/Makefile.in: quiet about checking out files.
Ocaml.cxx:
     Fixed abstract director test case.
     Include/exclude director.swg based on directors being enabled.
Final edits for 1.3.20, barring bugs being discovered.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-04 06:15:07 +00:00
Dave Beazley
45c674ab50 mzscheme tweaks.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-03 20:29:30 +00:00
Dave Beazley
c9ee8a19d5 Added OS X tweaks for guile. Note: some guile examples don't use this makefile and remain broken.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5472 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-03 18:10:45 +00:00
William S Fulton
84a7c18d60 Added test for javacode typemap for a templated class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5464 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 22:18:09 +00:00
William S Fulton
ec10b12a9a Added test for arrays of C structs (not typedef'd)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5463 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 22:17:44 +00:00
Dave Beazley
10b8703527 Consolidated some of the C test cases.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5456 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 18:37:42 +00:00
Logan Johnson
234bb62536 Suppress warning about multiple inheritance for Ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5454 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-01 23:11:46 +00:00
Dave Beazley
5572880cf5 Warning messages.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5453 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-01 13:38:08 +00:00
Dave Beazley
307cc5ea90 new example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5444 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-30 18:51:05 +00:00
William S Fulton
313501d146 test non-public destructors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5443 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-29 00:31:24 +00:00
William S Fulton
d08fbeab71 Added a protected destructor in derived class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5442 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-29 00:29:54 +00:00
Dave Beazley
dc3fa7ee39 new example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5435 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-28 20:38:59 +00:00
Dave Beazley
f5ea428d8d *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5427 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-27 16:54:26 +00:00
Dave Beazley
c76b6ec747 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-26 20:57:53 +00:00