aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lstring.c b/lstring.c
index 0c82220e..768d064f 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.5 2004/11/24 19:16:03 roberto Exp $ 2** $Id: lstring.c,v 2.6 2005/01/18 17:18:09 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*/
@@ -93,7 +93,7 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
93} 93}
94 94
95 95
96Udata *luaS_newudata (lua_State *L, size_t s) { 96Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
97 Udata *u; 97 Udata *u;
98 if (s > MAX_SIZET - sizeof(Udata)) 98 if (s > MAX_SIZET - sizeof(Udata))
99 luaM_toobig(L); 99 luaM_toobig(L);
@@ -102,6 +102,7 @@ Udata *luaS_newudata (lua_State *L, size_t s) {
102 u->uv.tt = LUA_TUSERDATA; 102 u->uv.tt = LUA_TUSERDATA;
103 u->uv.len = s; 103 u->uv.len = s;
104 u->uv.metatable = NULL; 104 u->uv.metatable = NULL;
105 u->uv.env = e;
105 /* chain it on udata list (after main thread) */ 106 /* chain it on udata list (after main thread) */
106 u->uv.next = G(L)->mainthread->next; 107 u->uv.next = G(L)->mainthread->next;
107 G(L)->mainthread->next = obj2gco(u); 108 G(L)->mainthread->next = obj2gco(u);