Fri, 28 May 2010 02:19:34 +0100
LValueFromValue handles undefined and objects/arrays
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Fri May 28 02:18:53 2010 +0100 +++ b/lvm.js Fri May 28 02:19:34 2010 +0100 @@ -91,7 +91,11 @@ return new LValueFromFunction(value); case "object": if(value == null) - return new LValue("nil", value); + return new LValue("nil", null); + else + return new LValue("table", value); + case "undefined": + return new LValue("nil", null); default: sys.puts( "Not able to convert type " + typeof(value)+" from Javascript to Lua: "+sys.inspect(value));