lua-users home
lua-l archive

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



On 13/12/14 09:56 AM, Roberto Ierusalimschy wrote:
Hello! Is it intended that in stacktraces standard C functions are
sometimes reported as `_G.function` and sometimes simply as
`function`?
It is not *intended*, but it is known. The algorithm that searches for
a name is depth-first, and due to the random order of table traversals
sometimes it finds 'function' first, sometimes it finds '_G' (and then
'function' inside it) first. Is this a problem? It seems easy to fix...
(As performance is not a problem here, we can first search with a level
limit of 1, and then search again with a level limit of 2.)

-- Roberto

Can you get it to report as `package.loaded._G.function`?

--
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.