mirror of
https://github.com/boostorg/python.git
synced 2026-01-26 06:42:27 +00:00
MSVC6 and 7 compatibility fixes
[SVN r20779]
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
//
|
||||
|
||||
#include <boost/python/suite/indexing/python_iterator.hpp>
|
||||
#include <boost/python/suite/indexing/workaround.hpp>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// python_iterator factory
|
||||
@@ -24,11 +25,13 @@
|
||||
std::auto_ptr<boost::python::indexing::python_iterator>
|
||||
boost::python::indexing::make_iterator (boost::python::object temp)
|
||||
{
|
||||
std::auto_ptr<python_iterator> result;
|
||||
typedef std::auto_ptr<python_iterator> ptr_type;
|
||||
ptr_type result;
|
||||
|
||||
try
|
||||
{
|
||||
result.reset (new python_iter_iterator (temp));
|
||||
BOOST_PYTHON_INDEXING_RESET_AUTO_PTR (
|
||||
result, (python_iterator *) new python_iter_iterator (temp));
|
||||
}
|
||||
|
||||
catch (boost::python::error_already_set const &)
|
||||
@@ -37,7 +40,8 @@ boost::python::indexing::make_iterator (boost::python::object temp)
|
||||
|
||||
try
|
||||
{
|
||||
result.reset (new python_getitem_iterator (temp));
|
||||
BOOST_PYTHON_INDEXING_RESET_AUTO_PTR (
|
||||
result, (python_iterator *) new python_getitem_iterator (temp));
|
||||
}
|
||||
|
||||
catch (boost::python::error_already_set const &)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// -*- mode:c++ -*-
|
||||
//
|
||||
// Module slice.cpp
|
||||
//
|
||||
// Copyright (c) 2003 Raoul M. Gough
|
||||
@@ -18,6 +16,19 @@
|
||||
#include <boost/python/suite/indexing/slice.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// MSVC6 workarounds
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined (BOOST_NO_MEMBER_TEMPLATES)
|
||||
namespace boost { namespace python { namespace indexing {
|
||||
slice::slice (::boost::python::handle<> const &p) : object (p) { }
|
||||
slice::slice (::boost::python::detail::borrowed_reference p) : object (p) { }
|
||||
slice::slice (::boost::python::detail::new_reference p) : object (p) { }
|
||||
slice::slice (::boost::python::detail::new_non_null_reference p) : object (p) { }
|
||||
} } }
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// slice copy constructor
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user