Changeset 541 for trunk/src


Ignore:
Timestamp:
01/31/17 14:09:44 (8 years ago)
Author:
epyon
Message:
  • lua fixes
  • ecs message_queue split
  • ecs message_cast as free function
Location:
trunk/src/lua
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua_proxy.cc

    r540 r541  
    9696
    9797nv::lua::temporary_proxy::temporary_proxy( state* state )
    98         : stack_proxy( state, -1 )
     98        : stack_proxy( state, lua_gettop( *state ) )
    9999{
    100100
  • trunk/src/lua/lua_state.cc

    r540 r541  
    153153                // TODO : error handling
    154154        }
    155         m_index = -1;
     155        m_index = nlua_absindex( m_state, -1 );
    156156}
    157157
     
    166166                // TODO : error handling
    167167        }
    168         m_index = -1;
     168        m_index = nlua_absindex( m_state, -1 );
    169169}
    170170
    171171lua::table_guard::~table_guard()
    172172{
    173         if ( m_index == -1 )
     173        if ( m_level != lua_gettop( m_state ) )
    174174                lua_settop( m_state, m_level );
    175175}
     
    184184{
    185185        m_level = lua_gettop( m_state );
    186         m_index = proxy.m_index;
     186        m_index = nlua_absindex( m_state, proxy.m_index );
    187187}
    188188
Note: See TracChangeset for help on using the changeset viewer.