From 0d2cdbbdfee4c49c4269e1f1f2466737a5267ba2 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 16 Dec 2002 04:01:50 +0000 Subject: [PATCH] GCC-2.95.2 workarounds [SVN r16620] --- .../boost/python/converter/builtin_converters.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/boost/python/converter/builtin_converters.hpp b/include/boost/python/converter/builtin_converters.hpp index 5ec25056..9772079c 100644 --- a/include/boost/python/converter/builtin_converters.hpp +++ b/include/boost/python/converter/builtin_converters.hpp @@ -10,7 +10,7 @@ # include # include # include -# include +# include // Since all we can use to decide how to convert an object to_python // is its C++ type, there can be only one such converter for each @@ -81,11 +81,13 @@ namespace detail BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T,expr) // Specialize converters for signed and unsigned T to Python Int -# define BOOST_PYTHON_TO_INT(T) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, PyInt_FromLong(x)) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE( \ - unsigned T, static_cast(x) > std::numeric_limits::max() \ - ? PyLong_FromUnsignedLong(x) \ +# define BOOST_PYTHON_TO_INT(T) \ + BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, PyInt_FromLong(x)) \ + BOOST_PYTHON_TO_PYTHON_BY_VALUE( \ + unsigned T \ + , static_cast(x) > static_cast( \ + std::numeric_limits::max()) \ + ? PyLong_FromUnsignedLong(x) \ : PyInt_FromLong(x)) // Bool is not signed.