Changeset 265 for trunk/src/root.cc


Ignore:
Timestamp:
06/19/14 02:22:56 (11 years ago)
Author:
epyon
Message:
  • lua::ref lightweight wrapper class
  • allows distinction from int for templates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/root.cc

    r264 r265  
    2222        destroy_children( o );
    2323        o->detach();
    24         if ( m_lua_state && o->m_lua_index != lua::ref_none )
     24        if ( m_lua_state && o->m_lua_index != lua::ref::none )
    2525        {
    26                 m_lua_state->unregister_object( o->m_lua_index );
     26                m_lua_state->unregister_object( lua::ref( o->m_lua_index ) );
    2727        }
    2828        if ( m_uid_store && o->m_uid != 0 )
     
    4747                if ( lua_name != nullptr )
    4848                {
    49                         o->m_lua_index       = m_lua_state->register_object( o, lua_name );
     49                        o->m_lua_index       = m_lua_state->register_object( o, lua_name ).get();
    5050                }
    5151                if ( storage != nullptr )
    5252                {
    53                         o->m_lua_proto_index = m_lua_state->register_proto( o->get_id().c_str(), storage );
     53                        o->m_lua_proto_index = m_lua_state->register_proto( o->get_id().c_str(), storage ).get();
    5454                }
    5555        }
Note: See TracChangeset for help on using the changeset viewer.