diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-01 16:09:26 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-01 16:09:26 -0300 |
| commit | 9423e22aa35f47b392fc52a1b93c1be4c69f2aee (patch) | |
| tree | 4d466663bc69a342941ea9830b17014aa76acfb2 /ltests.c | |
| parent | 57f8414de1968b6f9f212140f2da14cba3b6dacb (diff) | |
| download | lua-9423e22aa35f47b392fc52a1b93c1be4c69f2aee.tar.gz lua-9423e22aa35f47b392fc52a1b93c1be4c69f2aee.tar.bz2 lua-9423e22aa35f47b392fc52a1b93c1be4c69f2aee.zip | |
no more L->base + ci->base only for Lua functions (C functions may use
'func')
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.61 2009/04/17 14:28:06 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.62 2009/04/17 22:00:01 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 | */ |
| @@ -43,7 +43,7 @@ void *l_Trick = 0; | |||
| 43 | int islocked = 0; | 43 | int islocked = 0; |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | #define obj_at(L,k) (L->ci->base+(k) - 1) | 46 | #define obj_at(L,k) (L->ci->func + (k)) |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | static void setnameval (lua_State *L, const char *name, int val) { | 49 | static void setnameval (lua_State *L, const char *name, int val) { |
| @@ -514,7 +514,7 @@ static int mem_query (lua_State *L) { | |||
| 514 | 514 | ||
| 515 | 515 | ||
| 516 | static int settrick (lua_State *L) { | 516 | static int settrick (lua_State *L) { |
| 517 | l_Trick = (L->base)->value.gc; | 517 | l_Trick = obj_at(L, 1)->value.gc; |
| 518 | return 0; | 518 | return 0; |
| 519 | } | 519 | } |
| 520 | 520 | ||
