diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-06-23 13:50:34 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-06-23 13:50:34 -0300 |
| commit | 93869acb2c33060b6a6f87ac80cd5d229ef8211f (patch) | |
| tree | e1a79468461c499181d0050390c8c94c6544f9e2 | |
| parent | 480a1da34a496898d4cd3a9c695476e4f0a264fc (diff) | |
| download | lua-93869acb2c33060b6a6f87ac80cd5d229ef8211f.tar.gz lua-93869acb2c33060b6a6f87ac80cd5d229ef8211f.tar.bz2 lua-93869acb2c33060b6a6f87ac80cd5d229ef8211f.zip | |
"test trick" seems more useful with pointers instead of integers
| -rw-r--r-- | ltests.c | 6 | ||||
| -rw-r--r-- | ltests.h | 4 |
2 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.50 2008/06/13 14:15:59 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.51 2008/06/13 17:07:10 roberto Exp roberto $ |
| 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 | */ |
| @@ -37,7 +37,7 @@ | |||
| 37 | #if defined(LUA_DEBUG) | 37 | #if defined(LUA_DEBUG) |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | int l_Trick = 0; | 40 | void *l_Trick = 0; |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | int islocked = 0; | 43 | int islocked = 0; |
| @@ -507,7 +507,7 @@ static int mem_query (lua_State *L) { | |||
| 507 | 507 | ||
| 508 | 508 | ||
| 509 | static int settrick (lua_State *L) { | 509 | static int settrick (lua_State *L) { |
| 510 | l_Trick = lua_tointeger(L, 1); | 510 | l_Trick = (L->base)->value.gc; |
| 511 | return 0; | 511 | return 0; |
| 512 | } | 512 | } |
| 513 | 513 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.h,v 2.19 2007/09/30 13:09:43 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.20 2007/11/12 16:28:45 roberto Exp roberto $ |
| 3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -36,7 +36,7 @@ LUAI_DATA Memcontrol l_memcontrol; | |||
| 36 | /* | 36 | /* |
| 37 | ** generic variable for debug tricks | 37 | ** generic variable for debug tricks |
| 38 | */ | 38 | */ |
| 39 | LUAI_DATA int l_Trick; | 39 | LUAI_DATA void *l_Trick; |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize); | 42 | void *debug_realloc (void *ud, void *block, size_t osize, size_t nsize); |
