lua-users home
lua-l archive

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


On 1/11/07, Cory Cater <ccater@gmail.com> wrote:
Hello,

I am relatively new to Lua and I am looking at accessing some sort of List
of globally registered functions. I have started looking at the reference
manual and the idea of environment seems to be what I want. I guess I am
just looking for a bit of direction. I have begun using tolua++ to get the
functions from C into the Lua namespace, and I would like to access if
possible from the C side or the Lua side a list of all the functions
registered and if possible but unlikely the arguments they take.

If someone can give me some advice on this it would be most appreciated,

Cory


How about this:

for k,v in pairs(_G) do
 if type(v)=="function" then
   print(k,v)
 end
end


--Hope it helps,
--Leo--