lua-users home
lua-l archive

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


Hello Francisco,

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  L->ci->u2.transferinfo.ftransfer.

On Tue, Aug 3, 2021 at 9:39 PM Francisco Olarte <folarte@peoplecall.com> wrote:
On Tue, Aug 3, 2021 at 5:09 PM aman agrawal <aman.161089@gmail.com> 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:
https://www.lua.org/manual/5.4/manual.html#4.7

Are you using the docs or going directly to the headers defining them?

Francisco Olarte.


--
Best Regards
Aman Agrawal