Within my code, I need to push an int onto Lua’s stack. I know of the lua_pushnumber for C, but what would be used in LuaJ? I can’t find a function for it, given that LuaJ isn’t clear as to what functions represent certain C functions.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
LuaJ abstracts things like stack management away. So if you’re trying to call a Lua function, you don’t have to push values onto the stack. Just get the Lua function as a
LuaFunctionvariable and call it with theinvokemethod. To return multiple values from a Java function registered with Lua, you have to return aVaragsobject. You put your multiple values into that.