diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:51 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:51 -0200 |
| commit | 291f564485d8968fc7b0d043dda5ff91a7ce604b (patch) | |
| tree | 4949c3a32f797f1188963006eaafdab504649f26 /lstring.c | |
| parent | 9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb (diff) | |
| download | lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.tar.gz lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.tar.bz2 lua-291f564485d8968fc7b0d043dda5ff91a7ce604b.zip | |
field 'reserved' -> 'extra' (may be used for other purposes too)
Diffstat (limited to 'lstring.c')
| -rw-r--r-- | lstring.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstring.c,v 2.18 2010/05/10 18:23:45 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 2.19 2011/05/03 16:01:57 roberto Exp roberto $ |
| 3 | ** String table (keeps all strings handled by Lua) | 3 | ** String table (keeps all strings handled by Lua) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -65,7 +65,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l, | |||
| 65 | ts = &luaC_newobj(L, LUA_TSTRING, totalsize, list, 0)->ts; | 65 | ts = &luaC_newobj(L, LUA_TSTRING, totalsize, list, 0)->ts; |
| 66 | ts->tsv.len = l; | 66 | ts->tsv.len = l; |
| 67 | ts->tsv.hash = h; | 67 | ts->tsv.hash = h; |
| 68 | ts->tsv.reserved = 0; | 68 | ts->tsv.extra = 0; |
| 69 | memcpy(ts+1, str, l*sizeof(char)); | 69 | memcpy(ts+1, str, l*sizeof(char)); |
| 70 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ | 70 | ((char *)(ts+1))[l] = '\0'; /* ending 0 */ |
| 71 | tb->nuse++; | 71 | tb->nuse++; |
