summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-26 10:47:05 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-10-26 10:47:05 -0200
commitb892f0a8774f573d7ec9b02617428871b8d3a2b3 (patch)
tree4aab88443264d84d314ca663cf3c30b48c7e9107 /lstate.c
parentaadc35449ec2752c298a7a8fa6359a3a12c538ee (diff)
downloadlua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.tar.gz
lua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.tar.bz2
lua-b892f0a8774f573d7ec9b02617428871b8d3a2b3.zip
new API function `createuserdata'
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index ba7ed328..4593e5eb 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.45 2000/10/20 16:39:03 roberto Exp roberto $ 2** $Id: lstate.c,v 1.46 2000/10/24 19:12:06 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*/
@@ -98,6 +98,7 @@ LUA_API lua_State *lua_open (int stacksize) {
98 98
99 99
100LUA_API void lua_close (lua_State *L) { 100LUA_API void lua_close (lua_State *L) {
101 LUA_ASSERT(L != lua_state || lua_gettop(L) == 0, "garbage in C stack");
101 luaC_collect(L, 1); /* collect all elements */ 102 luaC_collect(L, 1); /* collect all elements */
102 LUA_ASSERT(L->rootproto == NULL, "list should be empty"); 103 LUA_ASSERT(L->rootproto == NULL, "list should be empty");
103 LUA_ASSERT(L->rootcl == NULL, "list should be empty"); 104 LUA_ASSERT(L->rootcl == NULL, "list should be empty");