LuaStack *LuaStack::attach(lua_State *L) { LuaStack *stack = new LuaStack(); stack->initWithLuaState(L); stack->autorelease(); return stack; }