Fixed [ 812528 ] externs not correct when throw is in signature.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
310cf74273
commit
7d8b4ba3b6
1 changed files with 15 additions and 1 deletions
|
|
@ -774,7 +774,21 @@ int Language::cDeclaration(Node *n) {
|
||||||
if (!NoExtern) {
|
if (!NoExtern) {
|
||||||
if (f_header) {
|
if (f_header) {
|
||||||
if ((Cmp(storage,"extern") == 0) || (ForceExtern && !storage)) {
|
if ((Cmp(storage,"extern") == 0) || (ForceExtern && !storage)) {
|
||||||
Printf(f_header,"extern %s;\n", SwigType_str(ty,name));
|
Printf(f_header,"extern %s", SwigType_str(ty,name));
|
||||||
|
|
||||||
|
{
|
||||||
|
DOH *t = Getattr(n,"throws");
|
||||||
|
if (t) {
|
||||||
|
Printf(f_header,"throw(");
|
||||||
|
while (t) {
|
||||||
|
Printf(f_header,"%s", Getattr(t,"type"));
|
||||||
|
t = nextSibling(t);
|
||||||
|
if (t) Printf(f_header,",");
|
||||||
|
}
|
||||||
|
Printf(f_header,")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Printf(f_header,";\n");
|
||||||
} else if (Cmp(storage,"externc") == 0) {
|
} else if (Cmp(storage,"externc") == 0) {
|
||||||
Printf(f_header,"extern \"C\" %s;\n", SwigType_str(ty,name));
|
Printf(f_header,"extern \"C\" %s;\n", SwigType_str(ty,name));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue