2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 17:52:17 +00:00

new boost/python/ssize_t.hpp; avoids potential clash of Py_ssize_t typedef and PY_SSIZE_T_MIN/MAX macros with definitions from other libraries

[SVN r35325]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2006-09-26 00:25:07 +00:00
parent c7fb2f7047
commit c6f2aa4ef2
12 changed files with 166 additions and 30 deletions

View File

@@ -3,6 +3,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/python/list.hpp>
#include <boost/python/ssize_t.hpp>
namespace boost { namespace python { namespace detail {
@@ -53,7 +54,7 @@ long list_base::index(object_cref value) const
return result;
}
void list_base::insert(Py_ssize_t index, object_cref item)
void list_base::insert(ssize_t index, object_cref item)
{
if (PyList_CheckExact(this->ptr()))
{
@@ -79,7 +80,7 @@ object list_base::pop()
return this->attr("pop")();
}
object list_base::pop(Py_ssize_t index)
object list_base::pop(ssize_t index)
{
return this->pop(object(index));
}