mirror of
https://github.com/boostorg/python.git
synced 2026-01-21 17:12:22 +00:00
ssize_t patches merged from HEAD
[SVN r35327]
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <boost/python/object_protocol.hpp>
|
||||
#include <boost/python/errors.hpp>
|
||||
#include <boost/python/object.hpp>
|
||||
#include <boost/python/ssize_t.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace api {
|
||||
|
||||
@@ -106,7 +107,7 @@ namespace // slicing code copied directly out of the Python implementation
|
||||
PySequenceMethods *sq = tp->tp_as_sequence;
|
||||
|
||||
if (sq && sq->sq_slice && ISINT(v) && ISINT(w)) {
|
||||
int ilow = 0, ihigh = INT_MAX;
|
||||
ssize_t ilow = 0, ihigh = ssize_t_max;
|
||||
if (!_PyEval_SliceIndex(v, &ilow))
|
||||
return NULL;
|
||||
if (!_PyEval_SliceIndex(w, &ihigh))
|
||||
@@ -133,7 +134,7 @@ namespace // slicing code copied directly out of the Python implementation
|
||||
PySequenceMethods *sq = tp->tp_as_sequence;
|
||||
|
||||
if (sq && sq->sq_slice && ISINT(v) && ISINT(w)) {
|
||||
int ilow = 0, ihigh = INT_MAX;
|
||||
ssize_t ilow = 0, ihigh = ssize_t_max;
|
||||
if (!_PyEval_SliceIndex(v, &ilow))
|
||||
return -1;
|
||||
if (!_PyEval_SliceIndex(w, &ihigh))
|
||||
|
||||
Reference in New Issue
Block a user