diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-05 15:43:54 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-05 15:43:54 -0200 |
commit | 9756f56354af72d62b4f63c85000d4ae1db6b130 (patch) | |
tree | 93d9ddf16bf75b75be809611f7d11e046bfb6927 /ltests.c | |
parent | b7d5f18d71f691df752e220f844ea613a8f6d722 (diff) | |
download | lua-9756f56354af72d62b4f63c85000d4ae1db6b130.tar.gz lua-9756f56354af72d62b4f63c85000d4ae1db6b130.tar.bz2 lua-9756f56354af72d62b4f63c85000d4ae1db6b130.zip |
better control over accesses to TValue fields
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.76 2009/10/11 20:02:19 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.77 2009/10/23 19:12:19 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 | */ |
@@ -203,7 +203,7 @@ static int testobjref (global_State *g, GCObject *f, GCObject *t) { | |||
203 | #define checkobjref(g,f,t) lua_assert(testobjref(g,f,obj2gco(t))) | 203 | #define checkobjref(g,f,t) lua_assert(testobjref(g,f,obj2gco(t))) |
204 | 204 | ||
205 | #define checkvalref(g,f,t) lua_assert(!iscollectable(t) || \ | 205 | #define checkvalref(g,f,t) lua_assert(!iscollectable(t) || \ |
206 | ((ttype(t) == gch((t)->value.gc)->tt) && testobjref(g,f,gcvalue(t)))) | 206 | ((ttype(t) == gch(gcvalue(t))->tt) && testobjref(g,f,gcvalue(t)))) |
207 | 207 | ||
208 | 208 | ||
209 | 209 | ||
@@ -513,7 +513,7 @@ static int mem_query (lua_State *L) { | |||
513 | 513 | ||
514 | 514 | ||
515 | static int settrick (lua_State *L) { | 515 | static int settrick (lua_State *L) { |
516 | l_Trick = obj_at(L, 1)->value.gc; | 516 | l_Trick = gcvalue(obj_at(L, 1)); |
517 | return 0; | 517 | return 0; |
518 | } | 518 | } |
519 | 519 | ||