[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LUA_USE_APICHECK
- From: Axel Kittenberger <axkibe@...>
- Date: Fri, 26 Aug 2011 12:54:38 +0200
> The manual doesn't say that non-acceptable indices should return NULL.
In my opinion it does.
"If the value at the given acceptable index is a full userdata,
returns its block address. If the value is a light userdata, returns
its pointer. Otherwise, returns NULL"
This english compiles into pseudo-code
if valid(index) and valueat(index) == userdata then return block address
elseif valid(index) and valueat(index) == light userdata then return pointer
else return NULL.
So an invalid index returns NULL.