[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Modules with standalone main program
- From: albertmcchan <albertmcchan@...>
- Date: Tue, 27 Feb 2018 09:27:16 -0500
On Feb 27, 2018, at 8:29 AM, "Soni \"They/Them\" L." <fakedme@gmail.com> wrote:
>
> Here's an idea:
>
> if debug.getinfo(2).func == require then
> -- required
> elseif debug.getinfo(2).func == dofile then
> -- dofiled
> else
> -- loadfiled, luaed, etc
> end
>
> (also try my lua script: debug.getinfo(2).func())
>
It work ! ... How ?
why 4 changed to 2, and 1 changed to nil ?
I were trying things out, what does below meant ?
lua> =debug.getinfo(2)
nil
lua> =(debug.getinfo(2))
table: 004AEFE0
lua>=debug.getinfo(2).func
function: 003D4708
lua>=debug.getinfo(2).func() -- crashed !
- References:
- Modules with standalone main program, Dirk Laurie
- Re: Modules with standalone main program, Sean Conner
- Re: Modules with standalone main program, Tony Papadimitriou
- Re: Modules with standalone main program, Roberto Ierusalimschy
- Re: Modules with standalone main program, Tony Papadimitriou
- Re: Modules with standalone main program, Roberto Ierusalimschy
- Re: Modules with standalone main program, albertmcchan
- Re: Modules with standalone main program, Roberto Ierusalimschy
- Re: Modules with standalone main program, albertmcchan
- Re: Modules with standalone main program, Dirk Laurie
- Re: Modules with standalone main program, albertmcchan
- Re: Modules with standalone main program, Soni "They/Them" L.