aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-08 09:20:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-08 09:20:26 -0300
commit85fc9ecd5f5d2af63d48f6ac2bb46217e3fa6a04 (patch)
tree7af2b7045726484cf70711c0c1faf2250e92ba6f
parent2a21f6c894e23a201f4028cd222a5790b79018fe (diff)
downloadlua-85fc9ecd5f5d2af63d48f6ac2bb46217e3fa6a04.tar.gz
lua-85fc9ecd5f5d2af63d48f6ac2bb46217e3fa6a04.tar.bz2
lua-85fc9ecd5f5d2af63d48f6ac2bb46217e3fa6a04.zip
detail ('G(L)' -> 'g')
-rw-r--r--ldo.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ldo.c b/ldo.c
index 0ed17b25..05c6d551 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.c,v 2.127 2014/08/01 17:33:08 roberto Exp roberto $ 2** $Id: ldo.c,v 2.128 2014/10/07 18:29:13 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -111,15 +111,16 @@ l_noret luaD_throw (lua_State *L, int errcode) {
111 LUAI_THROW(L, L->errorJmp); /* jump to it */ 111 LUAI_THROW(L, L->errorJmp); /* jump to it */
112 } 112 }
113 else { /* thread has no error handler */ 113 else { /* thread has no error handler */
114 global_State *g = G(L);
114 L->status = cast_byte(errcode); /* mark it as dead */ 115 L->status = cast_byte(errcode); /* mark it as dead */
115 if (G(L)->mainthread->errorJmp) { /* main thread has a handler? */ 116 if (g->mainthread->errorJmp) { /* main thread has a handler? */
116 setobjs2s(L, G(L)->mainthread->top++, L->top - 1); /* copy error obj. */ 117 setobjs2s(L, g->mainthread->top++, L->top - 1); /* copy error obj. */
117 luaD_throw(G(L)->mainthread, errcode); /* re-throw in main thread */ 118 luaD_throw(g->mainthread, errcode); /* re-throw in main thread */
118 } 119 }
119 else { /* no handler at all; abort */ 120 else { /* no handler at all; abort */
120 if (G(L)->panic) { /* panic function? */ 121 if (g->panic) { /* panic function? */
121 lua_unlock(L); 122 lua_unlock(L);
122 G(L)->panic(L); /* call it (last chance to jump out) */ 123 g->panic(L); /* call it (last chance to jump out) */
123 } 124 }
124 abort(); 125 abort();
125 } 126 }