lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Saturday, March 31, 2007 8:54 AM, Michael Broughton wrote:

> Graham,
> 
> I have been working on a library this last week, and I just did some
> experimenting with separating my metatable and method table, as suggested
> by Rici Lake. It made my library a few lines longer, but it is mostly
> unchanged.   
> 
> As expected, none of the metamethods are accessible from the Lua side
> anymore. For example, you can do these: 
> 
> #udata
> udata:close()
> u3 = u1 + u2
> 
> But not these:
> 
> udata:__len()
> udata:__gc()
> u3 = u1:__add(u2)
> 
> This is the behavior you want, right? I'll post my library, if you want an
> example. I just need to write some documentation first. 
> 
> Mike
> 

I am interested in taking a peek. Will look forward to your post. Thanks.

-- Vijay