lua-users home
lua-l archive

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


> 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