[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Modifying referenced data
- From: Alexey Scryabin <alex@...>
- Date: Fri, 31 Jan 2003 17:55:35 +0500
Good day!
How can I modify a referenced data? For instance:
// create a table
lua_newtable( L );
// set table[0] = number
lua_pushnumber( L, number );
lua_rawseti( L, -2, 0 );
// reference the table
int ref = lua_ref( L, lock );
// ... somewhere later in the code
// get referenced table
lua_getref( L, ref );
now I can read table[0], but how could I change the value of table[0]
such as next time I do lua_getref( L, ref ) I will get modified table?
--
Best regards,
Alexey mailto:alex@targem.ru