[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_cpcall() removed in 5.2?
- From: Daniel Silverstone <dsilvers@...>
- Date: Tue, 9 Mar 2010 11:38:31 +0000
On Tue, Mar 09, 2010 at 08:31:28AM -0300, Luiz Henrique de Figueiredo wrote:
> > What do I use instead of lua_cpcall()?
> Lua 5.2 will have luaL_cpcall, which is used like this:
>
> /* call 'pmain' in protected mode */
> lua_pushinteger(L, argc); /* 1st argument */
> lua_pushlightuserdata(L, argv); /* 2nd argument */
> status = luaL_cpcall(L, &pmain, 2, 1);
>
> This makes protected C calls even easier to make.
This does indeed look very handy. Thank you for this.
D.
--
Daniel Silverstone http://www.digital-scurf.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69