diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-22 14:06:11 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-22 14:06:11 -0300 |
| commit | 9fa63a62682c1353eeabd4575152941fa6f3e70f (patch) | |
| tree | 1aad2dd0de78388f6be134399ae4183692ce377f /lstring.c | |
| parent | 0593256707ceddb1bc9cd4b25b822a7fbcfedd66 (diff) | |
| download | lua-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -40,7 +40,7 @@ int luaS_eqlngstr (TString *a, TString *b) { | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { | 43 | unsigned 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 | ||
| 51 | unsigned int luaS_hashlongstr (TString *ts) { | 51 | unsigned 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 | */ |
| 157 | static TString *createstrobj (lua_State *L, size_t totalsize, int tag, | 157 | static 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); |
