diff --git a/src/actions/make/_make.lua b/src/actions/make/_make.lua index a38dfbc4..e538148d 100644 --- a/src/actions/make/_make.lua +++ b/src/actions/make/_make.lua @@ -84,11 +84,11 @@ function make.esc(value) result = value:gsub("\\", "\\\\") result = result:gsub(" ", "\\ ") - result = result:gsub("%(", "\\%(") - result = result:gsub("%)", "\\%)") + result = result:gsub("%(", "\\(") + result = result:gsub("%)", "\\)") -- leave $(...) shell replacement sequences alone - result = result:gsub("$\\%((.-)\\%)", "$%(%1%)") + result = result:gsub("$\\%((.-)\\%)", "$(%1)") return result end diff --git a/src/host/lua-5.1.4/src/luaconf.h b/src/host/lua-5.1.4/src/luaconf.h index c3775903..2af7efd4 100644 --- a/src/host/lua-5.1.4/src/luaconf.h +++ b/src/host/lua-5.1.4/src/luaconf.h @@ -333,14 +333,14 @@ ** CHANGE it to undefined as soon as your programs use only '...' to ** access vararg parameters (instead of the old 'arg' table). */ -#define LUA_COMPAT_VARARG +#undef LUA_COMPAT_VARARG /* @@ LUA_COMPAT_MOD controls compatibility with old math.mod function. ** CHANGE it to undefined as soon as your programs use 'math.fmod' or ** the new '%' operator instead of 'math.mod'. */ -#define LUA_COMPAT_MOD +#undef LUA_COMPAT_MOD /* @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting @@ -355,7 +355,7 @@ ** CHANGE it to undefined as soon as you rename 'string.gfind' to ** 'string.gmatch'. */ -#define LUA_COMPAT_GFIND +#undef LUA_COMPAT_GFIND /* @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib' @@ -363,7 +363,7 @@ ** CHANGE it to undefined as soon as you replace to 'luaL_register' ** your uses of 'luaL_openlib' */ -#define LUA_COMPAT_OPENLIB +#undef LUA_COMPAT_OPENLIB diff --git a/src/host/premake.c b/src/host/premake.c index 96a9c7a5..2be283cd 100644 --- a/src/host/premake.c +++ b/src/host/premake.c @@ -438,7 +438,7 @@ static int process_arguments(lua_State* L, int argc, const char** argv) for (i = 1; i < argc; ++i) { lua_pushstring(L, argv[i]); - lua_rawseti(L, -2, luaL_getn(L, -2) + 1); + lua_rawseti(L, -2, lua_objlen(L, -2) + 1); /* The /scripts option gets picked up here; used later to find the * manifest and scripts later if necessary */ diff --git a/src/host/premake_main.c b/src/host/premake_main.c index 687961fc..84739757 100644 --- a/src/host/premake_main.c +++ b/src/host/premake_main.c @@ -11,7 +11,7 @@ int main(int argc, const char** argv) lua_State* L; int z; - L = lua_open(); + L = luaL_newstate(); luaL_openlibs(L); z = premake_init(L); diff --git a/tests/testfx.lua b/tests/testfx.lua index 697796fa..e78a1da8 100644 --- a/tests/testfx.lua +++ b/tests/testfx.lua @@ -40,8 +40,8 @@ local actual = premake.captured() .. premake.eol() -- create line-by-line iterators for both values - local ait = actual:gfind("(.-)" .. premake.eol()) - local eit = expected:gfind("(.-)\n") + local ait = actual:gmatch("(.-)" .. premake.eol()) + local eit = expected:gmatch("(.-)\n") -- compare each value line by line local linenum = 1