- Timestamp:
- 05/13/16 20:05:14 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/lua/lua_raw.hh
r490 r494 55 55 56 56 nv::vector<nv::uint8> nlua_tobytearray( lua_State *L, int index ); 57 nv::vector<nv::uint32> nlua_tou32array( lua_State *L, int index ); 57 58 58 59 void nlua_register( lua_State *L, const char* fname, lua_CFunction func, int index ); -
trunk/src/lua/lua_raw.cc
r490 r494 274 274 } 275 275 276 nv::vector<nv::uint32> nlua_tou32array( lua_State *L, int index ) 277 { 278 index = nlua_absindex( L, index ); 279 nv::vector<nv::uint32> result; 280 if ( lua_istable( L, index ) ) 281 { 282 lua_pushnil( L ); 283 while ( lua_next( L, index ) != 0 ) 284 { 285 result.push_back( static_cast<nv::uint32>( lua_tointeger( L, -1 ) ) ); 286 lua_pop( L, 1 ); 287 } 288 } 289 return result; 290 } 291 276 292 void * nlua_testudata( lua_State *L, int ud, const char *tname ) 277 293 {
Note: See TracChangeset
for help on using the changeset viewer.