webmcp

diff framework/accelerator/webmcp_accelerator.c @ 66:afed1ab1477f

Bugfix regarding compatibility with Lua 5.2:
#if instead of #ifdef in webmcp_accelerator.c
author jbe
date Tue Apr 17 15:38:05 2012 +0200 (2012-04-17)
parents 3d43a5cf17c1
children d22b58cafebf
line diff
     1.1 --- a/framework/accelerator/webmcp_accelerator.c	Tue Apr 17 15:20:42 2012 +0200
     1.2 +++ b/framework/accelerator/webmcp_accelerator.c	Tue Apr 17 15:38:05 2012 +0200
     1.3 @@ -53,7 +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 -#ifdef LUA_VERSION_NUM >= 502
     1.8 +#if LUA_VERSION_NUM >= 502
     1.9    j = lua_rawlen(L, -1);
    1.10  #else
    1.11    j = lua_objlen(L, -1);
    1.12 @@ -75,7 +75,7 @@
    1.13    lua_getfield(L, -2, "_active_slot");
    1.14    lua_gettable(L, -2);
    1.15    lua_getfield(L, -1, "string_fragments");
    1.16 -#ifdef LUA_VERSION_NUM >= 502
    1.17 +#if LUA_VERSION_NUM >= 502
    1.18    j = lua_rawlen(L, -1);
    1.19  #else
    1.20    j = lua_objlen(L, -1);
    1.21 @@ -116,7 +116,7 @@
    1.22        tag_given = 1;
    1.23      }
    1.24    }
    1.25 -#ifdef LUA_VERSION_NUM >= 502
    1.26 +#if LUA_VERSION_NUM >= 502
    1.27    j = lua_rawlen(L, 5);
    1.28  #else
    1.29    j = lua_objlen(L, 5);
    1.30 @@ -165,7 +165,7 @@
    1.31        lua_call(L, 0, 0);
    1.32        // stack is now at position 7, but we don't care
    1.33        // we assume that the active slot hasn't been exchanged or resetted
    1.34 -#ifdef LUA_VERSION_NUM >= 502
    1.35 +#if LUA_VERSION_NUM >= 502
    1.36        j = lua_rawlen(L, 5);  // but it may include more elements now
    1.37  #else
    1.38        j = lua_objlen(L, 5);  // but it may include more elements now

Impressum / About Us