diff options
| -rw-r--r-- | lobject.c | 5 | ||||
| -rw-r--r-- | lvm.c | 6 | ||||
| -rw-r--r-- | lvm.h | 4 |
3 files changed, 7 insertions, 8 deletions
| @@ -1,12 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 1.80 2002/05/15 18:57:44 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.81 2002/05/16 18:39:46 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 | */ |
| 6 | 6 | ||
| 7 | #include <ctype.h> | 7 | #include <ctype.h> |
| 8 | #include <stdarg.h> | 8 | #include <stdarg.h> |
| 9 | #include <stdio.h> | ||
| 10 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| 11 | #include <string.h> | 10 | #include <string.h> |
| 12 | 11 | ||
| @@ -135,7 +134,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { | |||
| 135 | fmt = e+2; | 134 | fmt = e+2; |
| 136 | } | 135 | } |
| 137 | pushstr(L, fmt); | 136 | pushstr(L, fmt); |
| 138 | luaV_strconc(L, n+1, L->top - L->ci->base - 1); | 137 | luaV_concat(L, n+1, L->top - L->ci->base - 1); |
| 139 | L->top -= n; | 138 | L->top -= n; |
| 140 | return svalue(L->top - 1); | 139 | return svalue(L->top - 1); |
| 141 | } | 140 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.232 2002/05/15 18:57:44 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.233 2002/05/27 20:35:40 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -239,7 +239,7 @@ int luaV_cmp (lua_State *L, const TObject *l, const TObject *r, int cond) { | |||
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | 241 | ||
| 242 | void luaV_strconc (lua_State *L, int total, int last) { | 242 | void luaV_concat (lua_State *L, int total, int last) { |
| 243 | do { | 243 | do { |
| 244 | StkId top = L->ci->base + last + 1; | 244 | StkId top = L->ci->base + last + 1; |
| 245 | int n = 2; /* number of elements handled in this pass (at least 2) */ | 245 | int n = 2; /* number of elements handled in this pass (at least 2) */ |
| @@ -443,7 +443,7 @@ StkId luaV_execute (lua_State *L) { | |||
| 443 | case OP_CONCAT: { | 443 | case OP_CONCAT: { |
| 444 | int b = GETARG_B(i); | 444 | int b = GETARG_B(i); |
| 445 | int c = GETARG_C(i); | 445 | int c = GETARG_C(i); |
| 446 | luaV_strconc(L, c-b+1, c); /* may change `base' (and `ra') */ | 446 | luaV_concat(L, c-b+1, c); /* may change `base' (and `ra') */ |
| 447 | setobj(base+GETARG_A(i), base+b); | 447 | setobj(base+GETARG_A(i), base+b); |
| 448 | luaV_checkGC(L, base+c+1); | 448 | luaV_checkGC(L, base+c+1); |
| 449 | break; | 449 | break; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.h,v 1.38 2002/03/19 12:45:25 roberto Exp roberto $ | 2 | ** $Id: lvm.h,v 1.39 2002/05/06 15:51:41 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -25,6 +25,6 @@ int luaV_tostring (lua_State *L, TObject *obj); | |||
| 25 | void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res); | 25 | void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res); |
| 26 | void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val); | 26 | void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val); |
| 27 | StkId luaV_execute (lua_State *L); | 27 | StkId luaV_execute (lua_State *L); |
| 28 | void luaV_strconc (lua_State *L, int total, int last); | 28 | void luaV_concat (lua_State *L, int total, int last); |
| 29 | 29 | ||
| 30 | #endif | 30 | #endif |
