aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-22 11:40:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-22 11:40:23 -0300
commitf388ee4a822b3d8027ed7c28aa21e9406e4a11eb (patch)
tree33053e6e31ac1dee0fe27ff7fdba64325a624fe1 /lstate.c
parent30ad4c75db38639f52fb1c8be1c5a3f5b58e776f (diff)
downloadlua-f388ee4a822b3d8027ed7c28aa21e9406e4a11eb.tar.gz
lua-f388ee4a822b3d8027ed7c28aa21e9406e4a11eb.tar.bz2
lua-f388ee4a822b3d8027ed7c28aa21e9406e4a11eb.zip
new way to handle errors
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 714fac6a..9725bed5 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.88 2002/03/20 12:52:32 roberto Exp roberto $ 2** $Id: lstate.c,v 1.89 2002/04/16 17:08:28 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*/
@@ -124,7 +124,7 @@ LUA_API lua_State *lua_open (void) {
124 preinit_state(L); 124 preinit_state(L);
125 L->l_G = NULL; 125 L->l_G = NULL;
126 L->next = L->previous = L; 126 L->next = L->previous = L;
127 if (luaD_runprotected(L, f_luaopen, NULL) != 0) { 127 if (luaD_runprotected(L, f_luaopen, &luaO_nilobject, NULL) != 0) {
128 /* memory allocation error: free partial state */ 128 /* memory allocation error: free partial state */
129 close_state(L); 129 close_state(L);
130 L = NULL; 130 L = NULL;