webmcp
changeset 274:d22b58cafebf
Removed Lua 5.1 compatibility code in webmcp_accelerator.c
author | jbe |
---|---|
date | Sat Mar 21 14:37:32 2015 +0100 (2015-03-21) |
parents | 5ff8d300817b |
children | ee7fcdade91d |
files | framework/accelerator/webmcp_accelerator.c |
line diff
1.1 --- a/framework/accelerator/webmcp_accelerator.c Sat Mar 21 14:37:11 2015 +0100 1.2 +++ b/framework/accelerator/webmcp_accelerator.c Sat Mar 21 14:37:32 2015 +0100 1.3 @@ -53,11 +53,7 @@ 1.4 lua_pushvalue(L, 1); 1.5 lua_gettable(L, -2); // get table by reference passed as 1st argument 1.6 lua_getfield(L, -1, "string_fragments"); 1.7 -#if LUA_VERSION_NUM >= 502 1.8 j = lua_rawlen(L, -1); 1.9 -#else 1.10 - j = lua_objlen(L, -1); 1.11 -#endif 1.12 for (i=2; i<=argc; i++) { 1.13 lua_pushvalue(L, i); 1.14 lua_rawseti(L, -2, ++j); 1.15 @@ -75,11 +71,7 @@ 1.16 lua_getfield(L, -2, "_active_slot"); 1.17 lua_gettable(L, -2); 1.18 lua_getfield(L, -1, "string_fragments"); 1.19 -#if LUA_VERSION_NUM >= 502 1.20 j = lua_rawlen(L, -1); 1.21 -#else 1.22 - j = lua_objlen(L, -1); 1.23 -#endif 1.24 for (i=1; i<=argc; i++) { 1.25 lua_pushvalue(L, i); 1.26 lua_rawseti(L, -2, ++j); 1.27 @@ -116,11 +108,7 @@ 1.28 tag_given = 1; 1.29 } 1.30 } 1.31 -#if LUA_VERSION_NUM >= 502 1.32 j = lua_rawlen(L, 5); 1.33 -#else 1.34 - j = lua_objlen(L, 5); 1.35 -#endif 1.36 if (tag_given) { 1.37 lua_pushliteral(L, "<"); 1.38 lua_rawseti(L, 5, ++j); 1.39 @@ -165,11 +153,7 @@ 1.40 lua_call(L, 0, 0); 1.41 // stack is now at position 7, but we don't care 1.42 // we assume that the active slot hasn't been exchanged or resetted 1.43 -#if LUA_VERSION_NUM >= 502 1.44 j = lua_rawlen(L, 5); // but it may include more elements now 1.45 -#else 1.46 - j = lua_objlen(L, 5); // but it may include more elements now 1.47 -#endif 1.48 } else { 1.49 lua_pushcfunction(L, webmcp_encode_html); // 9 1.50 lua_pushvalue(L, 8); // 10