[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: suggestion : method to push constant strings
- From: "Joshua Jensen" <jjensen@...>
- Date: Fri, 1 Feb 2002 09:19:54 -0700
> These strings are only "active" in the Lua function called from
> C++ side, and are GC'd as the script returns. Such strings have a
> very low lifetime, and do not need to be otherwise "managed" by
> Lua.
It is likely that the size of a 'double' on your architecture is 64
bits. If it is, and the Lua script doesn't actually do any operations
on the string (just passes it through to C), you can implement a fake
32-bit pointer by passing the pointer as a double through
lua_pushnumber().
Josh