lua-users home
lua-l archive

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


http://www.lua.org/manual/5.0/manual.html#4.2

Discusses upvalues and their use.

- Jason


----- Original Message ----- 
From: "Tim Conkling" <tconkling@brown.edu>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Tuesday, October 21, 2003 3:51 PM
Subject: Re: Lua C Functions in C++ class


> One more quick question -- do I need to do anything with upvalues 
> before returning from the function call, or are they automatically 
> popped off the stack by Lua?
> 
> Tim
> 
> On Oct 21, 2003, at 5:50 PM, Tim Conkling wrote:
> 
> > Thanks a lot to everyone who replied. Userdata upvalues are exactly 
> > what I need.
> >
> > Tim
> >
> > On Oct 21, 2003, at 2:57 PM, Luiz Henrique de Figueiredo wrote:
> >
> >>> there's no way to associate any sort of user data with the exported 
> >>> functions
> >>
> >> Sure there is. You export C closures, not C functions, in fact. So C 
> >> function
> >> can have upvalues.
> >> --lhf
> >>
> >
> 
>