Ticket #4596: squash-64-bit-warnings-v2.patch
File squash-64-bit-warnings-v2.patch, 1.7 KB (added by , 12 years ago) |
---|
-
boost/python/detail/caller.hpp
52 52 53 53 inline unsigned arity(PyObject* const& args_) 54 54 { 55 return PyTuple_GET_SIZE(args_);55 return static_cast<unsigned>(PyTuple_GET_SIZE(args_)); 56 56 } 57 57 58 58 // This "result converter" is really just used as -
boost/python/suite/indexing/detail/indexing_suite_detail.hpp
600 600 from_ = min_index; 601 601 } 602 602 else { 603 long from = extract<long>(slice->start);603 Py_ssize_t from = extract<Py_ssize_t>(slice->start); 604 604 if (from < 0) // Negative slice index 605 from += max_index;605 from += Py_ssize_t(max_index); 606 606 if (from < 0) // Clip lower bounds to zero 607 607 from = 0; 608 608 from_ = boost::numeric_cast<Index>(from); … … 614 614 to_ = max_index; 615 615 } 616 616 else { 617 long to = extract<long>(slice->stop);617 Py_ssize_t to = extract<Py_ssize_t>(slice->stop); 618 618 if (to < 0) 619 to += max_index;619 to += Py_ssize_t(max_index); 620 620 if (to < 0) 621 621 to = 0; 622 622 to_ = boost::numeric_cast<Index>(to);