From 2cf954b8ae08a9094354551ee3733f4ff8078443 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 8 Nov 1994 17:56:39 -0200 Subject: lock mechanism --- opcode.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'opcode.c') diff --git a/opcode.c b/opcode.c index 0c30069b..1f6573cd 100644 --- a/opcode.c +++ b/opcode.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 3.4 1994/11/07 16:34:44 roberto Exp roberto $"; +char *rcs_opcode="$Id: opcode.c,v 3.5 1994/11/07 18:27:39 roberto Exp $"; #include #include @@ -545,14 +545,24 @@ void *lua_getuserdata (lua_Object object) else return (uvalue(Address(object))); } + +lua_Object lua_getlocked (int ref) +{ + adjustC(0); + *(top++) = *luaI_getlocked(ref); + CBase++; /* incorporate object in the stack */ + return Ref(top-1); +} + /* ** Get a global object. Return the object handle or NULL on error. */ lua_Object lua_getglobal (char *name) { int n = lua_findsymbol(name); - if (n < 0) return 0; + adjustC(0); *(top++) = s_object(n); + CBase++; /* incorporate object in the stack */ return Ref(top-1); } -- cgit v1.2.3-55-g6feb