[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Comparing userdata to 0 in Lua 5.0
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 6 Nov 2003 16:04:58 -0200
>Note: There is no guarantee that a lightuserdata is a pointer at all.
Not really true. It might not have been a pointer before, but once it became
a lightuserdata it became a pointer... If you cast longs to void* then you're
playing it dangerously in C but once you've done it, Lua is happy and thinks
its is a pointer (but does not think too hard, because it never derefences it).