[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject:
- From: Ando Sonenblick <ando@...>
- Date: Sat, 22 Nov 2003 08:33:46 -0800
Gang,
I have a table "MessageTable" that is used in various different way.
That is, it has different fields depending on is use at a moment.
Thus, since I don't want stray values to remain in the table for
whomever may use it next, I'm currently setting the table to nil, then
creating it from scratch:
lua_pushstring(itsLuaState, "MessageTable");
lua_pushnil(itsLuaState);
lua_settable(itsLuaState, LUA_GLOBALSINDEX);
lua_pushstring(itsLuaState, "MessageTable");
lua_newtable(itsLuaState);
lua_settable(itsLuaState, LUA_GLOBALSINDEX);
I'd rather just empty its contents. Is there a fell swoop way to do so
without iterating over the table? Something equivalent to
MessageTable = {}
Just looking for the most efficient way of doing things...
thx,
ando