|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53718 - in sandbox-branches/bhy/py3k/boost/python: . detail
From: divinekid_at_[hidden]
Date: 2009-06-07 10:06:18
Author: bhy
Date: 2009-06-07 10:06:17 EDT (Sun, 07 Jun 2009)
New Revision: 53718
URL: http://svn.boost.org/trac/boost/changeset/53718
Log:
fix __nonzero__ -> __bool__ change
Text files modified:
sandbox-branches/bhy/py3k/boost/python/detail/operator_id.hpp | 4 ++++
sandbox-branches/bhy/py3k/boost/python/operators.hpp | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
Modified: sandbox-branches/bhy/py3k/boost/python/detail/operator_id.hpp
==============================================================================
--- sandbox-branches/bhy/py3k/boost/python/detail/operator_id.hpp (original)
+++ sandbox-branches/bhy/py3k/boost/python/detail/operator_id.hpp 2009-06-07 10:06:17 EDT (Sun, 07 Jun 2009)
@@ -47,7 +47,11 @@
op_ixor,
op_ior,
op_complex,
+#if PY_VERSION_HEX >= 0x03000000
+ op_bool,
+#else
op_nonzero,
+#endif
op_repr
};
Modified: sandbox-branches/bhy/py3k/boost/python/operators.hpp
==============================================================================
--- sandbox-branches/bhy/py3k/boost/python/operators.hpp (original)
+++ sandbox-branches/bhy/py3k/boost/python/operators.hpp 2009-06-07 10:06:17 EDT (Sun, 07 Jun 2009)
@@ -341,7 +341,11 @@
BOOST_PYTHON_UNARY_OPERATOR(pos, +, operator+)
BOOST_PYTHON_UNARY_OPERATOR(abs, abs, abs)
BOOST_PYTHON_UNARY_OPERATOR(invert, ~, operator~)
+#if PY_VERSION_HEX >= 0x03000000
+BOOST_PYTHON_UNARY_OPERATOR(bool, !!, operator!)
+#else
BOOST_PYTHON_UNARY_OPERATOR(nonzero, !!, operator!)
+#endif
BOOST_PYTHON_UNARY_OPERATOR(int, long, int_)
BOOST_PYTHON_UNARY_OPERATOR(long, PyLong_FromLong, long_)
BOOST_PYTHON_UNARY_OPERATOR(float, double, float_)
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