fix for #1205859
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7307 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0bf296c7ad
commit
f5bcace78c
1 changed files with 4 additions and 4 deletions
|
|
@ -823,17 +823,17 @@ int Language::cDeclaration(Node *n) {
|
|||
int extern_c = Cmp(storage,"externc") == 0;
|
||||
int need_extern = CPlusPlus ? extern_c : 1;
|
||||
if (!NoExtern && need_extern) {
|
||||
String *str = SwigType_str(ty,name);
|
||||
if ((storage && Strstr(storage,"extern")) || (ForceExtern && !storage)) {
|
||||
String *str = SwigType_str(ty,name);
|
||||
Printf(f_header,"extern ", str);
|
||||
if (extern_c) {
|
||||
/* here 'extern "C"' is needed */
|
||||
Printf(f_header, "\"C\" ");
|
||||
}
|
||||
Printf(f_header,"%s", str);
|
||||
Delete(str);
|
||||
Printf(f_header,";\n");
|
||||
}
|
||||
Printf(f_header,"%s", str);
|
||||
Delete(str);
|
||||
Printf(f_header,";\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue