Skip to content

Commit 68d5dcc

Browse files
committed
python: use Py_ssize_t everywhere
ref: https://peps.python.org/pep-0353/
1 parent b1765ff commit 68d5dcc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ortools/linear_solver/python/model_builder_helper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ std::shared_ptr<LinearExpr> WeightedSumArguments(py::sequence expressions,
291291

292292
bool fast_coeffs = false;
293293
const void* raw_coeffs = nullptr;
294-
ssize_t coeff_stride = 0;
294+
Py_ssize_t coeff_stride = 0;
295295
enum { kInt64, kInt32, kDouble } coeff_type = kInt64;
296296

297297
if (py::isinstance<py::array>(coefficients)) {

ortools/sat/python/cp_model_helper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ std::shared_ptr<LinearExpr> WeightedSumArguments(py::sequence expressions,
317317
bool has_floats = false;
318318
bool fast_coeffs = false;
319319
const void* raw_coeffs = nullptr;
320-
ssize_t coeff_stride = 0;
320+
Py_ssize_t coeff_stride = 0;
321321

322322
enum { kInt64, kInt32, kDouble } coeff_type = kInt64;
323323

0 commit comments

Comments
 (0)