more fixes for exceptions and ref.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5943 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d6de9a311f
commit
2febdc6ecb
2 changed files with 5 additions and 2 deletions
|
|
@ -364,8 +364,11 @@ class Allocate : public Dispatcher {
|
|||
|
||||
void mark_exception_classes(ParmList *p) {
|
||||
while(p) {
|
||||
SwigType *ty = Getattr(p,"type");
|
||||
SwigType *ty = Getattr(p,"type");
|
||||
SwigType *t = SwigType_typedef_resolve_all(ty);
|
||||
if (SwigType_isreference(t) || SwigType_ispointer(t) || SwigType_isarray(t)) {
|
||||
Delete(SwigType_pop(t));
|
||||
}
|
||||
Node *c = Swig_symbol_clookup(t,0);
|
||||
if (c) {
|
||||
Setattr(c,"cplus:exceptionclass","1");
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ void emit_action(Node *n, Wrapper *f) {
|
|||
if (em) {
|
||||
SwigType *et = Getattr(ep,"type");
|
||||
SwigType *etr = SwigType_typedef_resolve_all(et);
|
||||
if (SwigType_isreference(etr) || SwigType_ispointer(etr)) {
|
||||
if (SwigType_isreference(etr) || SwigType_ispointer(etr) || SwigType_isarray(etr)) {
|
||||
Printf(eaction,"catch(%s) {\n", SwigType_str(et, "_e"));
|
||||
} else {
|
||||
Printf(eaction,"catch(%s) {\n", SwigType_str(et, "&_e"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue