diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-22 17:24:38 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-22 17:24:38 -0300 |
| commit | 3c8865cf66db165e0266b642a1fdcff6c72a9e24 (patch) | |
| tree | 431ae0414fec7fa87d92ed7f9c03dca49bc9929c | |
| parent | 569a3269311f1554be345fefdeffe6f7b374a56f (diff) | |
| download | lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.gz lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.tar.bz2 lua-3c8865cf66db165e0266b642a1fdcff6c72a9e24.zip | |
detail
| -rw-r--r-- | lauxlib.c | 3 | ||||
| -rw-r--r-- | lcode.c | 5 |
2 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.160 2006/06/22 16:12:59 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.161 2006/09/18 14:03:18 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -641,6 +641,7 @@ static int panic (lua_State *L) { | |||
| 641 | (void)L; /* to avoid warnings */ | 641 | (void)L; /* to avoid warnings */ |
| 642 | fprintf(stderr, "PANIC: unprotected error in call to Lua API (%s)\n", | 642 | fprintf(stderr, "PANIC: unprotected error in call to Lua API (%s)\n", |
| 643 | lua_tostring(L, -1)); | 643 | lua_tostring(L, -1)); |
| 644 | exit(EXIT_FAILURE); /* do not return to Lua */ | ||
| 644 | return 0; | 645 | return 0; |
| 645 | } | 646 | } |
| 646 | 647 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.28 2006/09/14 12:59:06 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.29 2006/09/14 18:42:28 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -37,7 +37,8 @@ void luaK_nil (FuncState *fs, int from, int n) { | |||
| 37 | if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ | 37 | if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ |
| 38 | if (fs->pc == 0) /* function start? */ | 38 | if (fs->pc == 0) /* function start? */ |
| 39 | return; /* positions are already clean */ | 39 | return; /* positions are already clean */ |
| 40 | if (GET_OPCODE(*(previous = &fs->f->code[fs->pc-1])) == OP_LOADNIL) { | 40 | previous = &fs->f->code[fs->pc-1]; |
| 41 | if (GET_OPCODE(*previous) == OP_LOADNIL) { | ||
| 41 | int pfrom = GETARG_A(*previous); | 42 | int pfrom = GETARG_A(*previous); |
| 42 | int pto = GETARG_B(*previous); | 43 | int pto = GETARG_B(*previous); |
| 43 | if (pfrom <= from && from <= pto+1) { /* can connect both? */ | 44 | if (pfrom <= from && from <= pto+1) { /* can connect both? */ |
