lua-users home
lua-l archive

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


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