Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55449 - trunk/libs/mpi/src/python
From: troyer_at_[hidden]
Date: 2009-08-07 13:04:58


Author: troyer
Date: 2009-08-07 13:04:58 EDT (Fri, 07 Aug 2009)
New Revision: 55449
URL: http://svn.boost.org/trac/boost/changeset/55449

Log:
proposed fix for ticket 2399
Text files modified:
   trunk/libs/mpi/src/python/py_request.cpp | 11 ++++++++++-
   1 files changed, 10 insertions(+), 1 deletions(-)

Modified: trunk/libs/mpi/src/python/py_request.cpp
==============================================================================
--- trunk/libs/mpi/src/python/py_request.cpp (original)
+++ trunk/libs/mpi/src/python/py_request.cpp 2009-08-07 13:04:58 EDT (Fri, 07 Aug 2009)
@@ -66,6 +66,15 @@
 
 
 namespace boost { namespace mpi { namespace python {
+
+const object request_test(request &req)
+{
+ ::boost::optional<status> stat = req.test();
+ if (stat)
+ return object(*stat);
+ else
+ return object();
+}
 
 extern const char* request_docstring;
 extern const char* request_with_value_docstring;
@@ -83,7 +92,7 @@
     typedef request cl;
     class_<cl>("Request", request_docstring, no_init)
       .def("wait", &cl::wait, request_wait_docstring)
- .def("test", &cl::test, request_test_docstring)
+ .def("test", &request_test, request_test_docstring)
       .def("cancel", &cl::cancel, request_cancel_docstring)
       ;
   }


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