[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C-objects with __gc *and* __index?
- From: Uli Kusterer <witness.of.teachtext@...>
- Date: Sun, 7 Aug 2005 12:02:04 +0200
On Aug 7, 2005, at 12:24:38, Shmuel Zeigerman wrote:
Uli Kusterer wrote:
int UKAdventureRoomToString( lua_State *pLuaState )
UKRoom* self = UKAdventureRoomGetThis( pLuaState );
lua_pushfstring( pLuaState, "Room(%lx)", (unsigned long)self );
If you work with Lua 5.1w6, then try:
lua_pushfstring( pLuaState, "Room(%p)", self );
Otherwise, use sprintf and lua_pushstring.
(lua_pushfstring doesn't support %x).
thanks. I'm still using 5.0.2 right now, but since this was mainly
for testing right now, I just changed it to lua_pushstring
( pLuaState, "Room" ); and this call magically started working.
-- M. Uli Kusterer