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?


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

----- Original Message -----
From: "Luiz Henrique de Figueiredo" <>
To: "Multiple recipients of list" <>
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,
> >query the previously pushed function and values, then re-push it all with
> >extra one.
> Use lua_pushupvalues to get all upvalues in the stack and lua_tocfunction
> get the C function back and then create a new closure as needed.
> --lhf