lua-users home
lua-l archive

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


Nick Trout wrote:
> 
> Here is some code to play with. The first bit is your userdata binding, the
> second bit is the Lua register operator. Its a bit like trying to do friend
> operators in C++. You have to specify the operator explicitly using regop.
> Hope this answers your question.

Yes. I thought I would need something like this. I'm not entirely happy
with the extra steps (one extra function call and a lookup in a table),
but this method is indeed pratical and general. 

Thank you very much.

Oscar Lazzarino