[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: What's a Lua object? Why LUA_TBOOLEAN and LUA_TLIGHTUSERDATA and LUA_TNUMBER are not Lua objects?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Tue, 20 Oct 2020 17:09:43 +0800
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