diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-09 18:22:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-09 18:22:29 -0200 |
commit | d2e340f467a46017fa3526074c1756124e569880 (patch) | |
tree | e5b08773a0f0734193b0c1c435fab8ee243f08dc /lvm.c | |
parent | 6875fdc8be9029b1bb29379c59d5409a0df42c10 (diff) | |
download | lua-d2e340f467a46017fa3526074c1756124e569880.tar.gz lua-d2e340f467a46017fa3526074c1756124e569880.tar.bz2 lua-d2e340f467a46017fa3526074c1756124e569880.zip |
string pointers are always fully aligned
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.166 2001/02/07 18:13:49 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.167 2001/02/09 18:07:47 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 | */ |
@@ -225,9 +225,9 @@ static void call_arith (lua_State *L, StkId p1, TMS event) { | |||
225 | 225 | ||
226 | 226 | ||
227 | static int luaV_strlessthan (const TString *ls, const TString *rs) { | 227 | static int luaV_strlessthan (const TString *ls, const TString *rs) { |
228 | const char *l = ls->str; | 228 | const char *l = getstr(ls); |
229 | size_t ll = ls->len; | 229 | size_t ll = ls->len; |
230 | const char *r = rs->str; | 230 | const char *r = getstr(rs); |
231 | size_t lr = rs->len; | 231 | size_t lr = rs->len; |
232 | for (;;) { | 232 | for (;;) { |
233 | int temp = strcoll(l, r); | 233 | int temp = strcoll(l, r); |
@@ -281,7 +281,7 @@ void luaV_strconc (lua_State *L, int total, StkId top) { | |||
281 | tl = 0; | 281 | tl = 0; |
282 | for (i=n; i>0; i--) { /* concat all strings */ | 282 | for (i=n; i>0; i--) { /* concat all strings */ |
283 | size_t l = tsvalue(top-i)->len; | 283 | size_t l = tsvalue(top-i)->len; |
284 | memcpy(buffer+tl, tsvalue(top-i)->str, l); | 284 | memcpy(buffer+tl, svalue(top-i), l); |
285 | tl += l; | 285 | tl += l; |
286 | } | 286 | } |
287 | setsvalue(top-n, luaS_newlstr(L, buffer, tl)); | 287 | setsvalue(top-n, luaS_newlstr(L, buffer, tl)); |