diff options
| author | Oliver Buchtala <oliver.buchtala@googlemail.com> | 2013-09-24 03:55:10 +0200 |
|---|---|---|
| committer | Oliver Buchtala <oliver.buchtala@googlemail.com> | 2013-09-24 03:55:10 +0200 |
| commit | dc62a69775f7eff6a11e7ca7f162ae960b53e671 (patch) | |
| tree | fd96624fa1528fd0e9ccf09afab6f917899ede8c /Source/Modules/javascript.cxx | |
| parent | 2efe63ebb2c87e2e8cde445ffdf964f6cc38869e (diff) | |
| download | swig-dc62a69775f7eff6a11e7ca7f162ae960b53e671.tar.gz | |
Fix bug with typedefd function pointers.
Diffstat (limited to 'Source/Modules/javascript.cxx')
| -rw-r--r-- | Source/Modules/javascript.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index 05912a69e..8a77a0b48 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -664,7 +664,12 @@ int JSEmitter::emitWrapperFunction(Node *n) { String *kind = Getattr(n, "kind"); if (kind) { - if (Cmp(kind, "function") == 0) { + + if (Equal(kind, "function") + // HACK: sneaky.ctest revealed that typedef'd (global) functions must be + // detected via the 'view' attribute. + || (Equal(kind, "variable") && Equal(Getattr(n, "view"), "globalfunctionHandler")) + ) { bool is_member = GetFlag(n, "ismember") | GetFlag(n, "feature:extend"); bool is_static = GetFlag(state.function(), IS_STATIC); ret = emitFunction(n, is_member, is_static); |
