|
Boost-Commit : |
From: dave_at_[hidden]
Date: 2008-03-24 14:27:22
Author: dave
Date: 2008-03-24 14:27:22 EDT (Mon, 24 Mar 2008)
New Revision: 43845
URL: http://svn.boost.org/trac/boost/changeset/43845
Log:
Work around vc9 bugs
Text files modified:
trunk/libs/python/test/args.cpp | 2 +-
trunk/libs/python/test/numpy.cpp | 29 +++++++++++++----------------
trunk/libs/python/test/pickle3.cpp | 2 +-
trunk/libs/python/test/slice.cpp | 2 +-
4 files changed, 16 insertions(+), 19 deletions(-)
Modified: trunk/libs/python/test/args.cpp
==============================================================================
--- trunk/libs/python/test/args.cpp (original)
+++ trunk/libs/python/test/args.cpp 2008-03-24 14:27:22 EDT (Mon, 24 Mar 2008)
@@ -14,7 +14,7 @@
using namespace boost::python;
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
+#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
# define make_tuple boost::python::make_tuple
#endif
Modified: trunk/libs/python/test/numpy.cpp
==============================================================================
--- trunk/libs/python/test/numpy.cpp (original)
+++ trunk/libs/python/test/numpy.cpp 2008-03-24 14:27:22 EDT (Mon, 24 Mar 2008)
@@ -10,19 +10,16 @@
#include <boost/python/str.hpp>
using namespace boost::python;
-
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
-# define make_tuple ::boost::python::make_tuple
-#endif
+namespace py = boost::python;
// See if we can invoke array() from C++
numeric::array new_array()
{
return numeric::array(
- make_tuple(
- make_tuple(1,2,3)
- , make_tuple(4,5,6)
- , make_tuple(7,8,9)
+ py::make_tuple(
+ py::make_tuple(1,2,3)
+ , py::make_tuple(4,5,6)
+ , py::make_tuple(7,8,9)
)
);
}
@@ -51,7 +48,7 @@
str format("exception type: %sn");
format += "exception value: %sn";
format += "traceback:n%s" ;
- object ret = format % make_tuple(ty, v, tr);
+ object ret = format % py::make_tuple(ty, v, tr);
return ret;
}
}
@@ -71,7 +68,7 @@
// inherits that behavior from object.
void exercise(numeric::array& y, object check)
{
- y[make_tuple(2,1)] = 3;
+ y[py::make_tuple(2,1)] = 3;
CHECK(y);
CHECK(y.astype('D'));
CHECK(y.copy());
@@ -116,12 +113,12 @@
CHECK(y);
CHECK(y.type());
- CHECK(y.factory(make_tuple(1.2, 3.4)));
- CHECK(y.factory(make_tuple(1.2, 3.4), "f8"));
- CHECK(y.factory(make_tuple(1.2, 3.4), "f8", true));
- CHECK(y.factory(make_tuple(1.2, 3.4), "f8", true, false));
- CHECK(y.factory(make_tuple(1.2, 3.4), "f8", true, false, object()));
- CHECK (y.factory(make_tuple(1.2, 3.4), "f8", true, false, object(), make_tuple(1,2,1)));
+ CHECK(y.factory(py::make_tuple(1.2, 3.4)));
+ CHECK(y.factory(py::make_tuple(1.2, 3.4), "f8"));
+ CHECK(y.factory(py::make_tuple(1.2, 3.4), "f8", true));
+ CHECK(y.factory(py::make_tuple(1.2, 3.4), "f8", true, false));
+ CHECK(y.factory(py::make_tuple(1.2, 3.4), "f8", true, false, object()));
+ CHECK (y.factory(py::make_tuple(1.2, 3.4), "f8", true, false, object(), py::make_tuple(1,2,1)));
}
Modified: trunk/libs/python/test/pickle3.cpp
==============================================================================
--- trunk/libs/python/test/pickle3.cpp (original)
+++ trunk/libs/python/test/pickle3.cpp 2008-03-24 14:27:22 EDT (Mon, 24 Mar 2008)
@@ -25,7 +25,7 @@
#include <boost/python/extract.hpp>
#include <boost/python/back_reference.hpp>
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
+#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
# define make_tuple boost::python::make_tuple
#endif
Modified: trunk/libs/python/test/slice.cpp
==============================================================================
--- trunk/libs/python/test/slice.cpp (original)
+++ trunk/libs/python/test/slice.cpp 2008-03-24 14:27:22 EDT (Mon, 24 Mar 2008)
@@ -10,7 +10,7 @@
using namespace boost::python;
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
+#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
# define make_tuple boost::python::make_tuple
#endif
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