diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.206 2010/03/29 17:44:31 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.207 2010/04/09 16:14:46 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -766,14 +766,3 @@ LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) { | |||
766 | ver, *v); | 766 | ver, *v); |
767 | } | 767 | } |
768 | 768 | ||
769 | |||
770 | LUALIB_API int luaL_cpcall (lua_State *L, lua_CFunction f, int nargs, | ||
771 | int nresults) { | ||
772 | nargs++; /* to include function itself */ | ||
773 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CCALL); | ||
774 | lua_insert(L, -nargs); /* 'ccall' is real function to be called */ | ||
775 | lua_pushlightuserdata(L, &f); | ||
776 | lua_insert(L, -nargs); /* 'f' address is its first argument */ | ||
777 | return lua_pcall(L, nargs, nresults, 0); | ||
778 | } | ||
779 | |||