diff --git a/test/test_array_ext.cpp b/test/test_array_ext.cpp index 3fbfc98e..718a434b 100755 --- a/test/test_array_ext.cpp +++ b/test/test_array_ext.cpp @@ -19,11 +19,6 @@ #include #include -#include - -#include -#include - #include #include #include @@ -54,13 +49,6 @@ boost::python::indexing::iterator_pair get_array_wrap() , boost::python::indexing::end(array)); } -std::string repr (int_wrapper const &i) -{ - std::stringstream temp; - temp << i; - return temp.str(); -} - BOOST_PYTHON_MODULE(test_array_ext) { boost::python::implicitly_convertible (); @@ -69,7 +57,7 @@ BOOST_PYTHON_MODULE(test_array_ext) boost::python::class_("int_wrapper", boost::python::init()) .def ("increment", &int_wrapper::increment) - .def ("__repr__", repr) + .def ("__repr__", &int_wrapper::repr) .def ("__cmp__", compare) ; diff --git a/test/test_deque_ext.cpp b/test/test_deque_ext.cpp index b6d7df58..395f4719 100755 --- a/test/test_deque_ext.cpp +++ b/test/test_deque_ext.cpp @@ -18,13 +18,8 @@ #include "int_wrapper.hpp" #include -#include #include - #include -#include -#include - #include #include #include @@ -34,13 +29,6 @@ bool int_wrapper::our_trace_flag = true; unsigned int_wrapper::our_object_counter = 0; -std::string repr (int_wrapper const &i) -{ - std::stringstream temp; - temp << i; - return temp.str(); -} - BOOST_PYTHON_MODULE(test_deque_ext) { boost::python::implicitly_convertible (); @@ -49,7 +37,7 @@ BOOST_PYTHON_MODULE(test_deque_ext) boost::python::class_("int_wrapper", boost::python::init()) .def ("increment", &int_wrapper::increment) - .def ("__repr__", repr) + .def ("__repr__", &int_wrapper::repr) .def ("__cmp__", compare) ; diff --git a/test/test_list_ext.cpp b/test/test_list_ext.cpp index 3620a729..3c89b99b 100755 --- a/test/test_list_ext.cpp +++ b/test/test_list_ext.cpp @@ -18,13 +18,7 @@ #include "int_wrapper.hpp" #include -#include -#include - #include -#include -#include - #include #include #include @@ -34,13 +28,6 @@ bool int_wrapper::our_trace_flag = true; unsigned int_wrapper::our_object_counter = 0; -std::string repr (int_wrapper const &i) -{ - std::stringstream temp; - temp << i; - return temp.str(); -} - BOOST_PYTHON_MODULE(test_list_ext) { boost::python::implicitly_convertible (); @@ -49,7 +36,7 @@ BOOST_PYTHON_MODULE(test_list_ext) boost::python::class_("int_wrapper", boost::python::init()) .def ("increment", &int_wrapper::increment) - .def ("__repr__", repr) + .def ("__repr__", &int_wrapper::repr) .def ("__cmp__", compare) ; diff --git a/test/test_vector_ext.cpp b/test/test_vector_ext.cpp index 094e10b8..76ee657d 100755 --- a/test/test_vector_ext.cpp +++ b/test/test_vector_ext.cpp @@ -20,13 +20,8 @@ #include "int_wrapper.hpp" #include -#include #include - #include -#include -#include - #include #include #include @@ -36,13 +31,6 @@ bool int_wrapper::our_trace_flag = true; unsigned int_wrapper::our_object_counter = 0; -std::string repr (int_wrapper const &i) -{ - std::stringstream temp; - temp << i; - return temp.str(); -} - BOOST_PYTHON_MODULE(test_vector_ext) { boost::python::implicitly_convertible (); @@ -51,7 +39,7 @@ BOOST_PYTHON_MODULE(test_vector_ext) boost::python::class_("int_wrapper", boost::python::init()) .def ("increment", &int_wrapper::increment) - .def ("__repr__", repr) + .def ("__repr__", &int_wrapper::repr) .def ("__cmp__", compare) ; diff --git a/test/testnonlinear.cpp b/test/testnonlinear.cpp index 0101708a..6fae792b 100755 --- a/test/testnonlinear.cpp +++ b/test/testnonlinear.cpp @@ -17,12 +17,8 @@ #include "int_wrapper.hpp" #include - #include #include -#include -#include - #include #include #include @@ -32,13 +28,6 @@ bool int_wrapper::our_trace_flag = true; unsigned int_wrapper::our_object_counter = 0; -std::string repr (int_wrapper const &i) -{ - std::stringstream temp; - temp << i; - return temp.str(); -} - BOOST_PYTHON_MODULE(testnonlinear) { boost::python::implicitly_convertible (); @@ -47,7 +36,7 @@ BOOST_PYTHON_MODULE(testnonlinear) boost::python::class_ ("int_wrapper", boost::python::init()) .def ("increment", &int_wrapper::increment) - .def ("__repr__", repr) + .def ("__repr__", &int_wrapper::repr) .def ("__cmp__", compare) ;