Ignore:
Timestamp:
09/17/14 14:18:10 (11 years ago)
Author:
epyon
Message:
  • extended handle_operator (unsafe ops)
  • lua_handle library and support (multiple handle types supported)
File:
1 edited

Legend:

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

    r319 r333  
    261261        lua_pushliteral(m_state, LUA_TABLIBNAME);
    262262        lua_call(m_state, 1, 0);
     263
     264        {
     265                // Preregister 8 references for Handle registry
     266                lua_newtable(m_state);
     267                NV_ASSERT( luaL_ref( m_state, LUA_REGISTRYINDEX ) == 1, "First reference not 1!" );
     268                for ( uint32 i = 1; i < 8; ++i )
     269                {
     270                        lua_newtable(m_state);
     271                        luaL_ref( m_state, LUA_REGISTRYINDEX );
     272                }
     273        }
    263274
    264275        if ( load_libs )
Note: See TracChangeset for help on using the changeset viewer.