lua-users home
lua-l archive

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

> 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.