Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2007-11-16 20:51:04


Author: djowel
Date: 2007-11-16 20:51:04 EST (Fri, 16 Nov 2007)
New Revision: 41164
URL: http://svn.boost.org/trac/boost/changeset/41164

Log:
fix for trac ticket #1450
Text files modified:
   trunk/libs/python/test/defaults.cpp | 29 +++++++++++++----------------
   1 files changed, 13 insertions(+), 16 deletions(-)

Modified: trunk/libs/python/test/defaults.cpp
==============================================================================
--- trunk/libs/python/test/defaults.cpp (original)
+++ trunk/libs/python/test/defaults.cpp 2007-11-16 20:51:04 EST (Fri, 16 Nov 2007)
@@ -16,10 +16,7 @@
 #endif
 
 using namespace boost::python;
-
-#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))
-# define make_tuple boost::python::make_tuple
-#endif
+namespace bpl = boost::python;
 
 char const* const format = "int(%s); char(%s); string(%s); double(%s); ";
 
@@ -31,25 +28,25 @@
 object
 bar(int a, char b, std::string c, double d)
 {
- return format % make_tuple(a, b, c, d);
+ return format % bpl::make_tuple(a, b, c, d);
 }
 
 object
 bar(int a, char b, std::string c)
 {
- return format % make_tuple(a, b, c, 0.0);
+ return format % bpl::make_tuple(a, b, c, 0.0);
 }
 
 object
 bar(int a, char b)
 {
- return format % make_tuple(a, b, "default", 0.0);
+ return format % bpl::make_tuple(a, b, "default", 0.0);
 }
 
 object
 bar(int a)
 {
- return format % make_tuple(a, 'D', "default", 0.0);
+ return format % bpl::make_tuple(a, 'D', "default", 0.0);
 }
 
 BOOST_PYTHON_FUNCTION_OVERLOADS(bar_stubs, bar, 1, 4)
@@ -62,7 +59,7 @@
 object
 foo(int a, char b = 'D', std::string c = "default", double d = 0.0)
 {
- return format % make_tuple(a, b, c, d);
+ return format % bpl::make_tuple(a, b, c, d);
 }
 
 BOOST_PYTHON_FUNCTION_OVERLOADS(foo_stubs, foo, 1, 4)
@@ -79,7 +76,7 @@
     object
     get_state() const
     {
- return format % make_tuple(a, b, c, d);
+ return format % bpl::make_tuple(a, b, c, d);
     }
 
     int a; char b; std::string c; double d;
@@ -91,17 +88,17 @@
     X() {}
 
     X(int a, char b = 'D', std::string c = "constructor", double d = 0.0)
- : state(format % make_tuple(a, b, c, d))
+ : state(format % bpl::make_tuple(a, b, c, d))
     {}
 
     X(std::string s, bool b)
- : state("Got exactly two arguments from constructor: string(%s); bool(%s); " % make_tuple(s, b*1))
+ : state("Got exactly two arguments from constructor: string(%s); bool(%s); " % bpl::make_tuple(s, b*1))
     {}
 
     object
     bar(int a, char b = 'D', std::string c = "default", double d = 0.0) const
     {
- return format % make_tuple(a, b, c, d);
+ return format % bpl::make_tuple(a, b, c, d);
     }
 
     Y const&
@@ -118,19 +115,19 @@
     object
     foo(int a, bool b=false) const
     {
- return "int(%s); bool(%s); " % make_tuple(a, b*1);
+ return "int(%s); bool(%s); " % bpl::make_tuple(a, b*1);
     }
 
     object
     foo(std::string a, bool b=false) const
     {
- return "string(%s); bool(%s); " % make_tuple(a, b*1);
+ return "string(%s); bool(%s); " % bpl::make_tuple(a, b*1);
     }
 
     object
     foo(list a, list b, bool c=false) const
     {
- return "list(%s); list(%s); bool(%s); " % make_tuple(a, b, c*1);
+ return "list(%s); list(%s); bool(%s); " % bpl::make_tuple(a, b, c*1);
     }
 
     object


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