2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Boost.Python: Python 3 compatibility patch by Trigve Siver (trac ticket 4497)

[SVN r65055]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2010-08-27 17:28:26 +00:00
parent 38e92833f6
commit bd8a9eb1fd
2 changed files with 8 additions and 1 deletions

View File

@@ -53,6 +53,9 @@ enum operator_id
op_nonzero,
#endif
op_repr
#if PY_VERSION_HEX >= 0x03000000
,op_truediv
#endif
};
}}} // namespace boost::python::detail

View File

@@ -212,7 +212,11 @@ namespace self_ns \
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, >>)