535N/A--- lua-5.1.4/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
535N/A+++ lua-5.1.4/src/lcode.c 2011/01/31 14:53:16 2.25.1.5
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $
535N/A+** $Id: lcode.c,v 2.25.1.5 2011/01/31 14:53:16 roberto Exp $
535N/A ** Code generator for Lua
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -544,10 +544,6 @@
535N/A pc = NO_JUMP; /* always true; do nothing */
535N/A break;
535N/A }
535N/A- case VFALSE: {
535N/A- pc = luaK_jump(fs); /* always jump */
535N/A- break;
535N/A- }
535N/A case VJMP: {
535N/A invertjump(fs, e);
535N/A pc = e->u.s.info;
535N/A@@ -572,10 +568,6 @@
535N/A pc = NO_JUMP; /* always false; do nothing */
535N/A break;
535N/A }
535N/A- case VTRUE: {
535N/A- pc = luaK_jump(fs); /* always jump */
535N/A- break;
535N/A- }
535N/A case VJMP: {
535N/A pc = e->u.s.info;
535N/A break;
535N/A--- lua-5.1.4/src/ldblib.c 2008/01/21 13:11:21 1.104.1.3
535N/A+++ lua-5.1.4/src/ldblib.c 2009/08/04 18:50:18 1.104.1.4
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: ldblib.c,v 1.104.1.3 2008/01/21 13:11:21 roberto Exp $
535N/A+** $Id: ldblib.c,v 1.104.1.4 2009/08/04 18:50:18 roberto Exp $
535N/A ** Interface from Lua to its debug API
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -45,6 +45,7 @@
535N/A
535N/A
535N/A static int db_getfenv (lua_State *L) {
535N/A+ luaL_checkany(L, 1);
535N/A lua_getfenv(L, 1);
535N/A return 1;
535N/A }
535N/A--- lua-5.1.4/src/liolib.c 2008/01/18 17:47:43 2.73.1.3
535N/A+++ lua-5.1.4/src/liolib.c 2010/05/14 15:33:51 2.73.1.4
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $
535N/A+** $Id: liolib.c,v 2.73.1.4 2010/05/14 15:33:51 roberto Exp $
535N/A ** Standard I/O (and system) library
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -276,7 +276,10 @@
535N/A lua_pushnumber(L, d);
535N/A return 1;
535N/A }
535N/A- else return 0; /* read fails */
535N/A+ else {
535N/A+ lua_pushnil(L); /* "result" to be removed */
535N/A+ return 0; /* read fails */
535N/A+ }
535N/A }
535N/A
535N/A
535N/A--- lua-5.1.4/src/llex.c 2007/12/27 13:02:25 2.20.1.1
535N/A+++ lua-5.1.4/src/llex.c 2009/11/23 14:58:22 2.20.1.2
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: llex.c,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $
535N/A+** $Id: llex.c,v 2.20.1.2 2009/11/23 14:58:22 roberto Exp $
535N/A ** Lexical Analyzer
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -118,8 +118,10 @@
535N/A lua_State *L = ls->L;
535N/A TString *ts = luaS_newlstr(L, str, l);
535N/A TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
535N/A- if (ttisnil(o))
535N/A+ if (ttisnil(o)) {
535N/A setbvalue(o, 1); /* make sure `str' will not be collected */
535N/A+ luaC_checkGC(L);
535N/A+ }
535N/A return ts;
535N/A }
535N/A
535N/A--- lua-5.1.4/src/loadlib.c 2008/08/06 13:29:28 1.52.1.3
535N/A+++ lua-5.1.4/src/loadlib.c 2009/09/09 13:17:16 1.52.1.4
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: loadlib.c,v 1.52.1.3 2008/08/06 13:29:28 roberto Exp $
535N/A+** $Id: loadlib.c,v 1.52.1.4 2009/09/09 13:17:16 roberto Exp $
535N/A ** Dynamic library loader for Lua
535N/A ** See Copyright Notice in lua.h
535N/A **
535N/A@@ -639,7 +639,7 @@
535N/A lua_pushvalue(L, -1);
535N/A lua_replace(L, LUA_ENVIRONINDEX);
535N/A /* create `loaders' table */
535N/A- lua_createtable(L, 0, sizeof(loaders)/sizeof(loaders[0]) - 1);
535N/A+ lua_createtable(L, sizeof(loaders)/sizeof(loaders[0]) - 1, 0);
535N/A /* fill it with pre-defined loaders */
535N/A for (i=0; loaders[i] != NULL; i++) {
535N/A lua_pushcfunction(L, loaders[i]);
535N/A--- lua-5.1.4/src/lstrlib.c 2008/07/11 17:27:21 1.132.1.4
535N/A+++ lua-5.1.4/src/lstrlib.c 2010/05/14 15:34:19 1.132.1.5
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: lstrlib.c,v 1.132.1.4 2008/07/11 17:27:21 roberto Exp $
535N/A+** $Id: lstrlib.c,v 1.132.1.5 2010/05/14 15:34:19 roberto Exp $
535N/A ** Standard library for string operations and pattern-matching
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -754,6 +754,7 @@
535N/A
535N/A
535N/A static int str_format (lua_State *L) {
535N/A+ int top = lua_gettop(L);
535N/A int arg = 1;
535N/A size_t sfl;
535N/A const char *strfrmt = luaL_checklstring(L, arg, &sfl);
535N/A@@ -768,7 +769,8 @@
535N/A else { /* format item */
535N/A char form[MAX_FORMAT]; /* to store the format (`%...') */
535N/A char buff[MAX_ITEM]; /* to store the formatted item */
535N/A- arg++;
535N/A+ if (++arg > top)
535N/A+ luaL_argerror(L, arg, "no value");
535N/A strfrmt = scanformat(L, strfrmt, form);
535N/A switch (*strfrmt++) {
535N/A case 'c': {
535N/A--- lua-5.1.4/src/lvm.c 2007/12/28 15:32:23 2.63.1.3
535N/A+++ lua-5.1.4/src/lvm.c 2009/07/01 21:10:33 2.63.1.4
535N/A@@ -1,5 +1,5 @@
535N/A /*
535N/A-** $Id: lvm.c,v 2.63.1.3 2007/12/28 15:32:23 roberto Exp $
535N/A+** $Id: lvm.c,v 2.63.1.4 2009/07/01 21:10:33 roberto Exp $
535N/A ** Lua virtual machine
535N/A ** See Copyright Notice in lua.h
535N/A */
535N/A@@ -133,6 +133,7 @@
535N/A
535N/A void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
535N/A int loop;
535N/A+ TValue temp;
535N/A for (loop = 0; loop < MAXTAGLOOP; loop++) {
535N/A const TValue *tm;
535N/A if (ttistable(t)) { /* `t' is a table? */
535N/A@@ -152,7 +153,9 @@
535N/A callTM(L, tm, t, key, val);
535N/A return;
535N/A }
535N/A- t = tm; /* else repeat with `tm' */
535N/A+ /* else repeat with `tm' */
535N/A+ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */
535N/A+ t = &temp;
535N/A }
535N/A luaG_runerror(L, "loop in settable");
535N/A }
535N/A