From 996f6c218e10b3d899fa823d34385a878c4cb146 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 27 Sep 2021 19:10:00 +0800 Subject: [PATCH] Fix build when using ValyriaTear/luabind (on Ubuntu) --- nel/src/gui/lua_ihm.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/nel/src/gui/lua_ihm.cpp b/nel/src/gui/lua_ihm.cpp index cdd87330c..7ea3d3887 100644 --- a/nel/src/gui/lua_ihm.cpp +++ b/nel/src/gui/lua_ihm.cpp @@ -220,7 +220,9 @@ namespace NLGUI void CLuaIHM::push(CLuaState &ls, const ucstring &value) { //H_AUTO(Lua_CLuaIHM_push) - #if LUABIND_VERSION > 600 + #if defined(LUABIND_STACK_HPP_INCLUDED) + luabind::push(ls.getStatePointer(), value); + #elif (LUABIND_VERSION > 600) luabind::detail::push(ls.getStatePointer(), value); #else luabind::object obj(ls.getStatePointer(), value); @@ -1156,7 +1158,9 @@ namespace NLGUI case CInterfaceExprValue::RGBA: { CRGBA color = value.getRGBA(); - #if LUABIND_VERSION > 600 + #if defined(LUABIND_STACK_HPP_INCLUDED) + luabind::push(ls.getStatePointer(), color); + #elif (LUABIND_VERSION > 600) luabind::detail::push(ls.getStatePointer(), color); #else luabind::object obj(ls.getStatePointer(), color); @@ -1416,7 +1420,9 @@ namespace NLGUI case CReflectedProperty::UCString: { ucstring str = (reflectedObject.*(property.GetMethod.GetUCString))(); - #if LUABIND_VERSION > 600 + #if defined(LUABIND_STACK_HPP_INCLUDED) + luabind::push(ls.getStatePointer(), str); + #elif (LUABIND_VERSION > 600) luabind::detail::push(ls.getStatePointer(), str); #else luabind::object obj(ls.getStatePointer(), str); @@ -1427,7 +1433,9 @@ namespace NLGUI case CReflectedProperty::UCStringRef: { ucstring str = (reflectedObject.*(property.GetMethod.GetUCStringRef))(); - #if LUABIND_VERSION > 600 + #if defined(LUABIND_STACK_HPP_INCLUDED) + luabind::push(ls.getStatePointer(), str); + #elif (LUABIND_VERSION > 600) luabind::detail::push(ls.getStatePointer(), str); #else luabind::object obj(ls.getStatePointer(), str); @@ -1442,7 +1450,9 @@ namespace NLGUI case CReflectedProperty::RGBA: { CRGBA color = (reflectedObject.*(property.GetMethod.GetRGBA))(); - #if LUABIND_VERSION > 600 + #if defined(LUABIND_STACK_HPP_INCLUDED) + luabind::push(ls.getStatePointer(), color); + #elif (LUABIND_VERSION > 600) luabind::detail::push(ls.getStatePointer(), color); #else luabind::object obj(ls.getStatePointer(), color);