lua-users home
lua-l archive

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


> Does anyone happen to know of some pre-existing C that does what
> luaL_traceback does, but returns the traceback as some kind of C
> datastructure (a flat string, or an array of strings, I imagine) rather
> than pushing it onto the Lua stack? I'd like to have such a thing for debug
> logging purposes.

'luaL_traceback' produces a flat string. You only need to get it from
the stack. If you don't want to keep that string in Lua, make a copy
for your onw use.

-- Roberto