static int LogWarning(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); object arg0 = ToLua.ToVarObject(L, 1); CLuaFunction.LogWarning(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int DeleteFile(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); CLuaFunction.DeleteFile(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CreateDirectory(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); CLuaFunction.CreateDirectory(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int LoadXmlForText(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); string o = CLuaFunction.LoadXmlForText(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CreateByteArr(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); byte[] o = CLuaFunction.CreateByteArr(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ConvertStrToInt10(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); int o = CLuaFunction.ConvertStrToInt10(arg0); LuaDLL.lua_pushinteger(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int ConvertBytesToString(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); byte[] arg0 = ToLua.CheckByteBuffer(L, 1); string o = CLuaFunction.ConvertBytesToString(arg0); LuaDLL.lua_pushstring(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int WriteBytesByFileStream(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); string arg0 = ToLua.CheckString(L, 1); byte[] arg1 = ToLua.CheckByteBuffer(L, 2); CLuaFunction.WriteBytesByFileStream(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int WriteAllText(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); CLuaFunction.WriteAllText(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int FileExists(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); bool o = CLuaFunction.FileExists(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CreateFileStream(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); string arg0 = ToLua.CheckString(L, 1); int arg1 = (int)LuaDLL.luaL_checknumber(L, 2); int arg2 = (int)LuaDLL.luaL_checknumber(L, 3); System.IO.FileStream o = CLuaFunction.CreateFileStream(arg0, arg1, arg2); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateCLuaFunction(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { CLuaFunction obj = new CLuaFunction(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: CLuaFunction.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }