mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-21 22:33:27 +00:00
Itern special key should return null as userdata ptr
This commit is contained in:
parent
e2c312e0de
commit
5ca3897c4f
@ -845,6 +845,7 @@ static LJ_AINLINE void *lightudV(global_State *g, cTValue *o)
|
||||
uint64_t seg = lightudseg(u);
|
||||
uint32_t *segmap = mref(g->gc.lightudseg, uint32_t);
|
||||
lj_assertG(tvislightud(o), "lightuserdata expected");
|
||||
if (seg == (1 << LJ_LIGHTUD_BITS_SEG)-1) return NULL;
|
||||
lj_assertG(seg <= g->gc.lightudnum, "bad lightuserdata segment %d", seg);
|
||||
return (void *)(((uint64_t)segmap[seg] << 32) | lightudlo(u));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user