[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: checking userdata type from lua
- From: PA <petite.abeille@...>
- Date: Thu, 18 May 2006 15:44:42 +0200
On May 18, 2006, at 15:23, Roberto Ierusalimschy wrote:
(You cannot change the metatable of other types from Lua, only from
C.)
What about debug.setmetatable (object, table)?
debug.setmetatable( 1, { __index = math } )
print( ( -1 ):abs() )
> 1
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/