%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/SWIG@5530 626c5289-ae23-0410-ae9c-e8d60b6d4f22
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/SWIG@5516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Guys..... please be careful when committing. I added this patch a couple of days
ago and now it's suddenly gone. What's the deal? Did someone commit an old version
of lang.cxx on top of this patch?
-- Dave
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5488 626c5289-ae23-0410-ae9c-e8d60b6d4f22
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/SWIG@5478 626c5289-ae23-0410-ae9c-e8d60b6d4f22
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/SWIG@5477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
"classtypeobj"
This is the raw, SWIG type-system representation of the class type. This
should be used in all typemap lookups and operations involving the class name.
Note: There is inconsistent use of the "classtype" attribute across language modules--
especially in code related to directors. To avoid breaking the universe, I have
decided to store the correct type encoding as "classtypeobj" instead of replacing
"classtype". As modules are checked they can elect to use "classtype" or "classtypeobj"
as appropriate.
Note: William, you should use "classtypeobj" to fix the typemap problem (probably).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5457 626c5289-ae23-0410-ae9c-e8d60b6d4f22
William Fulton and Dave were talking about regarding the template parameters
and (), and this solved a bunch of wierd little problems I was having.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5455 626c5289-ae23-0410-ae9c-e8d60b6d4f22
#849064 fixed. Any classes with a non public destructor now have a public delete() method which throw a runtime exception. The delete() method was previously protected.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5439 626c5289-ae23-0410-ae9c-e8d60b6d4f22
- Better parsing support. Contract sections are no longer hard-coded. New
types of contracts can be added merely be adding an entry to a table.
- Fixed argument naming problems with inheritance. For example, if someone
specified a contract for a base class and a contract for a derived
class method, but they didn't use the same argument names in the
contracts.
- Fixed contracts for static member functions.
- Reduced the amount of generated code--especially for inheritance.
- Changed error messages to indicate inheritance hierarchy.
- Fixed problems with duplicate contract checking code being
emitted.
- Reorganized code that collects contracts and deals with inheritance
to be more generic---no hardcoded contract names or types.
- Reorganized process by which contracts is collected.
- Eliminated unimplemented features for release.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5320 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Added special variable $action to python code fragments included with feature:shadow.
This expands to the name of the low-level C wrapper function.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5306 626c5289-ae23-0410-ae9c-e8d60b6d4f22