Re: caching userdata pointers, lua_pushuserdata?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: caching userdata pointers, lua_pushuserdata?
- From: Kriss <Kriss@...>
- Date: 2005年7月26日 06:24:24 +0100
David Burgess wrote:
Why not use lua_pushvalue() ?
I won't have it on the stack at the time. It is for some bound lua/c
data which is sometimes referenced from the lua side and sometimes the c
side. When starting off on the c side I need to index a global table for
more associated lua relevent data. At the moment I'm using a unique
number as the key but I'd like to be able to use a userdata as the key
since that's already available on both the c and the lua side. But
although I have the address of the userdata to hand I can't push it on
to the stack as an actual userdata reference.
--
Kriss
http://XIXs.com -><- http://www.WetGenes.com