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 pc = NO_JUMP; /* always true; do nothing */
535N/A- pc = luaK_jump(fs); /* always jump */
535N/A pc = NO_JUMP; /* always false; do nothing */
535N/A- pc = luaK_jump(fs); /* always jump */
535N/A ** Interface from Lua to its debug API
535N/A static int db_getfenv (lua_State *L) {
535N/A ** Standard I/O (and system) library
535N/A- else return 0; /* read fails */
535N/A+ lua_pushnil(L); /* "result" to be removed */
535N/A+ return 0; /* read fails */
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 TString *ts = luaS_newlstr(L, str, l);
535N/A TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
535N/A setbvalue(o, 1); /* make sure `str' will not be collected */
535N/A ** Dynamic library loader for Lua
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 ** Standard library for string operations and pattern-matching
535N/A static int str_format (lua_State *L) {
535N/A+ int top = lua_gettop(L);
535N/A const char *strfrmt = luaL_checklstring(L, arg, &sfl);
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+ luaL_argerror(L, arg, "no value");
535N/A strfrmt = scanformat(L, strfrmt, form);
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 void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
535N/A for (loop = 0; loop < MAXTAGLOOP; loop++) {
535N/A if (ttistable(t)) { /* `t' is a table? */
535N/A callTM(L, tm, t, key, val);
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 luaG_runerror(L, "loop in settable");