Revision: 936
http://svn.sourceforge.net/pygccxml/?rev=936&view=rev
Author: roman_yakovenko
Date: 2007-02-26 13:54:54 -0800 (Mon, 26 Feb 2007)
Log Message:
-----------
fixes for boost python indexing suite compilation error on 64-bit systems and Python 2.5 from Gustavo Carneiro
Modified Paths:
--------------
pyplusplus_dev/indexing_suite_v2/indexing/slice.hpp
pyplusplus_dev/indexing_suite_v2/src/indexing/indexing_slice.cpp
Modified: pyplusplus_dev/indexing_suite_v2/indexing/slice.hpp
===================================================================
--- pyplusplus_dev/indexing_suite_v2/indexing/slice.hpp 2007-02-26 21:44:29 UTC (rev 935)
+++ pyplusplus_dev/indexing_suite_v2/indexing/slice.hpp 2007-02-26 21:54:54 UTC (rev 936)
@@ -48,7 +48,11 @@
// This class provides a convenient interface to Python slice
// objects that contain integer bound and stride values.
- typedef int index_type;
+ #if PY_VERSION_HEX < 0x02050000
+ typedef int index_type;
+ #else
+ typedef Py_ssize_t index_type;
+ #endif
integer_slice (slice const &, index_type length);
// integer_slice must know how big the container is so it can
Modified: pyplusplus_dev/indexing_suite_v2/src/indexing/indexing_slice.cpp
===================================================================
--- pyplusplus_dev/indexing_suite_v2/src/indexing/indexing_slice.cpp 2007-02-26 21:44:29 UTC (rev 935)
+++ pyplusplus_dev/indexing_suite_v2/src/indexing/indexing_slice.cpp 2007-02-26 21:54:54 UTC (rev 936)
@@ -61,8 +61,8 @@
boost::python::throw_error_already_set ();
}
- m_start = std::max (0, std::min (length, m_start));
- m_stop = std::max (0, std::min (length, m_stop));
+ m_start = std::max (static_cast<index_type> (0), std::min (length, m_start));
+ m_stop = std::max (static_cast<index_type> (0), std::min (length, m_stop));
m_direction = (m_step > 0) ? 1 : -1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|