[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Modifying _G metatable
- From: Don Williamson <don@...>
- Date: Fri, 25 Jun 2004 11:19:56 +0100
thanks for the feedback. I think I'll stick with the current solution as
upvalues require duplication of the symbol table in LUA (as far as I can
tell - I'm a LUA newb!). This gives me the side effect that I can't use
table.foreach to print my API so I'll have to add some extra functions
to do that specifically.
Diego Nehab wrote:
To start with I need to get around the problem of telling, from within a
C function, the name of the C function just called. Other than the Debug
API I can't see any means of getting at that, and I don't want to use
the Debug API.
If you control the binding process (it looks like you do), you can set
an upvalue for each C function telling its name. Otherwise, I think the
debug API is the only way.