don't add forward class to the classes hash. We needed this before for naturalvar, but is not needed anymore. Now produce seg faults when a forward class statement is found after a class declaration. Reported by Evan Weis
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8638 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
829cd3a908
commit
2aa0e23287
1 changed files with 0 additions and 9 deletions
|
|
@ -3448,21 +3448,12 @@ cpp_forward_class_decl : storage_class cpptype idcolon SEMI {
|
||||||
/* Ignore */
|
/* Ignore */
|
||||||
$$ = 0;
|
$$ = 0;
|
||||||
} else {
|
} else {
|
||||||
String *scpname = Swig_symbol_qualifiedscopename(0);
|
|
||||||
$$ = new_node("classforward");
|
$$ = new_node("classforward");
|
||||||
Setfile($$,cparse_file);
|
Setfile($$,cparse_file);
|
||||||
Setline($$,cparse_line);
|
Setline($$,cparse_line);
|
||||||
Setattr($$,k_kind,$2);
|
Setattr($$,k_kind,$2);
|
||||||
Setattr($$,k_name,$3);
|
Setattr($$,k_name,$3);
|
||||||
Setattr($$,k_symweak, "1");
|
Setattr($$,k_symweak, "1");
|
||||||
if (!classes) classes = NewHash();
|
|
||||||
if (scpname && Len(scpname)) {
|
|
||||||
String *fname = NewStringf("%s::%s",scpname,$3);
|
|
||||||
Setattr(classes,fname,$$);
|
|
||||||
Delete(fname);
|
|
||||||
} else {
|
|
||||||
Setattr(classes,$3,$$);
|
|
||||||
}
|
|
||||||
add_symbols($$);
|
add_symbols($$);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue