remove SWIG_exception for director protected methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
409dff398b
commit
71e1ac56cc
2 changed files with 2 additions and 8 deletions
|
|
@ -376,9 +376,6 @@ void emit_action(Node *n, Wrapper *f) {
|
|||
String* dirdecl = NewStringf("%s *darg = 0", dirname);
|
||||
Wrapper_add_local(f, "darg", dirdecl);
|
||||
Printf(f->code, "darg = dynamic_cast<%s *>(arg1);\n",dirname);
|
||||
Printf(f->code, "if (!darg) SWIG_exception(SWIG_RuntimeError,"
|
||||
"\"accessing protected member %s in %s\");\n",
|
||||
Getattr(n,"name"), symname);
|
||||
Replace(action, "arg1", "darg", DOH_REPLACE_FIRST);
|
||||
Delete(dirname);
|
||||
Delete(dirdecl);
|
||||
|
|
|
|||
|
|
@ -729,12 +729,9 @@ public:
|
|||
Wrapper_add_local(f, "director", "Swig::Director *director = 0");
|
||||
Printf(f->code, "director = dynamic_cast<Swig::Director *>(arg1);\n");
|
||||
if (dirprot_mode() && is_protected(n)) {
|
||||
Printf(f->code, "if (director && !(director->swig_get_inner(\"%s\"))) ", name);
|
||||
Printf(f->code,
|
||||
"SWIG_exception(SWIG_RuntimeError,\"accessing protected member %s\");\n",
|
||||
name);
|
||||
Printf(f->code, "if (!director || !(director->swig_get_inner(\"%s\"))) ", name);
|
||||
Printf(f->code, "SWIG_exception(SWIG_RuntimeError,\"accessing protected member %s\");\n", name);
|
||||
}
|
||||
|
||||
Printf(f->code, "if (director && (director->swig_get_self()==obj0)) director->swig_set_up();\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue