[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [Lua 5.2] luaL_ref and the LUA_RIDX_* fields
- From: Patrick Donnelly <batrick@...>
- Date: Sun, 9 May 2010 22:31:26 -0400
I was looking over the lua-5.2-work2 code and noticed that luaL_ref
ignores the first 3 indices in the table array. This assumes that the
table being worked on is the registry (because the first three indices
are the new LUA_RIDX_* values). Is this not a bad assumption as for
other tables this wastes 3 slots which could conceivably bloat memory
usage or cause keys to be in the hash part of a table (leading to
poorer performance)?
--
- Patrick Donnelly