lua-users home
lua-l archive

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

>Thanks, this is exactly the answer I was hoping for.  I have not looked
>much at getinfo, because I did not want to rely on a function which is
>part of a library one is not supposed to load in normal use.

The main point about the the debug API, on top of which the Reflexive Debug
Interface (ldblib) is built, is that its functions are likely to be slow,
because their main purpose is to generate good error messages.
For instance, to get the "name" of the current function, getinfo must traverse
all global variables. Calling getinfo(1,"S") might be slightly faster if you
only want to know the source.

It is in this sense that this library is not supposed to be used as a normal
programming tool. But it's very useful nonetheless.