Re: Converting pointers to Lua values?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Converting pointers to Lua values?
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2004年4月30日 12:41:34 -0300
> I'm just curious, is there an indirect way?
Yes. You can keep a (weak) table mapping light userdata to their
corresponding objects.
> Contrast this with the simplicity of expanding a table associated with
> a non-pointer key.
You can have exactly the same simplicity using pointer keys (light
userdata).
-- Roberto