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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user