[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Getting return value of a lua function called in C
- From: "Ashley Fryer" <lua@...>
- Date: Tue, 29 Feb 2000 10:36:26 -0800
> When I call lua_getresult(1), I get the same result no matter
> what I feed the the function.
lua_getresult returns a lua_Object. A lua_Object can be one of several data
types, so you have to use one of the lua_getXXX functions to convert the
lua_Object into the actual data. In your example, that means:
lua_getnumber(lua_getresult(1))
See section 5.2 in the docs for more info.