[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What's a Lua object? Why LUA_TBOOLEAN and LUA_TLIGHTUSERDATA and LUA_TNUMBER are not Lua objects?
- From: yang chao <yangchao1p@...>
- Date: Tue, 20 Oct 2020 10:43:35 +0000
there are lua objects,just not gc object.
> 在 2020年10月20日,下午5:10,孙世龙 sunshilong <sunshilong369@gmail.com> 写道:
>
> As per the comments in the lstate.h, which says that:
> /*
> ** macro to convert a Lua object into a GCObject
> ** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.)
> */
> #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)).
>
> If I understand the comments correctly, I can draw the conclusion that
> LUA_TBOOLEAN and LUA_TLIGHTUSERDATA and LUA_TNUMBER are not Lua
> objects.
>
> So, what's a Lua object?
> Why LUA_TBOOLEAN、LUA_TLIGHTUSERDATA and LUA_TNUMBER are not Lua objects?
>
> Best regards
> Sunshilong