Re: C-objects with __gc *and* __index?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: C-objects with __gc *and* __index?
- From: Shmuel Zeigerman <shmuz@...>
- Date: 2005年8月07日 12:24:38 +0200
Uli Kusterer wrote:
int UKAdventureRoomToString( lua_State *pLuaState )
{
UKRoom* self = UKAdventureRoomGetThis( pLuaState );
lua_pushfstring( pLuaState, "Room(%lx)", (unsigned long)self );
return 1;
}
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).
--
Shmuel