aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstring.c b/lstring.c
index 9570e798..a374c965 100644
--- a/lstring.c
+++ b/lstring.c
@@ -40,7 +40,7 @@ int luaS_eqlngstr (TString *a, TString *b) {
40} 40}
41 41
42 42
43unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { 43unsigned luaS_hash (const char *str, size_t l, unsigned seed) {
44 unsigned int h = seed ^ cast_uint(l); 44 unsigned int h = seed ^ cast_uint(l);
45 for (; l > 0; l--) 45 for (; l > 0; l--)
46 h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1])); 46 h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1]));
@@ -48,7 +48,7 @@ unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {
48} 48}
49 49
50 50
51unsigned int luaS_hashlongstr (TString *ts) { 51unsigned luaS_hashlongstr (TString *ts) {
52 lua_assert(ts->tt == LUA_VLNGSTR); 52 lua_assert(ts->tt == LUA_VLNGSTR);
53 if (ts->extra == 0) { /* no hash? */ 53 if (ts->extra == 0) { /* no hash? */
54 size_t len = ts->u.lnglen; 54 size_t len = ts->u.lnglen;
@@ -155,7 +155,7 @@ size_t luaS_sizelngstr (size_t len, int kind) {
155** creates a new string object 155** creates a new string object
156*/ 156*/
157static TString *createstrobj (lua_State *L, size_t totalsize, int tag, 157static TString *createstrobj (lua_State *L, size_t totalsize, int tag,
158 unsigned int h) { 158 unsigned h) {
159 TString *ts; 159 TString *ts;
160 GCObject *o; 160 GCObject *o;
161 o = luaC_newobj(L, tag, totalsize); 161 o = luaC_newobj(L, tag, totalsize);