equal
deleted
inserted
replaced
1575 } |
1575 } |
1576 |
1576 |
1577 static int nt_init(indexObject *self) |
1577 static int nt_init(indexObject *self) |
1578 { |
1578 { |
1579 if (self->nt == NULL) { |
1579 if (self->nt == NULL) { |
1580 if (self->raw_length > INT_MAX / sizeof(nodetree)) { |
1580 if ((size_t)self->raw_length > INT_MAX / sizeof(nodetree)) { |
1581 PyErr_SetString(PyExc_ValueError, "overflow in nt_init"); |
1581 PyErr_SetString(PyExc_ValueError, "overflow in nt_init"); |
1582 return -1; |
1582 return -1; |
1583 } |
1583 } |
1584 self->ntcapacity = self->raw_length < 4 |
1584 self->ntcapacity = self->raw_length < 4 |
1585 ? 4 : (int)self->raw_length / 2; |
1585 ? 4 : (int)self->raw_length / 2; |