diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-22 14:47:00 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-22 14:47:00 -0200 |
commit | cb3f95d51696005e69d24b2bbc22f2fc3116b424 (patch) | |
tree | 27440471aa248ee487fa6d850cf57ea82d8721af /lapi.c | |
parent | f84b575cfa52dc832751846aa0b4c8ff437d3ca3 (diff) | |
download | lua-cb3f95d51696005e69d24b2bbc22f2fc3116b424.tar.gz lua-cb3f95d51696005e69d24b2bbc22f2fc3116b424.tar.bz2 lua-cb3f95d51696005e69d24b2bbc22f2fc3116b424.zip |
'lua_cpcall' is deprecated
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.105 2009/12/17 16:20:01 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.106 2009/12/22 15:32:50 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 | */ |
@@ -1148,10 +1148,11 @@ LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1, | |||
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | 1150 | ||
1151 | #if defined(LUA_COMPAT_CPCALL) | ||
1151 | LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud) { | 1152 | LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud) { |
1152 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CPCALL); | 1153 | lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_CPCALL); |
1153 | lua_pushlightuserdata(L, &func); | 1154 | lua_pushlightuserdata(L, &func); |
1154 | lua_pushlightuserdata(L, ud); | 1155 | lua_pushlightuserdata(L, ud); |
1155 | return lua_pcall(L, 2, 0, 0); | 1156 | return lua_pcall(L, 2, 0, 0); |
1156 | } | 1157 | } |
1157 | 1158 | #endif | |