File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#define OPERATORS_UK112000_H_
33
44#include < boost/python/detail/functions.hpp>
5- #if !defined(__GNUC__) || defined(__SGI_STL_PORT)
5+ // When STLport is used with native streams, _STL::ostringstream().str() is not
6+ // _STL::string, but std::string.
7+ #if defined(__SGI_STL_PORT) ? __SGI_STL_OWN_IOSTREAMS : !defined(__GNUC__)
68# include < sstream>
79#else
810# include < strstream>
@@ -473,17 +475,15 @@ namespace detail
473475 {
474476 tuple args (ref (arguments, ref::increment_count));
475477
476- #if !defined(__GNUC__) || defined(__SGI_STL_PORT)
478+ // When STLport is used with native streams, _STL::ostringstream().str() is not
479+ // _STL::string, but std::string.
480+ #if defined(__SGI_STL_PORT) ? __SGI_STL_OWN_IOSTREAMS : !defined(__GNUC__)
477481 std::ostringstream s;
478482 s << BOOST_PYTHON_CONVERSION::from_python (args[0 ].get (), boost::python::type<operand>());
483+ return BOOST_PYTHON_CONVERSION::to_python (s.str ());
479484#else
480485 std::ostrstream s;
481486 s << BOOST_PYTHON_CONVERSION::from_python (args[0 ].get (), boost::python::type<operand>()) << char ();
482- #endif
483-
484- #if !defined(__GNUC__) || defined(__SGI_STL_PORT)
485- return BOOST_PYTHON_CONVERSION::to_python (s.str ());
486- #else
487487 return BOOST_PYTHON_CONVERSION::to_python (const_cast <char const *>(s.str ()));
488488#endif
489489 }
You can’t perform that action at this time.
0 commit comments