[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_cpcall() removed in 5.2?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 9 Mar 2010 08:31:28 -0300
> 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.