Xanathar 11 years ago
parent
commit
43ab63fd7e

+ 5 - 3
src/MoonSharp.Interpreter/DataTypes/Table.cs

@@ -57,14 +57,16 @@ namespace MoonSharp.Interpreter
 		}
 
 		/// <summary>
-		/// Gets or sets the <see cref="System.Object"/> with the specified key(s).
+		/// Gets or sets the 
+		/// <see cref="System.Object" /> with the specified key(s).
 		/// This will marshall CLR and MoonSharp objects in the best possible way.
 		/// Multiple keys can be used to access subtables.
 		/// </summary>
 		/// <value>
-		/// The <see cref="System.Object"/>.
+		/// The <see cref="System.Object" />.
 		/// </value>
 		/// <param name="key">The key.</param>
+		/// <param name="subkeys">Optional subkeys to access subtables</param>
 		/// <returns></returns>
 		public object this[object key, params object[] subkeys]
 		{
@@ -75,7 +77,7 @@ namespace MoonSharp.Interpreter
 			}
 
 			set
-			{
+			{ 
 				Table t = ResolveMultipleKeys(ref key, subkeys);
 				t.SetAsObject(key, value);
 			}

+ 1 - 1
src/MoonSharp.Interpreter/Script.cs

@@ -26,7 +26,7 @@ namespace MoonSharp.Interpreter
 		/// <summary>
 		/// The version of the MoonSharp engine
 		/// </summary>
-		public const string VERSION = "0.8.0.0";
+		public const string VERSION = "0.8.1.0";
 
 		/// <summary>
 		/// The Lua version being supported

+ 0 - 3
src/PerformanceComparison/CoroutineTest.cs

@@ -35,9 +35,6 @@ namespace PerformanceComparison
 				DynValue x = coroutine.Coroutine.Resume();
 				Console.WriteLine("{0}", x);
 			}
-
-
-			Console.ReadKey();
 		}
 
 

+ 11 - 11
src/PerformanceComparison/Program.cs

@@ -93,23 +93,23 @@ end
 
 		public static DynValue Check(ScriptExecutionContext executionContext, CallbackArguments values)
 		{
-			foreach (var val in values.GetArray())
-			{
-				g_MoonSharpStr.Append(val.ToPrintString());
-			}
+			//foreach (var val in values.GetArray())
+			//{
+			//	g_MoonSharpStr.Append(val.ToPrintString());
+			//}
 
-			g_MoonSharpStr.AppendLine();
+			//g_MoonSharpStr.AppendLine();
 			return DynValue.Nil;
 		}
 
 
 		public static void NCheck(params object[] values)
 		{
-			foreach (var val in values)
-			{
-				g_NLuaStr.Append(val.ToString());
-			}
-			g_NLuaStr.AppendLine();
+			//foreach (var val in values)
+			//{
+			//	g_NLuaStr.Append(val.ToString());
+			//}
+			//g_NLuaStr.AppendLine();
 		}
 
 		public static void XCheck(int from, string mid, int to)
@@ -162,7 +162,7 @@ end
 			Console.WriteLine("MoonSharp : {0} ms", sw.ElapsedMilliseconds);
 
 
-			lua.RegisterFunction("print", typeof(Program).GetMethod("NPrint"));
+			lua.RegisterFunction("check", typeof(Program).GetMethod("NCheck"));
 
 			File.WriteAllText(@"c:\temp\hanoi.lua", scriptText);