示例#1
0
		stack_reference(lua_State* L, const stack_reference& r) noexcept
		: luastate(L) {
			if (!r.valid()) {
				index = 0;
				return;
			}
			int i = r.stack_index();
			if (detail::xmovable(lua_state(), r.lua_state())) {
				lua_pushvalue(r.lua_state(), r.index);
				lua_xmove(r.lua_state(), luastate, 1);
				i = absolute_index(luastate, -1);
			}
			index = i;
		}
示例#2
0
		basic_function(const stack_reference& r) : basic_function(r.lua_state(), r.stack_index()) {}
示例#3
0
	inline bool operator==(const stack_reference& l, const stack_reference& r) {
		return lua_compare(l.lua_state(), l.stack_index(), r.stack_index(), LUA_OPEQ) == 0;
	}
示例#4
0
文件: thread.hpp 项目: Enverex/mame
		thread(const stack_reference& r) : thread(r.lua_state(), r.stack_index()) {};