[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: void* in Lua_State for Application?
- From: Miles Bader <miles@...>
- Date: Tue, 10 Sep 2013 15:01:13 +0900
Coda Highland <email@example.com> writes:
>> It never occurred to me to try integer keys (or rawgeti), but as that
>> presents additional issues (e.g., one must come up with a system to
>> assign small-integer keys without conflicts)
> Lua provides that mechanism built-in -- consult luaL_ref.
Ah, indeed. Though of course then the question becomes where to store
the index in C code (using a static variable wouldn't work, because the
luaL_ref values are presumably per-lua-state)....
"Most attacks seem to take place at night, during a rainstorm, uphill,
where four map sheets join." -- Anon. British Officer in WW I