# HG changeset patch # User jbe # Date 1426945052 -3600 # Node ID d22b58cafebfd1bf89f2cb8f2e6726b83d7c4de5 # Parent 5ff8d300817bdd6c0f2ce8d2eb613fbd26985cc7 Removed Lua 5.1 compatibility code in webmcp_accelerator.c diff -r 5ff8d300817b -r d22b58cafebf framework/accelerator/webmcp_accelerator.c --- a/framework/accelerator/webmcp_accelerator.c Sat Mar 21 14:37:11 2015 +0100 +++ b/framework/accelerator/webmcp_accelerator.c Sat Mar 21 14:37:32 2015 +0100 @@ -53,11 +53,7 @@ lua_pushvalue(L, 1); lua_gettable(L, -2); // get table by reference passed as 1st argument lua_getfield(L, -1, "string_fragments"); -#if LUA_VERSION_NUM >= 502 j = lua_rawlen(L, -1); -#else - j = lua_objlen(L, -1); -#endif for (i=2; i<=argc; i++) { lua_pushvalue(L, i); lua_rawseti(L, -2, ++j); @@ -75,11 +71,7 @@ lua_getfield(L, -2, "_active_slot"); lua_gettable(L, -2); lua_getfield(L, -1, "string_fragments"); -#if LUA_VERSION_NUM >= 502 j = lua_rawlen(L, -1); -#else - j = lua_objlen(L, -1); -#endif for (i=1; i<=argc; i++) { lua_pushvalue(L, i); lua_rawseti(L, -2, ++j); @@ -116,11 +108,7 @@ tag_given = 1; } } -#if LUA_VERSION_NUM >= 502 j = lua_rawlen(L, 5); -#else - j = lua_objlen(L, 5); -#endif if (tag_given) { lua_pushliteral(L, "<"); lua_rawseti(L, 5, ++j); @@ -165,11 +153,7 @@ lua_call(L, 0, 0); // stack is now at position 7, but we don't care // we assume that the active slot hasn't been exchanged or resetted -#if LUA_VERSION_NUM >= 502 j = lua_rawlen(L, 5); // but it may include more elements now -#else - j = lua_objlen(L, 5); // but it may include more elements now -#endif } else { lua_pushcfunction(L, webmcp_encode_html); // 9 lua_pushvalue(L, 8); // 10