diff options
Diffstat (limited to 'lstring.c')
| -rw-r--r-- | lstring.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -164,7 +164,7 @@ size_t luaS_sizelngstr (size_t len, int kind) { | |||
| 164 | /* | 164 | /* |
| 165 | ** creates a new string object | 165 | ** creates a new string object |
| 166 | */ | 166 | */ |
| 167 | static TString *createstrobj (lua_State *L, size_t totalsize, int tag, | 167 | static TString *createstrobj (lua_State *L, size_t totalsize, lu_byte tag, |
| 168 | unsigned h) { | 168 | unsigned h) { |
| 169 | TString *ts; | 169 | TString *ts; |
| 170 | GCObject *o; | 170 | GCObject *o; |
| @@ -233,7 +233,7 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) { | |||
| 233 | list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */ | 233 | list = &tb->hash[lmod(h, tb->size)]; /* rehash with new size */ |
| 234 | } | 234 | } |
| 235 | ts = createstrobj(L, sizestrshr(l), LUA_VSHRSTR, h); | 235 | ts = createstrobj(L, sizestrshr(l), LUA_VSHRSTR, h); |
| 236 | ts->shrlen = cast_byte(l); | 236 | ts->shrlen = cast(ls_byte, l); |
| 237 | getshrstr(ts)[l] = '\0'; /* ending 0 */ | 237 | getshrstr(ts)[l] = '\0'; /* ending 0 */ |
| 238 | memcpy(getshrstr(ts), str, l * sizeof(char)); | 238 | memcpy(getshrstr(ts), str, l * sizeof(char)); |
| 239 | ts->u.hnext = *list; | 239 | ts->u.hnext = *list; |
| @@ -283,7 +283,7 @@ TString *luaS_new (lua_State *L, const char *str) { | |||
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | 285 | ||
| 286 | Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue) { | 286 | Udata *luaS_newudata (lua_State *L, size_t s, unsigned short nuvalue) { |
| 287 | Udata *u; | 287 | Udata *u; |
| 288 | int i; | 288 | int i; |
| 289 | GCObject *o; | 289 | GCObject *o; |
| @@ -301,7 +301,7 @@ Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue) { | |||
| 301 | 301 | ||
| 302 | 302 | ||
| 303 | struct NewExt { | 303 | struct NewExt { |
| 304 | int kind; | 304 | ls_byte kind; |
| 305 | const char *s; | 305 | const char *s; |
| 306 | size_t len; | 306 | size_t len; |
| 307 | TString *ts; /* output */ | 307 | TString *ts; /* output */ |
