|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65055 - in trunk/boost/python: . detail
From: rwgk_at_[hidden]
Date: 2010-08-27 13:28:28
Author: rwgk
Date: 2010-08-27 13:28:26 EDT (Fri, 27 Aug 2010)
New Revision: 65055
URL: http://svn.boost.org/trac/boost/changeset/65055
Log:
Boost.Python: Python 3 compatibility patch by Trigve Siver (trac ticket 4497)
Text files modified:
trunk/boost/python/detail/operator_id.hpp | 3 +++
trunk/boost/python/operators.hpp | 6 +++++-
2 files changed, 8 insertions(+), 1 deletions(-)
Modified: trunk/boost/python/detail/operator_id.hpp
==============================================================================
--- trunk/boost/python/detail/operator_id.hpp (original)
+++ trunk/boost/python/detail/operator_id.hpp 2010-08-27 13:28:26 EDT (Fri, 27 Aug 2010)
@@ -53,6 +53,9 @@
op_nonzero,
#endif
op_repr
+#if PY_VERSION_HEX >= 0x03000000
+ ,op_truediv
+#endif
};
}}} // namespace boost::python::detail
Modified: trunk/boost/python/operators.hpp
==============================================================================
--- trunk/boost/python/operators.hpp (original)
+++ trunk/boost/python/operators.hpp 2010-08-27 13:28:26 EDT (Fri, 27 Aug 2010)
@@ -212,7 +212,11 @@
BOOST_PYTHON_BINARY_OPERATOR(add, radd, +)
BOOST_PYTHON_BINARY_OPERATOR(sub, rsub, -)
BOOST_PYTHON_BINARY_OPERATOR(mul, rmul, *)
-BOOST_PYTHON_BINARY_OPERATOR(div, rdiv, /)
+#if PY_VERSION_HEX >= 0x03000000
+ BOOST_PYTHON_BINARY_OPERATOR(truediv, rtruediv, /)
+#else
+ BOOST_PYTHON_BINARY_OPERATOR(div, rdiv, /)
+#endif
BOOST_PYTHON_BINARY_OPERATOR(mod, rmod, %)
BOOST_PYTHON_BINARY_OPERATOR(lshift, rlshift, <<)
BOOST_PYTHON_BINARY_OPERATOR(rshift, rrshift, >>)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk