lua-users home
lua-l archive

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


I can't seem to get this to work.  lua_pushupvalues() seems to return 0,
when called with the function I'm interested in on the top of the stack.

Is this the correct way to be using it, or am I doing something
fundamentally wrong?

Thanks!

Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software

----- Original Message -----
From: "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Wednesday, August 21, 2002 12:29 PM
Subject: Re: Modifying a Closure in 5.0 Alpha


> >So I either need a means to add an extra value to the existing closure,
or
> >query the previously pushed function and values, then re-push it all with
an
> >extra one.
>
> Use lua_pushupvalues to get all upvalues in the stack and lua_tocfunction
to
> get the C function back and then create a new closure as needed.
> --lhf
>