# # # patch "luaext_guess_binary.cc" # from [2d5825af409930428d3d8975b01b8a310267eae7] # to [4a0ad755ed82fbad8a0b6dcad65d9a40e62c3dbf] # # patch "luaext_mkstemp.cc" # from [95ed9a14207e9e4c8235308fcb873a8a8d2ec546] # to [720960e1aca4aefa6a43cdf55d02ccaec94bc47a] # # patch "luaext_parse_basic_io.cc" # from [34889d11896be371e3792d5a674b8e4cf5bd5369] # to [01d17cf41ed2057952a3577a5440911b884b9335] # ============================================================ --- luaext_guess_binary.cc 2d5825af409930428d3d8975b01b8a310267eae7 +++ luaext_guess_binary.cc 4a0ad755ed82fbad8a0b6dcad65d9a40e62c3dbf @@ -11,8 +11,7 @@ LUAEXT(guess_binary_file_contents, ) LUAEXT(guess_binary_file_contents, ) { - const char *path = luaL_checkstring(L, -1); - N(path, F("%s called with an invalid parameter") % "guess_binary"); + const char *path = luaL_checkstring(L, 1); ifstream file(path, ios_base::binary); if (!file) ============================================================ --- luaext_mkstemp.cc 95ed9a14207e9e4c8235308fcb873a8a8d2ec546 +++ luaext_mkstemp.cc 720960e1aca4aefa6a43cdf55d02ccaec94bc47a @@ -10,7 +10,7 @@ LUAEXT(mkstemp, ) LUAEXT(mkstemp, ) { - char const *filename = luaL_checkstring (L, -1); + char const *filename = luaL_checkstring (L, 1); string dup(filename); if (!monotone_mkstemp(dup)) ============================================================ --- luaext_parse_basic_io.cc 34889d11896be371e3792d5a674b8e4cf5bd5369 +++ luaext_parse_basic_io.cc 01d17cf41ed2057952a3577a5440911b884b9335 @@ -47,23 +47,19 @@ LUAEXT(parse_basic_io, ) for (vector > >::const_iterator i = res.begin(); i != res.end(); ++i) { - lua_pushnumber(L, n++); lua_newtable(L); - lua_pushstring(L, "name"); lua_pushstring(L, i->first.c_str()); - lua_settable(L, -3); - lua_pushstring(L, "values"); + lua_setfield(L, -2, "name"); lua_newtable(L); int m = 1; for (vector::const_iterator j = i->second.begin(); j != i->second.end(); ++j) { - lua_pushnumber(L, m++); lua_pushstring(L, j->c_str()); - lua_settable(L, -3); + lua_rawseti(L, -2, m++); } - lua_settable(L, -3); - lua_settable(L, -3); + lua_setfield(L, -2, "values"); + lua_rawseti(L, -2, n++); } return 1; }