forked from github/server
slightly improved, but still hackish way to recognize luabind versions.
This commit is contained in:
parent
bf6dbe4b26
commit
83e9b7a994
|
@ -14,7 +14,7 @@
|
|||
#include <lua.hpp>
|
||||
#include <luabind/luabind.hpp>
|
||||
#include <luabind/iterator_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA >= 7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <luabind/iterator_policy.hpp>
|
||||
#include <luabind/out_value_policy.hpp>
|
||||
#include <luabind/copy_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA >= 7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <lua.hpp>
|
||||
#include <luabind/luabind.hpp>
|
||||
#include <luabind/iterator_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA >= 7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace eressea {
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef LUABIND_OLD
|
||||
#if LUABIND_BETA<7 || (LUABIND_BETA==7 && LUABIND_DEVEL<2)
|
||||
return object(L); // nil
|
||||
#else
|
||||
return object(); // nil
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <lua.hpp>
|
||||
#include <luabind/luabind.hpp>
|
||||
#include <luabind/iterator_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA >= 7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ lua_changeresource(unit * u, const struct resource_type * rtype, int delta)
|
|||
bool
|
||||
is_function(struct lua_State * luaState, const char * fname)
|
||||
{
|
||||
#ifndef LUABIND_OLD
|
||||
#if LUABIND_BETA>7 || (LUABIND_BETA==7 && LUABIND_DEVEL>=2)
|
||||
object g = globals(luaState);
|
||||
object fun = g[fname];
|
||||
if (fun.is_valid()) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <lua.hpp>
|
||||
#include <luabind/luabind.hpp>
|
||||
#include <luabind/iterator_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA >= 7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <lua.hpp>
|
||||
#include <luabind/luabind.hpp>
|
||||
#include <luabind/iterator_policy.hpp>
|
||||
#ifdef HAVE_LUABIND_B7
|
||||
#if LUABIND_BETA>=7
|
||||
# include <luabind/operator.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -458,7 +458,7 @@ usage(const char * prog, const char * arg)
|
|||
static void
|
||||
setLuaString(lua_State * luaState, const char * name, const char * value)
|
||||
{
|
||||
#ifdef LUABIND_OLD
|
||||
#if LUABIND_BETA<7 || (LUABIND_BETA==7 && LUABIND_DEVEL<2)
|
||||
luabind::object g = luabind::get_globals(luaState);
|
||||
#else
|
||||
luabind::object g = luabind::globals(luaState);
|
||||
|
@ -469,7 +469,7 @@ setLuaString(lua_State * luaState, const char * name, const char * value)
|
|||
static void
|
||||
setLuaNumber(lua_State * luaState, const char * name, double value)
|
||||
{
|
||||
#ifdef LUABIND_OLD
|
||||
#if LUABIND_BETA<7 || (LUABIND_BETA==7 && LUABIND_DEVEL<2)
|
||||
luabind::object g = luabind::get_globals(luaState);
|
||||
#else
|
||||
luabind::object g = luabind::globals(luaState);
|
||||
|
|
13
src/lua.hpp
13
src/lua.hpp
|
@ -3,7 +3,14 @@ extern "C" {
|
|||
#include <lua50/lauxlib.h>
|
||||
#include <lua50/lualib.h>
|
||||
}
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION < 103300
|
||||
# define LUABIND_OLD
|
||||
|
||||
#ifndef LUABIND_BETA
|
||||
# include <boost/version.hpp>
|
||||
# if BOOST_VERSION < 103300
|
||||
# define LUABIND_BETA 7
|
||||
# define LUABIND_DEVEL 1
|
||||
# else
|
||||
# define LUABIND_BETA 7
|
||||
# define LUABIND_DEVEL 2
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
region of Muschelplateau.
|
||||
</text>
|
||||
<text locale="de">
|
||||
Dieses Abzeichen identifiziert die Partei seines Träger offiziell
|
||||
Dieses Abzeichen identifiziert die Partei seines Trägers offiziell
|
||||
als einen Besucher der Botschafterregion 'Muschelplateau'.
|
||||
</text>
|
||||
</string>
|
||||
|
|
Loading…
Reference in New Issue