diff --git a/src/common/util/translation.c b/src/common/util/translation.c index df17aac8b..a763d3199 100644 --- a/src/common/util/translation.c +++ b/src/common/util/translation.c @@ -35,10 +35,11 @@ variant opstack_pop(opstack ** stackp) { opstack * stack = *stackp; + variant v = *(--stack->top); assert(stack); assert(stack->top>stack->begin); - return *(--stack->top); + return v; } void diff --git a/src/eressea/lua/script.cpp b/src/eressea/lua/script.cpp index 30ea0ed7a..6808298df 100644 --- a/src/eressea/lua/script.cpp +++ b/src/eressea/lua/script.cpp @@ -191,7 +191,7 @@ lua_changeresource(unit * u, const struct resource_type * rtype, int delta) bool is_function(struct lua_State * luaState, const char * fname) { -#if BOOST_VERSION > 103002 +#ifndef LUABIND_OLD object globals = globals(luaState); object fun = globals[fname]; if (fun.is_valid()) { diff --git a/src/eressea/server.cpp b/src/eressea/server.cpp index 920660610..b23e99797 100644 --- a/src/eressea/server.cpp +++ b/src/eressea/server.cpp @@ -457,10 +457,10 @@ usage(const char * prog, const char * arg) static void setLuaString(lua_State * luaState, const char * name, const char * value) { -#if BOOST_VERSION > 103002 - luabind::object globals = luabind::globals(luaState); -#else +#ifdef LUBIND_OLD luabind::object globals = luabind::get_globals(luaState); +#else + luabind::object globals = luabind::globals(luaState); #endif globals[name] = value; } diff --git a/src/lua.hpp b/src/lua.hpp index bc7a961e4..1280af273 100644 --- a/src/lua.hpp +++ b/src/lua.hpp @@ -3,3 +3,6 @@ extern "C" { #include #include } +#if BOOST_VERSION < 103300 +# define LUABIND_OLD +#endif