diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-28 17:21:06 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-28 17:21:06 -0300 |
| commit | 014a09c5095be3ef11366530e4630ee817a526a7 (patch) | |
| tree | 1460ff0d01cd4adf8fac2609ca2ba90411babf2c /ldo.c | |
| parent | b62228297372c7b24b6661ac1bdd7df2e8ece64e (diff) | |
| download | lua-014a09c5095be3ef11366530e4630ee817a526a7.tar.gz lua-014a09c5095be3ef11366530e4630ee817a526a7.tar.bz2 lua-014a09c5095be3ef11366530e4630ee817a526a7.zip | |
better error messages
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.79 2000/06/16 17:16:34 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.80 2000/06/26 19:28:31 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 | */ |
| @@ -103,7 +103,7 @@ void luaD_openstack (lua_State *L, StkId pos) { | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | 105 | ||
| 106 | void luaD_lineHook (lua_State *L, StkId func, int line) { | 106 | void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook) { |
| 107 | if (L->allowhooks) { | 107 | if (L->allowhooks) { |
| 108 | lua_Debug ar; | 108 | lua_Debug ar; |
| 109 | struct C_Lua_Stack oldCLS = L->Cstack; | 109 | struct C_Lua_Stack oldCLS = L->Cstack; |
| @@ -113,7 +113,7 @@ void luaD_lineHook (lua_State *L, StkId func, int line) { | |||
| 113 | ar.event = "line"; | 113 | ar.event = "line"; |
| 114 | ar.currentline = line; | 114 | ar.currentline = line; |
| 115 | L->allowhooks = 0; /* cannot call hooks inside a hook */ | 115 | L->allowhooks = 0; /* cannot call hooks inside a hook */ |
| 116 | (*L->linehook)(L, &ar); | 116 | (*linehook)(L, &ar); |
| 117 | L->allowhooks = 1; | 117 | L->allowhooks = 1; |
| 118 | L->top = old_top; | 118 | L->top = old_top; |
| 119 | L->Cstack = oldCLS; | 119 | L->Cstack = oldCLS; |
| @@ -187,7 +187,7 @@ void luaD_call (lua_State *L, StkId func, int nResults) { | |||
| 187 | case TAG_LCLOSURE: { | 187 | case TAG_LCLOSURE: { |
| 188 | CallInfo ci; | 188 | CallInfo ci; |
| 189 | ci.func = clvalue(func); | 189 | ci.func = clvalue(func); |
| 190 | ci.pc = 0; | 190 | ci.line = 0; |
| 191 | ttype(func) = TAG_LMARK; | 191 | ttype(func) = TAG_LMARK; |
| 192 | infovalue(func) = &ci; | 192 | infovalue(func) = &ci; |
| 193 | if (callhook) | 193 | if (callhook) |
