aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-11 18:23:01 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-11 18:23:01 -0200
commitb7ae43d457ca7b5a46ca768f482b334d70897a14 (patch)
tree0f47c94c9ee6ac5ab21b7bf3c1495f1f42d55889 /lstring.c
parentf083812c020186d0d919833100c1a0b6eda8c2c0 (diff)
downloadlua-b7ae43d457ca7b5a46ca768f482b334d70897a14.tar.gz
lua-b7ae43d457ca7b5a46ca768f482b334d70897a14.tar.bz2
lua-b7ae43d457ca7b5a46ca768f482b334d70897a14.zip
detail
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lstring.c b/lstring.c
index d12b6f0f..27e3214b 100644
--- a/lstring.c
+++ b/lstring.c
@@ -68,7 +68,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, lu_hash h) {
68 68
69TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { 69TString *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 */