emitting and testing protected methods for director protected members

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2003-12-09 10:38:34 +00:00
commit ae75ec65dd
3 changed files with 45 additions and 24 deletions

View file

@ -588,13 +588,17 @@ public:
String *temp = NewString("");
switch (current) {
case MEMBER_FUNC:
if (multipleInheritance) {
Printv(klass->init, tab4, "rb_define_method(", klass->mImpl, ", \"",
iname, "\", ", wname, ", -1);\n", NIL);
case MEMBER_FUNC:
if (multipleInheritance) {
const char* rb_define_method = !is_protected(n) ?
"rb_define_method" : "rb_define_protected_method";
Printv(klass->init, tab4, rb_define_method,"(", klass->mImpl, ", \"",
iname, "\", ", wname, ", -1);\n", NIL);
} else {
Printv(klass->init, tab4, "rb_define_method(", klass->vname, ", \"",
iname, "\", ", wname, ", -1);\n", NIL);
const char* rb_define_method = !is_protected(n) ?
"rb_define_method" : "rb_define_protected_method";
Printv(klass->init, tab4, rb_define_method, "(", klass->vname, ", \"",
iname, "\", ", wname, ", -1);\n", NIL);
}
break;
case CONSTRUCTOR_ALLOCATE: