diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-04 16:38:35 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-04 16:38:35 -0300 |
commit | 435f587ed05e2c4d542e1db9ae9e4efbb7e02305 (patch) | |
tree | 1b179bf836cfdaf8ed74df24c2d22cda8f07aaa9 /lstring.c | |
parent | ae55f3eeada102f3fa8345173410feaf1db42cde (diff) | |
download | lua-435f587ed05e2c4d542e1db9ae9e4efbb7e02305.tar.gz lua-435f587ed05e2c4d542e1db9ae9e4efbb7e02305.tar.bz2 lua-435f587ed05e2c4d542e1db9ae9e4efbb7e02305.zip |
(much) better handling of memory alloction errors
Diffstat (limited to 'lstring.c')
-rw-r--r-- | lstring.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.c,v 1.39 2000/06/15 17:01:12 roberto Exp roberto $ | 2 | ** $Id: lstring.c,v 1.40 2000/06/30 14:35:17 roberto Exp $ |
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 | */ |
@@ -19,10 +19,10 @@ | |||
19 | 19 | ||
20 | 20 | ||
21 | void luaS_init (lua_State *L) { | 21 | void luaS_init (lua_State *L) { |
22 | L->strt.size = L->udt.size = 1; | ||
23 | L->strt.nuse = L->udt.nuse = 0; | ||
24 | L->strt.hash = luaM_newvector(L, 1, TString *); | 22 | L->strt.hash = luaM_newvector(L, 1, TString *); |
25 | L->udt.hash = luaM_newvector(L, 1, TString *); | 23 | L->udt.hash = luaM_newvector(L, 1, TString *); |
24 | L->strt.size = L->udt.size = 1; | ||
25 | L->strt.nuse = L->udt.nuse = 0; | ||
26 | L->strt.hash[0] = L->udt.hash[0] = NULL; | 26 | L->strt.hash[0] = L->udt.hash[0] = NULL; |
27 | } | 27 | } |
28 | 28 | ||