lua-users home
lua-l archive

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


---- Original Message -----
From: "Kenneth Rochel de Camargo Jr." <kenneth@uerj.br>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Friday, January 07, 2000 8:41 PM
Subject: Re: Tables to/from C


> Hi,
> Thanks.
> Another thing: how do I push a user defined value to the Lua stack in
order to
> use it as the return value of a function?
> Feliz ano novo,
> Ken

Simply use lua_pushobject, lua_pushnumber, lua_pushstring etc.. Anything
pushed to the stack at the end of a function will be treated as return
values (Remember a function can return more than one value!)

/Erik