diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-12-10 10:13:36 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-12-10 10:13:36 -0200 |
commit | 47fc57a2529c83376883f36954082cfe80ae588f (patch) | |
tree | c2e57e2f9f7d78279144bfd9cbd04a3b1b131f12 /lobject.c | |
parent | 4d5fe1f54bc00850f77a7c42f9e95d0ff3f1ab5b (diff) | |
download | lua-47fc57a2529c83376883f36954082cfe80ae588f.tar.gz lua-47fc57a2529c83376883f36954082cfe80ae588f.tar.bz2 lua-47fc57a2529c83376883f36954082cfe80ae588f.zip |
`TObject' renamed to `TValue' + other name changes and better assertions
for incremental garbage collection
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 1.98 2003/04/28 13:30:14 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.99 2003/06/10 12:36:26 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -27,7 +27,7 @@ | |||
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | 29 | ||
30 | const TObject luaO_nilobject = {LUA_TNIL, {NULL}}; | 30 | const TValue luaO_nilobject = {LUA_TNIL, {NULL}}; |
31 | 31 | ||
32 | 32 | ||
33 | /* | 33 | /* |
@@ -62,7 +62,7 @@ int luaO_log2 (unsigned int x) { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | int luaO_rawequalObj (const TObject *t1, const TObject *t2) { | 65 | int luaO_rawequalObj (const TValue *t1, const TValue *t2) { |
66 | if (ttype(t1) != ttype(t2)) return 0; | 66 | if (ttype(t1) != ttype(t2)) return 0; |
67 | else switch (ttype(t1)) { | 67 | else switch (ttype(t1)) { |
68 | case LUA_TNIL: | 68 | case LUA_TNIL: |
@@ -93,7 +93,7 @@ int luaO_str2d (const char *s, lua_Number *result) { | |||
93 | 93 | ||
94 | 94 | ||
95 | static void pushstr (lua_State *L, const char *str) { | 95 | static void pushstr (lua_State *L, const char *str) { |
96 | setsvalue2s(L->top, luaS_new(L, str)); | 96 | setsvalue2s(L, L->top, luaS_new(L, str)); |
97 | incr_top(L); | 97 | incr_top(L); |
98 | } | 98 | } |
99 | 99 | ||
@@ -105,7 +105,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { | |||
105 | for (;;) { | 105 | for (;;) { |
106 | const char *e = strchr(fmt, '%'); | 106 | const char *e = strchr(fmt, '%'); |
107 | if (e == NULL) break; | 107 | if (e == NULL) break; |
108 | setsvalue2s(L->top, luaS_newlstr(L, fmt, e-fmt)); | 108 | setsvalue2s(L, L->top, luaS_newlstr(L, fmt, e-fmt)); |
109 | incr_top(L); | 109 | incr_top(L); |
110 | switch (*(e+1)) { | 110 | switch (*(e+1)) { |
111 | case 's': | 111 | case 's': |