Ignore:
Timestamp:
07/23/15 08:30:41 (10 years ago)
Author:
epyon
Message:
  • local updates (string removal)
File:
1 edited

Legend:

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

    r433 r437  
    134134        if ( status != 0 )
    135135        {
    136                 NV_LOG_ERROR( "Lua error : ", lua_tostring( m_state, -1 ) );
     136                NV_LOG_ERROR( "Lua error : ", nlua_tostringview( m_state, -1 ) );
    137137                lua_pop( m_state, 1 );
    138138        }
     
    402402        if (result)
    403403        {
    404                 NV_LOG_WARNING( "Failed to load string ", name, ": ", lua_tostring(m_state, -1));
     404                NV_LOG_WARNING( "Failed to load string ", name, ": ", nlua_tostringview(m_state, -1));
    405405                return false;
    406406        }
     
    414414        if (result)
    415415        {
    416                 NV_LOG_WARNING( "Failed to open file ", filename, ": ", lua_tostring( m_state, -1 ) );
     416                NV_LOG_WARNING( "Failed to open file ", filename, ": ", nlua_tostringview( m_state, -1 ) );
    417417                return false;
    418418        }
     
    425425        if (result)
    426426        {
    427                 NV_LOG_WARNING( "Failed to run script ", name, ": ", lua_tostring( m_state, -1 ) );
     427                NV_LOG_WARNING( "Failed to run script ", name, ": ", nlua_tostringview( m_state, -1 ) );
    428428                lua_pop( m_state, 1 );
    429429        }
     
    442442        for ( int i = 0; i < top; ++i )
    443443        {
    444                 NV_LOG_DEBUG( "#", i+1, " - ", lua_typename(m_state, lua_type(m_state, i+1) ), " = ", nlua_typecontent(m_state, i+1).c_str() );
     444                NV_LOG_DEBUG( "#", i+1, " - ", lua_typename(m_state, lua_type(m_state, i+1) ), " = ", nlua_typecontent(m_state, i+1) );
    445445        }
    446446}
     
    546546        if ( !object_index.is_valid() ) return;
    547547        lua_rawgeti( m_state, LUA_REGISTRYINDEX, object_index.get() );
    548         lua_pushlstring( m_state, metaname.data(), metaname.size() );
     548        nlua_pushstringview( m_state, metaname );
    549549        lua_pushlightuserdata( m_state, pointer );
    550550        lua_rawset( m_state, -3 );
     
    572572        else
    573573                nlua_deepcopy( m_state, -2 );
    574         lua_pushlstring( m_state, id.data(), id.size() );
     574        nlua_pushstringview( m_state, id );
    575575        lua_pushvalue( m_state, -2 );
    576576        lua_rawset( m_state, -4 );
     
    590590                return;
    591591        }
    592         lua_pushlstring( m_state, id.data(), id.size() );
     592        nlua_pushstringview( m_state, id );
    593593        lua_pushnil( m_state );
    594594        lua_rawset( m_state, -3 );
Note: See TracChangeset for help on using the changeset viewer.