[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: upvalues
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Wed, 30 Oct 2002 20:23:05 +0100
Christian Vogler wrote:
> On Wed, Oct 30, 2002 at 11:25:14AM -0700, C.S. Brooks wrote:
> > What do upvalues do? How do they work? Where might I use them?
Apart from what Christian mentioned there are also "upvalues"
in the C api of Lua. When you add a C function to the lua
state, you can give it "upvalues", which are a bit like hidden
parameters that you can fetch later, when your function is called.
They are very useful for integration with C++ or for other forms
of OOP programming in Lua.
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer