no more 'ccall' nor 'cpcall' functions. (With light C functions they

are obsolete.)
This commit is contained in:
Roberto Ierusalimschy
2010-04-14 12:14:21 -03:00
parent 7dfa4cd655
commit afdb19ac82
5 changed files with 8 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.206 2010/03/29 17:44:31 roberto Exp roberto $
** $Id: lauxlib.c,v 1.207 2010/04/09 16:14:46 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -766,14 +766,3 @@ LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) {
ver, *v);
}
LUALIB_API int luaL_cpcall (lua_State *L, lua_CFunction f, int nargs,
int nresults) {
nargs++; /* to include function itself */
lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CCALL);
lua_insert(L, -nargs); /* 'ccall' is real function to be called */
lua_pushlightuserdata(L, &f);
lua_insert(L, -nargs); /* 'f' address is its first argument */
return lua_pcall(L, nargs, nresults, 0);
}