LValueFromValue handles undefined and objects/arrays

Fri, 28 May 2010 02:19:34 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 28 May 2010 02:19:34 +0100
changeset 50
4612c85cdc01
parent 49
052bd6e8daf6
child 51
b429e7a73de7

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));

mercurial