lua-users home
lua-l archive

Re: void* in Lua_State for Application?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Coda Highland <chighland@gmail.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)....
Thanks,
-miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join." -- Anon. British Officer in WW I

AltStyle によって変換されたページ (->オリジナル) /