aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-03-22 14:06:11 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-03-22 14:06:11 -0300
commit9fa63a62682c1353eeabd4575152941fa6f3e70f (patch)
tree1aad2dd0de78388f6be134399ae4183692ce377f /lstring.c
parent0593256707ceddb1bc9cd4b25b822a7fbcfedd66 (diff)
downloadlua-9fa63a62682c1353eeabd4575152941fa6f3e70f.tar.gz
lua-9fa63a62682c1353eeabd4575152941fa6f3e70f.tar.bz2
lua-9fa63a62682c1353eeabd4575152941fa6f3e70f.zip
Some 'unsigned int' changed to 'unsigned'
'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...)
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);