lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


on 11/22/03 8:33 AM, Ando Sonenblick at ando@spritec.com wrote:

> 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 = {}

The C code is equivalent to what you just wrote.

What you seem to be asking for is a way to rapidly delete all of the entries
from a table thereby affecting everything that holds a reference to the
table. I don't know of a way to do that.

Mark