Fixed [ 812528 ] externs not correct when throw is in signature.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-09-26 20:37:30 +00:00
commit 138ffca579

View file

@ -774,7 +774,21 @@ int Language::cDeclaration(Node *n) {
if (!NoExtern) {
if (f_header) {
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) {
Printf(f_header,"extern \"C\" %s;\n", SwigType_str(ty,name));
}