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/nv/lua/lua_raw.hh

    r395 r437  
    1111#include <nv/stl/vector.hh>
    1212#include <nv/lib/lua.hh>
    13 #include <string>
     13#include <nv/stl/string.hh>
    1414
    1515void nlua_toflags_set( lua_State *L, int index, nv::uint8* data, nv::uint32 count );
     
    1717void nlua_toflags( lua_State *L, int index, nv::uint8* data, nv::uint32 count );
    1818
    19 std::string nlua_typecontent( lua_State* L, int idx );
     19inline nv::string_view nlua_tostringview( lua_State* L, int idx )
     20{
     21        size_t len;
     22        const char* str = lua_tolstring( L, idx, &len );
     23        return nv::string_view( str, len );
     24}
     25
     26inline void nlua_pushstringview( lua_State* L, const nv::string_view& str )
     27{
     28        lua_pushlstring( L, str.data(), str.size() );
     29}
     30
     31// TODO: this is not thread safe!
     32nv::string_view nlua_typecontent( lua_State* L, int idx );
    2033void nlua_shallowmerge( lua_State *L, int index );
    2134void nlua_shallowcopy( lua_State *L, int index );
     
    3346void nlua_register( lua_State *L, const char* lname, const luaL_Reg *l );
    3447
     48
     49
    3550#endif // NV_LUA_RAW_HH
    3651
Note: See TracChangeset for help on using the changeset viewer.