aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lstring.c b/lstring.c
index abc293bd..ee087e9b 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 1.51 2001/01/19 13:20:30 roberto Exp roberto $ 2** $Id: lstring.c,v 1.52 2001/01/26 15:58:50 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*/
@@ -76,6 +76,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
76 } 76 }
77 /* not found */ 77 /* not found */
78 ts = (TString *)luaM_malloc(L, sizestring(l)); 78 ts = (TString *)luaM_malloc(L, sizestring(l));
79 ts->v.ttype = LUA_TSTRING;
79 ts->marked = 0; 80 ts->marked = 0;
80 ts->nexthash = NULL; 81 ts->nexthash = NULL;
81 ts->len = l; 82 ts->len = l;
@@ -91,6 +92,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
91TString *luaS_newudata (lua_State *L, size_t s, void *udata) { 92TString *luaS_newudata (lua_State *L, size_t s, void *udata) {
92 union L_UTString *uts = (union L_UTString *)luaM_malloc(L, sizeudata(s)); 93 union L_UTString *uts = (union L_UTString *)luaM_malloc(L, sizeudata(s));
93 TString *ts = &uts->ts; 94 TString *ts = &uts->ts;
95 ts->v.ttype = LUA_TUSERDATA;
94 ts->marked = 0; 96 ts->marked = 0;
95 ts->nexthash = NULL; 97 ts->nexthash = NULL;
96 ts->len = s; 98 ts->len = s;