Exemple #1
0
 static void popResults(int a, int c, LuaVM vm)
 {
     if (c == 1)
     {
         // no results
     }
     else if (c > 1)
     {
         for (int i = a + c - 2; i >= a; i--)
         {
             vm.Replace(i);
         }
     }
     else
     {
         // leave results on stack
         vm.CheckStack(1);
         vm.PushInteger(a);
     }
 }
Exemple #2
0
 static void _popResults(int a, int c, ref LuaVM vm)
 {
     if (c == 1)
     {
         // no results
     }
     else if (c > 1)
     {
         for (var i = a + c - 2; i >= a; i--)
         {
             vm.Replace(i);
         }
     }
     else
     {
         // leave results on stack
         vm.CheckStack(1);
         vm.PushInteger(Convert.ToInt64(a));
     }
 }