From 5645a84368f2a515281da60f96e09d0fdeaf0470 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 24 Sep 2011 18:11:29 -0300 Subject: [PATCH] detail about 'trick' function (nil turn it off) --- ltests.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ltests.c b/ltests.c index 07bde473..68306617 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.121 2011/07/02 15:59:17 roberto Exp roberto $ +** $Id: ltests.c,v 2.122 2011/08/23 17:24:34 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -595,7 +595,10 @@ static int mem_query (lua_State *L) { static int settrick (lua_State *L) { - l_Trick = gcvalue(obj_at(L, 1)); + if (ttisnil(obj_at(L, 1))) + l_Trick = NULL; + else + l_Trick = gcvalue(obj_at(L, 1)); return 0; }