[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: protect a set in c (non-existing elements)
- From: Tim Hill <drtimhill@...>
- Date: Fri, 14 Feb 2014 10:52:55 -0800
On Feb 14, 2014, at 7:40 AM, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:
>
> Btw is it possible to pass parameters to lua code loaded with luaL_loadstring?
>
> Thijs
lua_loadstring() leaves a Lua function on the stack (at the top) .. you can then call this function using lua_call() or lua_pcall() .. look at the docs for these functions to see how you pass parameters and get back return values (hint: you push them onto the stack).
—Tim