minor fix for extern declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4960d9dcf8
commit
db4de01921
1 changed files with 8 additions and 2 deletions
|
|
@ -816,8 +816,13 @@ 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", SwigType_str(ty,name));
|
/* we don't need the 'extern' part in the C/C++ declaration,
|
||||||
|
and it produces some problems when namespace and SUN
|
||||||
|
Studio is used.
|
||||||
|
|
||||||
|
Printf(f_header,"extern %s", SwigType_str(ty,name));
|
||||||
|
*/
|
||||||
|
Printf(f_header,"%s", SwigType_str(ty,name));
|
||||||
{
|
{
|
||||||
DOH *t = Getattr(n,"throws");
|
DOH *t = Getattr(n,"throws");
|
||||||
if (t) {
|
if (t) {
|
||||||
|
|
@ -832,7 +837,8 @@ int Language::cDeclaration(Node *n) {
|
||||||
}
|
}
|
||||||
Printf(f_header,";\n");
|
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));
|
/* here 'extern "C"' is needed */
|
||||||
|
Printf(f_header, "extern \"C\" %s;\n", SwigType_str(ty,name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue