aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-11-06 19:41:43 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-11-06 19:41:43 -0200
commitfd48dcc7c8734091181d8d0e54b0ba3d1770f4c3 (patch)
tree21eea2fd15fc1431642fa9f86edc0c8a5b80100f /ltests.c
parent617008f5521030d0a99432efda5af0ef705f25c9 (diff)
downloadlua-fd48dcc7c8734091181d8d0e54b0ba3d1770f4c3.tar.gz
lua-fd48dcc7c8734091181d8d0e54b0ba3d1770f4c3.tar.bz2
lua-fd48dcc7c8734091181d8d0e54b0ba3d1770f4c3.zip
details.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index 90179586..a7e2d829 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 1.94 2001/10/25 19:14:14 roberto Exp $ 2** $Id: ltests.c,v 1.95 2001/10/26 17:33:30 roberto Exp $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -312,9 +312,10 @@ static int string_query (lua_State *L) {
312 312
313static int tref (lua_State *L) { 313static int tref (lua_State *L) {
314 int level = lua_gettop(L); 314 int level = lua_gettop(L);
315 int lock = luaL_opt_int(L, 2, 1);
315 luaL_check_any(L, 1); 316 luaL_check_any(L, 1);
316 lua_pushvalue(L, 1); 317 lua_pushvalue(L, 1);
317 lua_pushnumber(L, lua_ref(L, 1)); 318 lua_pushnumber(L, lua_ref(L, lock));
318 assert(lua_gettop(L) == level+1); /* +1 for result */ 319 assert(lua_gettop(L) == level+1); /* +1 for result */
319 return 1; 320 return 1;
320} 321}