Fix %import and %fragment forced inclusion to not generate code.
This commit is contained in:
parent
857a62425c
commit
57a89f987d
8 changed files with 186 additions and 7 deletions
|
|
@ -462,10 +462,10 @@ int JAVASCRIPT::fragmentDirective(Node *n) {
|
|||
// and register them at the emitter.
|
||||
String *section = Getattr(n, "section");
|
||||
|
||||
if (Equal(section, "templates")) {
|
||||
if (Equal(section, "templates") && !ImportMode) {
|
||||
emitter->registerTemplate(Getattr(n, "value"), Getattr(n, "code"));
|
||||
} else {
|
||||
Swig_fragment_register(n);
|
||||
return Language::fragmentDirective(n);
|
||||
}
|
||||
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue