Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/nx/script/VM.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1913,6 +1913,17 @@ class VM {
case VNativeObject(_): NxProxy.wrapInstanceValue(value, this); // bind callbacks on native-backed script instances
default: null;
}
case VDict(map):
var obj:Dynamic = {};
for (k in map.keys())
Reflection.setField(obj, k, valueToHaxe(map.get(k)));
obj;
case VFunction(funcChunk, closure):
// Haxe will call this with whatever args the native passes
Reflect.makeVarArgs((args:Array<Dynamic>) -> {
var scriptArgs = [for (a in args) haxeToValue(a)];
return valueToHaxe(callFunction(funcChunk, closure, scriptArgs));
});
default: null;
}
}
Expand Down
Loading