void csp::OpAlt::UnrefProcess( lua::LuaStack const& stack ) { if( m_processRefKey != lua::LUA_NO_REF ) { stack.UnrefInRegistry( m_processRefKey ); m_processRefKey = lua::LUA_NO_REF; } }
void csp::OpAlt::UnrefArguments( lua::LuaStack const& stack ) { for( int i = 0; i < m_numArguments; ++i ) { stack.UnrefInRegistry( m_arguments[i].refKey ); m_arguments[i].refKey = lua::LUA_NO_REF; } }
void csp::OpAlt::CloseCase( lua::LuaStack& stack, AltCase& altCase ) { if( altCase.m_pChannel ) { altCase.m_pChannel->ResetAttachmentIn( *this ); altCase.m_pChannel = NULL; } if( altCase.m_channelRefKey != lua::LUA_NO_REF ) { stack.UnrefInRegistry( altCase.m_channelRefKey ); altCase.m_channelRefKey = lua::LUA_NO_REF; } if( altCase.m_closureRefKey != lua::LUA_NO_REF ) { stack.UnrefInRegistry( altCase.m_closureRefKey ); altCase.m_closureRefKey = lua::LUA_NO_REF; } }
void csp::OpAlt::UnrefClosures( lua::LuaStack const& stack ) { for( int i = 0; i < m_numCases; ++i ) { AltCase& altCase = m_cases[ i ]; if( altCase.m_closureRefKey != lua::LUA_NO_REF ) { stack.UnrefInRegistry( altCase.m_closureRefKey ); altCase.m_closureRefKey = lua::LUA_NO_REF; } } }
void csp::OpAlt::UnrefChannels( lua::LuaStack const& stack ) { for( int i = 0; i < m_numCases; ++i ) { if( m_cases[i].m_pChannel != NULL ) { m_cases[i].m_pChannel = NULL; stack.UnrefInRegistry( m_cases[i].m_channelRefKey ); m_cases[i].m_channelRefKey = lua::LUA_NO_REF; } } }
void csp::OpLua::UnrefSelf( lua::LuaStack& luaStack ) { CORE_ASSERT( m_self != lua::LUA_NO_REF ); luaStack.UnrefInRegistry( m_self ); m_self = lua::LUA_NO_REF; }