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 <lua.hpp>
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA >= 7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#include <luabind/out_value_policy.hpp>
|
#include <luabind/out_value_policy.hpp>
|
||||||
#include <luabind/copy_policy.hpp>
|
#include <luabind/copy_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA >= 7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA >= 7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace eressea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef LUABIND_OLD
|
#if LUABIND_BETA<7 || (LUABIND_BETA==7 && LUABIND_DEVEL<2)
|
||||||
return object(L); // nil
|
return object(L); // nil
|
||||||
#else
|
#else
|
||||||
return object(); // nil
|
return object(); // nil
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA >= 7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ lua_changeresource(unit * u, const struct resource_type * rtype, int delta)
|
||||||
bool
|
bool
|
||||||
is_function(struct lua_State * luaState, const char * fname)
|
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 g = globals(luaState);
|
||||||
object fun = g[fname];
|
object fun = g[fname];
|
||||||
if (fun.is_valid()) {
|
if (fun.is_valid()) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA >= 7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
#include <luabind/luabind.hpp>
|
#include <luabind/luabind.hpp>
|
||||||
#include <luabind/iterator_policy.hpp>
|
#include <luabind/iterator_policy.hpp>
|
||||||
#ifdef HAVE_LUABIND_B7
|
#if LUABIND_BETA>=7
|
||||||
# include <luabind/operator.hpp>
|
# include <luabind/operator.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,7 @@ usage(const char * prog, const char * arg)
|
||||||
static void
|
static void
|
||||||
setLuaString(lua_State * luaState, const char * name, const char * value)
|
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);
|
luabind::object g = luabind::get_globals(luaState);
|
||||||
#else
|
#else
|
||||||
luabind::object g = luabind::globals(luaState);
|
luabind::object g = luabind::globals(luaState);
|
||||||
|
@ -469,7 +469,7 @@ setLuaString(lua_State * luaState, const char * name, const char * value)
|
||||||
static void
|
static void
|
||||||
setLuaNumber(lua_State * luaState, const char * name, double value)
|
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);
|
luabind::object g = luabind::get_globals(luaState);
|
||||||
#else
|
#else
|
||||||
luabind::object g = luabind::globals(luaState);
|
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/lauxlib.h>
|
||||||
#include <lua50/lualib.h>
|
#include <lua50/lualib.h>
|
||||||
}
|
}
|
||||||
#include <boost/version.hpp>
|
|
||||||
#if BOOST_VERSION < 103300
|
#ifndef LUABIND_BETA
|
||||||
# define LUABIND_OLD
|
# 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
|
#endif
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
region of Muschelplateau.
|
region of Muschelplateau.
|
||||||
</text>
|
</text>
|
||||||
<text locale="de">
|
<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'.
|
als einen Besucher der Botschafterregion 'Muschelplateau'.
|
||||||
</text>
|
</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
Loading…
Reference in New Issue