fixed %template declared within class, next to template declaration
added a few tests for C# nested classes support
This commit is contained in:
parent
0cf116128b
commit
865408874f
6 changed files with 172 additions and 1 deletions
|
|
@ -146,6 +146,10 @@ static Node *copy_node(Node *n) {
|
|||
Delete(pl);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(ckey,"nested:outer") == 0) { /* don't copy outer classes links, they will be updated later */
|
||||
Setattr(nn, key, k.item);
|
||||
continue;
|
||||
}
|
||||
/* Looks okay. Just copy the data using Copy */
|
||||
ci = Copy(k.item);
|
||||
Setattr(nn, key, ci);
|
||||
|
|
@ -2662,7 +2666,7 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
|
|||
}
|
||||
|
||||
templnode = copy_node(nn);
|
||||
update_nested_classes(templnode);
|
||||
update_nested_classes(templnode); /* update classes nested withing template */
|
||||
/* We need to set the node name based on name used to instantiate */
|
||||
Setattr(templnode,"name",tname);
|
||||
Delete(tname);
|
||||
|
|
@ -2698,7 +2702,10 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
|
|||
Delete(temparms);
|
||||
if (currentOuterClass) {
|
||||
SetFlag(templnode, "nested");
|
||||
Setattr(templnode, "nested:outer", currentOuterClass);
|
||||
}
|
||||
else
|
||||
Delattr(templnode, "nested:outer");
|
||||
|
||||
add_symbols_copy(templnode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue