[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How know what functions are defined in a lua script ?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 28 Mar 2000 13:30:35 -0300
> But how to list the globals ? Is there a way to do that with a lua api function ?
const char *name = NULL;
lua_beginblock();
while ((name = lua_nextvar(name)) != NULL) {
lua_Object value = lua_getresult(2);
... /* uses `name' and `value' */
lua_endblock();
lua_beginblock(); /* reopens a block */
}
lua_endblock();
-- Roberto