aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-19 13:52:40 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-11-19 13:52:40 -0200
commit6f1ea817f5827523f8c7e429ab023e5984a84343 (patch)
tree778c20b8816afb4ee5cfc3b988ec1c31efbb7b75 /lstate.c
parentcdcb236747a728e3ef0855aa16a42b73e7a9a6c6 (diff)
downloadlua-6f1ea817f5827523f8c7e429ab023e5984a84343.tar.gz
lua-6f1ea817f5827523f8c7e429ab023e5984a84343.tar.bz2
lua-6f1ea817f5827523f8c7e429ab023e5984a84343.zip
better control over memory-size overflows
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstate.c b/lstate.c
index 1e11c9bf..2f5031d5 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.14 2004/09/15 20:39:42 roberto Exp roberto $ 2** $Id: lstate.c,v 2.15 2004/10/06 18:34:16 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -79,7 +79,7 @@ static void f_luaopen (lua_State *L, void *ud) {
79 Udata *u; /* head of udata list */ 79 Udata *u; /* head of udata list */
80 global_State *g = G(L); 80 global_State *g = G(L);
81 UNUSED(ud); 81 UNUSED(ud);
82 u = cast(Udata *, luaM_malloc(L, sizeudata(0))); 82 u = luaM_new(L, Udata);
83 u->uv.len = 0; 83 u->uv.len = 0;
84 u->uv.metatable = NULL; 84 u->uv.metatable = NULL;
85 g->firstudata = obj2gco(u); 85 g->firstudata = obj2gco(u);