diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-21 14:49:21 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-21 14:49:21 -0200 |
commit | 4f5f2fe36732d7809a4c0e0856cb9aca02e9ce24 (patch) | |
tree | cf1a2ef6793c58c4424248b2aff88e457a46a000 /lapi.c | |
parent | 01586d539e214f844fc34dd552ff06843ac0c4f9 (diff) | |
download | lua-4f5f2fe36732d7809a4c0e0856cb9aca02e9ce24.tar.gz lua-4f5f2fe36732d7809a4c0e0856cb9aca02e9ce24.tar.bz2 lua-4f5f2fe36732d7809a4c0e0856cb9aca02e9ce24.zip |
new function 'luaL_cpcall'
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.110 2010/01/11 17:38:30 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.111 2010/01/13 16:18:25 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -1150,12 +1150,3 @@ LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, | |||
1150 | luaC_objbarrier(L, f1, *up2); | 1150 | luaC_objbarrier(L, f1, *up2); |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | |||
1154 | #if defined(LUA_COMPAT_CPCALL) | ||
1155 | LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud) { | ||
1156 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CPCALL); | ||
1157 | lua_pushlightuserdata(L, &func); | ||
1158 | lua_pushlightuserdata(L, ud); | ||
1159 | return lua_pcall(L, 2, 0, 0); | ||
1160 | } | ||
1161 | #endif | ||