Changed: #885 luabind (On Windows Breaks Compiling)

This commit is contained in:
kervala 2010-05-12 18:32:05 +02:00
parent 6bf4f1a80a
commit f02896261a

View file

@ -32,15 +32,13 @@
#define assert nlassert
#include <luabind/luabind.hpp>
#if LUABIND_MAX_ARITY == 10
# define LUABIND_VERSION 07
# include <luabind/version.hpp>
# include <luabind/operator.hpp>
#elif LUABIND_MAX_ARITY == 5
# define LUABIND_VERSION 06
# define LUABIND_VERSION 600
#else
# pragma error("luabind version not recognized")
#endif
#if LUABIND_VERSION == 07
# include <luabind/operator.hpp>
#endif
#include "lua_ihm.h"
@ -117,24 +115,6 @@ Compilation is VERY SLOW
*/
// ***************************************************************************
// to get rid of you_must_not_use_assert___use_nl_assert___read_debug_h_file messages
#include <cassert>
#undef assert
#define assert nlassert
#include <luabind/luabind.hpp>
#if LUABIND_MAX_ARITY == 10
# define LUABIND_VERSION 07
#elif LUABIND_MAX_ARITY == 5
# define LUABIND_VERSION 06
#else
# pragma error("luabind version not recognized")
#endif
#if LUABIND_VERSION == 07
# include <luabind/operator.hpp>
#endif
using namespace NLMISC;
using namespace NLGEORGES;
using namespace R2;
@ -225,7 +205,7 @@ bool CLuaIHM::pop(CLuaState &ls, NLMISC::CRGBA &dest)
try
{
if (ls.isNil(-1)) return false;
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
luabind::object obj(luabind::from_stack(ls.getStatePointer(), -1));
ls.pop();
#else
@ -248,7 +228,7 @@ bool CLuaIHM::pop(CLuaState &ls,NLMISC::CVector2f &dest)
try
{
if (ls.isNil(-1)) return false;
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
luabind::object obj(luabind::from_stack(ls.getStatePointer(), -1));
ls.pop();
#else
@ -271,7 +251,7 @@ bool CLuaIHM::pop(CLuaState &ls, ucstring &dest)
try
{
if (ls.isNil(-1)) return false;
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
luabind::object obj(luabind::from_stack(ls.getStatePointer(), -1));
ls.pop();
#else
@ -310,7 +290,7 @@ void CLuaIHM::push(CLuaState &ls, const ucstring &value)
{
//H_AUTO(Lua_CLuaIHM_push)
luabind::object obj(ls.getStatePointer(), value);
#if LUABIND_VERSION != 07
#if LUABIND_VERSION == 600
obj.pushvalue();
#endif
}
@ -668,7 +648,7 @@ void CLuaIHM::luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflect
case CReflectedProperty::UCString:
{
luabind::object obj(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetUCString))() );
#if LUABIND_VERSION != 07
#if LUABIND_VERSION == 600
obj.pushvalue();
#endif
}
@ -676,7 +656,7 @@ void CLuaIHM::luaValueFromReflectedProperty(CLuaState &ls, CReflectable &reflect
case CReflectedProperty::RGBA:
{
luabind::object obj(ls.getStatePointer(), (reflectedObject.*(property.GetMethod.GetRGBA))());
#if LUABIND_VERSION != 07
#if LUABIND_VERSION == 600
obj.pushvalue();
#endif
}
@ -2689,7 +2669,7 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr)
if(mustUseUCString)
{
luabind::object obj(ls.getStatePointer(), ucstr );
#if LUABIND_VERSION != 07
#if LUABIND_VERSION == 600
obj.pushvalue();
#endif
}
@ -2702,7 +2682,7 @@ int CLuaIHM::runExprAndPushResult(CLuaState &ls, const std::string &expr)
case CInterfaceExprValue::RGBA:
{
luabind::object obj(ls.getStatePointer(), value.getRGBA());
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
obj.push(ls.getStatePointer());
#else
obj.pushvalue();
@ -3342,7 +3322,7 @@ bool CLuaIHM::popString(CLuaState &ls, std::string & dest)
//H_AUTO(Lua_CLuaIHM_popString)
try
{
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
luabind::object obj(luabind::from_stack(ls.getStatePointer(), -1));
ls.pop();
#else
@ -3364,7 +3344,7 @@ bool CLuaIHM::popSINT32(CLuaState &ls, sint32 & dest)
//H_AUTO(Lua_CLuaIHM_popSINT32)
try
{
#if LUABIND_VERSION == 07
#if LUABIND_VERSION > 600
luabind::object obj(luabind::from_stack(ls.getStatePointer(), -1));
ls.pop();
#else