lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d3651c1d88b65f3c9947d1f4f443d00f5340b28b
parent 57a7baafb9de49b4fad72b1ee1dc38e5a52c4090
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri,  8 Feb 2002 20:40:47 -0200

`getstr' now gives const char *

Diffstat:
Mlstring.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lstring.c b/lstring.c @@ -53,8 +53,8 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, lu_hash h) { ts->tsv.len = l; ts->tsv.hash = h; ts->tsv.marked = 0; - memcpy(getstr(ts), str, l*sizeof(char)); - getstr(ts)[l] = '\0'; /* ending 0 */ + memcpy(ts+1, str, l*sizeof(char)); + ((char *)(ts+1))[l] = '\0'; /* ending 0 */ tb = &G(L)->strt; h = lmod(h, tb->size); ts->tsv.nexthash = tb->hash[h]; /* chain new entry */