[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (rc0) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sat, 13 Dec 2014 09:56:12 -0200
> 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