lua-users home
lua-l archive

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


What are the Diffrences?
Oh, and did I do the funtion right?
luaL_reg(L, "setDefaultSettings", setDefaultSettings());
Since I do get an error now.
But to be honest I didn't really check on that Error yet.
 
Thanks
Robin

> Date: Mon, 3 Nov 2008 21:06:38 -0200
> From: lhf@tecgraf.puc-rio.br
> To: lua@bazar2.conectiva.com.br
> Subject: Re: Bind Variables?
>
> > If you want to do this, and make it feel natural to Lua, then it is a
> > bit of a pig to do: Create a table (T), assign it a fresh metatable
> > (MT), add an __index metamethod to MT which reads the value from the C
> > structure and then add a __newindex metatable to MT which writes the
> > value to the C structure.
>
> Or use a userdata instead of a table.



Express yourself instantly with MSN Messenger! MSN Messenger