Fix bug with typedefd function pointers.
This commit is contained in:
parent
2efe63ebb2
commit
dc62a69775
1 changed files with 6 additions and 1 deletions
|
|
@ -664,7 +664,12 @@ int JSEmitter::emitWrapperFunction(Node *n) {
|
||||||
String *kind = Getattr(n, "kind");
|
String *kind = Getattr(n, "kind");
|
||||||
|
|
||||||
if (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_member = GetFlag(n, "ismember") | GetFlag(n, "feature:extend");
|
||||||
bool is_static = GetFlag(state.function(), IS_STATIC);
|
bool is_static = GetFlag(state.function(), IS_STATIC);
|
||||||
ret = emitFunction(n, is_member, is_static);
|
ret = emitFunction(n, is_member, is_static);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue