Preserve thread_local for brace-enclosed extern "C"
This commit is contained in:
parent
2ecc5bc214
commit
14c0942505
1 changed files with 10 additions and 3 deletions
|
|
@ -3133,15 +3133,22 @@ c_declaration : c_decl {
|
|||
Setattr($$,"name",$2);
|
||||
appendChild($$,n);
|
||||
while (n) {
|
||||
if (!Equal(Getattr(n, "storage"), "typedef")) {
|
||||
String *s = Getattr(n, "storage");
|
||||
if (s) {
|
||||
if (Strstr(s, "thread_local")) {
|
||||
Insert(s,0,"externc ");
|
||||
} else if (!Equal(s, "typedef")) {
|
||||
Setattr(n,"storage","externc");
|
||||
}
|
||||
} else {
|
||||
Setattr(n,"storage","externc");
|
||||
}
|
||||
n = nextSibling(n);
|
||||
}
|
||||
} else {
|
||||
if (!Equal($2,"C++")) {
|
||||
if (!Equal($2,"C++")) {
|
||||
Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", $2);
|
||||
}
|
||||
}
|
||||
$$ = new_node("extern");
|
||||
Setattr($$,"name",$2);
|
||||
appendChild($$,firstChild($5));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue