lua-users home
lua-l archive

Re: getinfo for activelines on load/loadstring result

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


2015年02月18日 21:07 GMT+02:00 Paul K <paul@zerobrane.com>:
> So luac does have the information about the main chunk and
> the compiled function. Is there any way to get this information
> using debug.* functions without calling luac or executing the code?
> name,tab = debug.getupvalue(b,1)
> name == "_ENV"
true
> tab.a()
1
2
> debug.getinfo(tab.a).source
function a()
 print(1)
 print(2)
end

AltStyle によって変換されたページ (->オリジナル) /