diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-08 15:27:13 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-08 15:27:13 -0300 |
| commit | 8ca9534d048782af13141874e0d2fec0d0f806af (patch) | |
| tree | d58ab47be12ff9d5910ffaf6222cf94bd0dff0f6 /lbuiltin.c | |
| parent | 8bcf6228765e56be19feb90c8805cc2fb2223188 (diff) | |
| download | lua-8ca9534d048782af13141874e0d2fec0d0f806af.tar.gz lua-8ca9534d048782af13141874e0d2fec0d0f806af.tar.bz2 lua-8ca9534d048782af13141874e0d2fec0d0f806af.zip | |
access to `values' in TObject always through macros
Diffstat (limited to 'lbuiltin.c')
| -rw-r--r-- | lbuiltin.c | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbuiltin.c,v 1.113 2000/06/05 20:15:33 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.114 2000/06/06 16:31:41 roberto Exp roberto $ |
| 3 | ** Built-in functions | 3 | ** Built-in functions |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -74,7 +74,7 @@ static Number getnarg (lua_State *L, const Hash *a) { | |||
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | static Hash *gettable (lua_State *L, int arg) { | 76 | static Hash *gettable (lua_State *L, int arg) { |
| 77 | return avalue(luaL_tablearg(L, arg)); | 77 | return hvalue(luaL_tablearg(L, arg)); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /* }====================================================== */ | 80 | /* }====================================================== */ |
| @@ -358,14 +358,14 @@ void luaB_tostring (lua_State *L) { | |||
| 358 | lua_pushobject(L, o); | 358 | lua_pushobject(L, o); |
| 359 | return; | 359 | return; |
| 360 | case TAG_TABLE: | 360 | case TAG_TABLE: |
| 361 | sprintf(buff, "table: %p", o->value.a); | 361 | sprintf(buff, "table: %p", hvalue(o)); |
| 362 | break; | 362 | break; |
| 363 | case TAG_LCLOSURE: case TAG_CCLOSURE: | 363 | case TAG_LCLOSURE: case TAG_CCLOSURE: |
| 364 | sprintf(buff, "function: %p", o->value.cl); | 364 | sprintf(buff, "function: %p", clvalue(o)); |
| 365 | break; | 365 | break; |
| 366 | case TAG_USERDATA: | 366 | case TAG_USERDATA: |
| 367 | sprintf(buff, "userdata: %p(%d)", o->value.ts->u.d.value, | 367 | sprintf(buff, "userdata: %p(%d)", tsvalue(o)->u.d.value, |
| 368 | o->value.ts->u.d.tag); | 368 | tsvalue(o)->u.d.tag); |
| 369 | break; | 369 | break; |
| 370 | case TAG_NIL: | 370 | case TAG_NIL: |
| 371 | lua_pushstring(L, "nil"); | 371 | lua_pushstring(L, "nil"); |
| @@ -602,7 +602,7 @@ static void deprecated_funcs (lua_State *L) { | |||
| 602 | TObject gt; | 602 | TObject gt; |
| 603 | int i; | 603 | int i; |
| 604 | ttype(>) = TAG_TABLE; | 604 | ttype(>) = TAG_TABLE; |
| 605 | avalue(>) = L->gt; | 605 | hvalue(>) = L->gt; |
| 606 | for (i=0; i<num_deprecated; i++) { | 606 | for (i=0; i<num_deprecated; i++) { |
| 607 | lua_pushobject(L, >); | 607 | lua_pushobject(L, >); |
| 608 | lua_pushcclosure(L, deprecated_global_funcs[i].func, 1); | 608 | lua_pushcclosure(L, deprecated_global_funcs[i].func, 1); |
