summaryrefslogtreecommitdiffstats
path: root/src/luabind-6-iterator-equality.patch
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2014-12-05 12:22:14 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2014-12-06 19:11:16 (GMT)
commit748ad97ef02fa9ff4c0e97d6546864f75f0b4753 (patch)
tree860f3da6775eadebac022ed8a1caec1cf7ab83c5 /src/luabind-6-iterator-equality.patch
parent3647c00624eab2d0e90c193d6e908a6266935953 (diff)
downloadmxe-748ad97ef02fa9ff4c0e97d6546864f75f0b4753.zip
mxe-748ad97ef02fa9ff4c0e97d6546864f75f0b4753.tar.gz
mxe-748ad97ef02fa9ff4c0e97d6546864f75f0b4753.tar.bz2
fix luabind
close #570
Diffstat (limited to 'src/luabind-6-iterator-equality.patch')
-rw-r--r--src/luabind-6-iterator-equality.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/luabind-6-iterator-equality.patch b/src/luabind-6-iterator-equality.patch
new file mode 100644
index 0000000..843276b
--- /dev/null
+++ b/src/luabind-6-iterator-equality.patch
@@ -0,0 +1,85 @@
+From c7e9fd61a8b928ca570b73fa6fa23cd68fefc61e Mon Sep 17 00:00:00 2001
+From: Boris Nagaev <bnagaev@gmail.com>
+Date: Fri, 5 Dec 2014 14:36:52 +0300
+Subject: [PATCH] fix luabind::detail::basic_iterator == and !=
+
+MinGW-w64, boost 1.57
+---
+ luabind/object.hpp | 44 +++++++++++++++++++++++++++-----------------
+ 1 file changed, 27 insertions(+), 17 deletions(-)
+
+diff --git a/luabind/object.hpp b/luabind/object.hpp
+index b288171..4ba0519 100644
+--- a/luabind/object.hpp
++++ b/luabind/object.hpp
+@@ -512,6 +512,7 @@ namespace detail
+ }
+ }
+
++ public:
+ bool equal(basic_iterator const& other) const
+ {
+ if (m_interpreter == 0 && other.m_interpreter == 0)
+@@ -526,6 +527,7 @@ namespace detail
+ return lua_equal(m_interpreter, -2, -1) != 0;
+ }
+
++ private:
+ adl::iterator_proxy<AccessPolicy> dereference() const
+ {
+ return adl::iterator_proxy<AccessPolicy>(m_interpreter, m_table, m_key);
+@@ -538,26 +540,34 @@ namespace detail
+
+ // Needed because of some strange ADL issues.
+
+-#define LUABIND_OPERATOR_ADL_WKND(op) \
+- inline bool operator op( \
+- basic_iterator<basic_access> const& x \
+- , basic_iterator<basic_access> const& y) \
+- { \
+- return boost::operator op(x, y); \
+- } \
+- \
+- inline bool operator op( \
+- basic_iterator<raw_access> const& x \
+- , basic_iterator<raw_access> const& y) \
+- { \
+- return boost::operator op(x, y); \
++ inline bool operator ==(
++ basic_iterator<basic_access> const& x
++ , basic_iterator<basic_access> const& y)
++ {
++ return x.equal(y);
++ }
++
++ inline bool operator ==(
++ basic_iterator<raw_access> const& x
++ , basic_iterator<raw_access> const& y)
++ {
++ return x.equal(y);
+ }
+
+- LUABIND_OPERATOR_ADL_WKND(==)
+- LUABIND_OPERATOR_ADL_WKND(!=)
++ inline bool operator !=(
++ basic_iterator<basic_access> const& x
++ , basic_iterator<basic_access> const& y)
++ {
++ return !(x.equal(y));
++ }
++
++ inline bool operator !=(
++ basic_iterator<raw_access> const& x
++ , basic_iterator<raw_access> const& y)
++ {
++ return !(x.equal(y));
++ }
+
+-#undef LUABIND_OPERATOR_ADL_WKND
+-
+ } // namespace detail
+
+ namespace adl
+--
+1.7.10.4
+