lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 93869acb2c33060b6a6f87ac80cd5d229ef8211f
parent 480a1da34a496898d4cd3a9c695476e4f0a264fc
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Mon, 23 Jun 2008 13:50:11 -0300

"test trick" seems more useful with pointers instead of integers

Diffstat:
Mltests.c | 6+++---
Mltests.h | 4++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ltests.c b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.50 2008/06/13 14:15:59 roberto Exp roberto $ +** $Id: ltests.c,v 2.51 2008/06/13 17:07:10 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -37,7 +37,7 @@ #if defined(LUA_DEBUG) -int l_Trick = 0; +void *l_Trick = 0; int islocked = 0; @@ -507,7 +507,7 @@ static int mem_query (lua_State *L) { static int settrick (lua_State *L) { - l_Trick = lua_tointeger(L, 1); + l_Trick = (L->base)->value.gc; return 0; } diff --git a/ltests.h b/ltests.h @@ -1,5 +1,5 @@ /* -** $Id: ltests.h,v 2.19 2007/09/30 13:09:43 roberto Exp roberto $ +** $Id: ltests.h,v 2.20 2007/11/12 16:28:45 roberto Exp roberto $ ** Internal Header for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -36,7 +36,7 @@ LUAI_DATA Memcontrol l_memcontrol; /* ** generic variable for debug tricks */ -LUAI_DATA int l_Trick; +LUAI_DATA void *l_Trick; void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize);