summaryrefslogtreecommitdiff
path: root/lib/lua/src/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lua/src/ldo.c')
-rw-r--r--lib/lua/src/ldo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/lua/src/ldo.c b/lib/lua/src/ldo.c
index 082b9e6..b23f8b1 100644
--- a/lib/lua/src/ldo.c
+++ b/lib/lua/src/ldo.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldo.c,v 1.7 2004-12-27 19:59:05 pixel Exp $
+** $Id: ldo.c,v 1.8 2004-12-27 22:18:53 pixel Exp $
** Stack and Call structure of Lua
** See Copyright Notice in lua.h
*/
@@ -257,7 +257,11 @@ StkId luaD_precall (lua_State *L, StkId func) {
#ifdef LUA_COMPATUPVALUES
lua_pushupvalues(L);
#endif
- n = (*clvalue(L->base - 1)->c.f)(L); /* do the actual call */
+ if (L->callwrap) {
+ n = L->callwrap(L, clvalue(L->base - 1)->c.f); /* wrap the call */
+ } else {
+ n = (*clvalue(L->base - 1)->c.f)(L); /* do the actual call */
+ }
lua_lock(L);
return L->top - n;
}