From 333a4f13d084b99c3729414c9c2d66222a8a1fc7 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 18 Nov 1994 17:46:21 -0200 Subject: [PATCH] lua_lock receives its parameter via stack --- fallback.c | 10 +++++----- fallback.h | 3 ++- mathlib.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fallback.c b/fallback.c index 5690be64..f99fe63d 100644 --- a/fallback.c +++ b/fallback.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_fallback="$Id: fallback.c,v 1.5 1994/11/10 17:36:54 roberto Exp roberto $"; +char *rcs_fallback="$Id: fallback.c,v 1.6 1994/11/16 17:38:08 roberto Exp roberto $"; #include @@ -112,16 +112,16 @@ static void GDFB (void) { } static Object *lockArray = NULL; static int lockSize = 0; -int lua_lock (lua_Object object) +int luaI_lock (Object *object) { int i; int oldSize; - if (lua_isnil(object)) + if (tag(object) == LUA_T_NIL) return -1; for (i=0; i /* NULL */ #include @@ -310,5 +310,5 @@ void mathlib_open (void) lua_register ("exp", math_exp); lua_register ("deg", math_deg); lua_register ("rad", math_rad); - old_pow = lua_lock(lua_setfallback("arith", math_pow)); + old_pow = lua_lockobject(lua_setfallback("arith", math_pow)); }