[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Different number of arguments in Lua stack in set hook function in Lua 5..4 vs Lua 5.2
- From: aman agrawal <aman.161089@...>
- Date: Tue, 3 Aug 2021 22:12:28 +0530
I passed ar->ftransfer in lua_getlocal() to get the returned value on the stack, but it didn't work, so I checked the indexes and values came very large.
It seems that we need to use L->ci->u2.transferinfo.ftransfer index value, not ar->ftransfer value because I'm getting the correct result, if I use
On Tue, Aug 3, 2021 at 5:09 PM aman agrawal <firstname.lastname@example.org> wrote:
> Can you please tell me how can I get the index of the returned value. I checked the value of fTransfer and nTransfer fields, and value of these fields are very large.
> top : 24
> Checking top element value : 255
> ftransfer index : 57552
> ntransfer index : 65535
Docs does not say they are not stack indexes, but that you use get/set
local to access them through the activation record:
Are you using the docs or going directly to the headers defining them?