/// <summary> /// /// </summary> /// <param name="chunk"></param> /// <param name="name"></param> /// <returns></returns> public LuaFunction LoadString(string chunk, string name) { int oldTop = LuaDLL.lua_gettop(luaState); executing = true; try { if (LuaDLL.luaL_loadbuffer(luaState, chunk, name) != 0) { ThrowExceptionFromError(oldTop); } } finally { executing = false; } LuaFunction result = translator.getFunction(luaState, -1); translator.popValues(luaState, oldTop); return(result); }
public object extractGenerated(IntPtr luaState, int stackPos) { return(CodeGeneration.Instance.GetDelegate(delegateType, translator.getFunction(luaState, stackPos))); }
private object getAsFunction(LuaCore.lua_State luaState, int stackPos) { return(translator.getFunction(luaState, stackPos)); }
private object getAsFunction(IntPtr luaState, int stackPos) { return(translator.getFunction(luaState, stackPos)); }