- Timestamp:
- 07/30/15 14:06:24 (10 years ago)
- Location:
- trunk/src/lua
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lua/lua_area.cc
r395 r449 9 9 #include "nv/lua/lua_raw.hh" 10 10 #include "nv/core/random.hh" 11 12 const char* nv::lua::detail::AREA_METATABLE = "area";13 11 14 12 using nv::lua::detail::is_coord; … … 446 444 }; 447 445 448 luaL_newmetatable( L, nv::lua:: detail::AREA_METATABLE);446 luaL_newmetatable( L, nv::lua::pass_traits< nv::rectangle >::metatable() ); 449 447 nlua_register( L, nlua_area_m, -1 ); 450 448 lua_createtable( L, 0, 0 ); -
trunk/src/lua/lua_glm.cc
r406 r449 339 339 }; 340 340 341 luaL_newmetatable( L, nv::lua:: detail::glm_metatable_name<T>() );341 luaL_newmetatable( L, nv::lua::pass_traits<T>::metatable() ); 342 342 nlua_register( L, nlua_vec_m, -1 ); 343 343 lua_createtable( L, 0, 0 ); -
trunk/src/lua/lua_raw.cc
r441 r449 24 24 { 25 25 nv::string64 buffer; 26 size_t l = nv::uint64_to_buffer( buffer,nv::uint64( lua_touserdata( L, idx ) ) );26 buffer.append( nv::uint64( lua_touserdata( L, idx ) ) ); 27 27 return buffer; 28 28 } … … 30 30 { 31 31 nv::string64 buffer; 32 size_t l = nv::f64_to_buffer( buffer, lua_tonumber( L, idx) );32 buffer.append( nv::uint64( lua_touserdata( L, idx ) ) ); 33 33 return buffer; 34 34 } -
trunk/src/lua/lua_values.cc
r445 r449 23 23 } 24 24 25 void* nv::lua::detail:: check_userdata( lua_State *L, int index, const char* metatable )25 void* nv::lua::detail::raw_check_userdata( lua_State *L, int index, const char* metatable ) 26 26 { 27 27 return luaL_checkudata( L, index, metatable ); 28 28 } 29 29 30 void* nv::lua::detail:: allocate_userdata( lua_State *L, size_t size, const char* metatable )30 void* nv::lua::detail::raw_allocate_userdata( lua_State *L, size_t size, const char* metatable ) 31 31 { 32 32 void* result = lua_newuserdata(L, size); … … 63 63 { 64 64 lua_pushboolean( L, v ); 65 }66 67 void nv::lua::detail::push_cstring ( lua_State *L, const char* s )68 {69 lua_pushstring( L, s );70 65 } 71 66 … … 105 100 return lua_toboolean( L, index ) != 0; 106 101 } 107 108 // const char* nv::lua::detail::to_cstring ( lua_State *L, int index )109 // {110 // return lua_tolstring( L, index, nullptr );111 // }112 102 113 103 nv::string_view nv::lua::detail::to_string_view( lua_State *L, int index ) … … 164 154 } 165 155 166 // const char* nv::lua::detail::to_cstring ( lua_State *L, int index, const char* def )167 // {168 // return ( lua_type( L, index ) == LUA_TSTRING ? lua_tostring( L, index ) : def );169 // }170 171 156 void* nv::lua::detail::to_pointer ( lua_State *L, int index, void* def ) 172 157 {
Note: See TracChangeset
for help on using the changeset viewer.