Skip to content

Commit

Permalink
更新tolua#到1.0.7.327版
Browse files Browse the repository at this point in the history
  • Loading branch information
jarjin2000 committed Jul 6, 2017
1 parent 9161fe2 commit 9d88db3
Show file tree
Hide file tree
Showing 30 changed files with 547 additions and 513 deletions.
12 changes: 6 additions & 6 deletions Assets/LuaFramework/ToLua/BaseType/System_ArrayWrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ static int get_LongLength(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index LongLength on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index LongLength on a nil value");
}
}

Expand All @@ -1366,7 +1366,7 @@ static int get_Rank(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Rank on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Rank on a nil value");
}
}

Expand All @@ -1385,7 +1385,7 @@ static int get_IsSynchronized(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index IsSynchronized on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsSynchronized on a nil value");
}
}

Expand All @@ -1404,7 +1404,7 @@ static int get_SyncRoot(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index SyncRoot on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index SyncRoot on a nil value");
}
}

Expand All @@ -1423,7 +1423,7 @@ static int get_IsFixedSize(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index IsFixedSize on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsFixedSize on a nil value");
}
}

Expand All @@ -1442,7 +1442,7 @@ static int get_IsReadOnly(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index IsReadOnly on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index IsReadOnly on a nil value");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static int get_Count(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
}
}

Expand All @@ -374,7 +374,7 @@ static int get_Comparer(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Comparer on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Comparer on a nil value");
}
}

Expand All @@ -392,7 +392,7 @@ static int get_Keys(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Keys on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Keys on a nil value");
}
}

Expand All @@ -410,7 +410,7 @@ static int get_Values(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Values on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Values on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int get_Count(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int get_Count(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static int get_Key(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Key on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Key on a nil value");
}
}

Expand All @@ -45,7 +45,7 @@ static int get_Value(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Value on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Value on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,21 +232,9 @@ static int Exists(IntPtr L)
try
{
ToLua.CheckArgsCount(L, 2);
Type argType = null;
Delegate arg0 = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
bool o = (bool)LuaMethodCache.CallMethod("Exists", obj, arg0);
LuaDLL.lua_pushboolean(L, o);
return 1;
Expand All @@ -263,21 +251,9 @@ static int Find(IntPtr L)
try
{
ToLua.CheckArgsCount(L, 2);
Type argType = null;
Delegate arg0 = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
object o = LuaMethodCache.CallMethod("Find", obj, arg0);
ToLua.Push(L, o);
return 1;
Expand All @@ -294,21 +270,9 @@ static int FindAll(IntPtr L)
try
{
ToLua.CheckArgsCount(L, 2);
Type argType = null;
Delegate arg0 = null;
Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
object o = LuaMethodCache.CallMethod("FindAll", obj, arg0);
ToLua.Push(L, o);
return 1;
Expand All @@ -329,25 +293,25 @@ static int FindIndex(IntPtr L)
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);

if (count == 2)
{
Delegate arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
{
Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
int o = (int)LuaMethodCache.CallMethod("FindIndex", obj, arg0);
LuaDLL.lua_pushinteger(L, o);
return 1;
}
else if (count == 3)
{
int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
Delegate arg1 = (Delegate)ToLua.CheckObject(L, 3, typeof(System.Predicate<>).MakeGenericType(argType));
Delegate arg1 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 3);
int o = (int)LuaMethodCache.CallMethod("FindIndex", obj, arg0, arg1);
LuaDLL.lua_pushinteger(L, o);
return 1;
}
else if (count == 4)
{
int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
Delegate arg2 = (Delegate)ToLua.CheckObject(L, 4, typeof(System.Predicate<>).MakeGenericType(argType));
int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
Delegate arg2 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 4);
int o = (int)LuaMethodCache.CallMethod("FindIndex", obj, arg0, arg1, arg2);
LuaDLL.lua_pushinteger(L, o);
return 1;
Expand All @@ -369,21 +333,9 @@ static int FindLast(IntPtr L)
try
{
ToLua.CheckArgsCount(L, 2);
Type argType = null;
Delegate arg0 = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
object o = LuaMethodCache.CallSingleMethod("FindLast", obj, arg0);
ToLua.Push(L, o);
return 1;
Expand Down Expand Up @@ -446,19 +398,7 @@ static int ForEach(IntPtr L)
ToLua.CheckArgsCount(L, 2);
Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = null;
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Action<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Action<>).MakeGenericType(argType), func);
}

Delegate arg0 = ToLua.CheckDelegate(typeof(System.Action<>).MakeGenericType(argType), L, 2);
LuaMethodCache.CallSingleMethod("ForEach", obj, arg0);
return 0;
}
Expand Down Expand Up @@ -657,19 +597,7 @@ static int RemoveAll(IntPtr L)
ToLua.CheckArgsCount(L, 2);
Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = null;
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
int o = (int)LuaMethodCache.CallSingleMethod("RemoveAll", obj, arg0);
LuaDLL.lua_pushinteger(L, o);
return 1;
Expand Down Expand Up @@ -833,19 +761,7 @@ static int TrueForAll(IntPtr L)
ToLua.CheckArgsCount(L, 2);
Type argType = null;
object obj = ToLua.CheckGenericObject(L, 1, typeof(List<>), out argType);
Delegate arg0 = null;
LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

if (funcType2 != LuaTypes.LUA_TFUNCTION)
{
arg0 = (Delegate)ToLua.CheckObject(L, 2, typeof(System.Predicate<>).MakeGenericType(argType));
}
else
{
LuaFunction func = ToLua.ToLuaFunction(L, 2);
arg0 = DelegateFactory.CreateDelegate(typeof(System.Predicate<>).MakeGenericType(argType), func);
}

Delegate arg0 = ToLua.CheckDelegate(typeof(System.Predicate<>).MakeGenericType(argType), L, 2);
bool o = (bool)LuaMethodCache.CallSingleMethod("TrueForAll", obj, arg0);
LuaDLL.lua_pushboolean(L, o);
return 1;
Expand Down Expand Up @@ -907,7 +823,7 @@ static int get_Capacity(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Capacity on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Capacity on a nil value");
}
}

Expand All @@ -925,7 +841,7 @@ static int get_Count(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
}
}

Expand All @@ -943,7 +859,7 @@ static int set_Capacity(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Capacity on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Capacity on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int get_Current(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Current on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Current on a nil value");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int get_Count(IntPtr L)
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Count on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Count on a nil value");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/LuaFramework/ToLua/BaseType/System_DelegateWrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static int get_Method(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Method on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Method on a nil value");
}
}

Expand All @@ -464,7 +464,7 @@ static int get_Target(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Target on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Target on a nil value");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/LuaFramework/ToLua/BaseType/System_StringWrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ static int get_Length(IntPtr L)
}
catch(Exception e)
{
return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Length on a nil value" : e.Message);
return LuaDLL.toluaL_exception(L, e, o, "attempt to index Length on a nil value");
}
}
}
Expand Down
Loading

0 comments on commit 9d88db3

Please sign in to comment.