aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-01 11:56:49 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-01 11:56:49 -0200
commit68587639945aa68844871fdd74a6729b653f523a (patch)
treecc0efe84ea56f5b03d176768a9771b57bcb5c154 /lapi.c
parentb68fb7f62e1475e28a4cb27569e8b659f925e114 (diff)
downloadlua-68587639945aa68844871fdd74a6729b653f523a.tar.gz
lua-68587639945aa68844871fdd74a6729b653f523a.tar.bz2
lua-68587639945aa68844871fdd74a6729b653f523a.zip
bug in lua_pushuserdata(L, NULL)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 614d237e..bf66e3e9 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 1.121 2001/01/26 11:45:51 roberto Exp roberto $ 2** $Id: lapi.c,v 1.122 2001/01/29 17:16:58 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -702,6 +702,7 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size) {
702 TString *ts; 702 TString *ts;
703 void *p; 703 void *p;
704 LUA_LOCK; 704 LUA_LOCK;
705 if (size == 0) size = 1;
705 ts = luaS_newudata(L, size, NULL); 706 ts = luaS_newudata(L, size, NULL);
706 setuvalue(L->top, ts); 707 setuvalue(L->top, ts);
707 api_incr_top(L); 708 api_incr_top(L);