diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:23:01 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:23:01 -0200 |
commit | b7ae43d457ca7b5a46ca768f482b334d70897a14 (patch) | |
tree | 0f47c94c9ee6ac5ab21b7bf3c1495f1f42d55889 /lstring.c | |
parent | f083812c020186d0d919833100c1a0b6eda8c2c0 (diff) | |
download | lua-b7ae43d457ca7b5a46ca768f482b334d70897a14.tar.gz lua-b7ae43d457ca7b5a46ca768f482b334d70897a14.tar.bz2 lua-b7ae43d457ca7b5a46ca768f482b334d70897a14.zip |
detail
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -68,7 +68,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, lu_hash h) { | |||
68 | 68 | ||
69 | TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { | 69 | TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { |
70 | TString *ts; | 70 | TString *ts; |
71 | lu_hash h = l; /* seed */ | 71 | lu_hash h = (lu_hash)l; /* seed */ |
72 | size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */ | 72 | size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */ |
73 | size_t l1; | 73 | size_t l1; |
74 | for (l1=l; l1>=step; l1-=step) /* compute hash */ | 74 | for (l1=l; l1>=step; l1-=step) /* compute hash */ |