static PyTypeObject deque_type;
-/* XXX Todo:
+/* XXX Todo:
If aligned memory allocations become available, make the
deque object 64 byte aligned so that all of the fields
can be retrieved or updated in a single cache line.
b = deque->rightblock;
} else {
i += deque->leftindex;
- n = i / BLOCKLEN;
+ assert(i >= 0);
+ n = (Py_ssize_t)((unsigned) i / BLOCKLEN);
+ i = (Py_ssize_t)((unsigned) i % BLOCKLEN);
i %= BLOCKLEN;
if (index < (Py_SIZE(deque) >> 1)) {
b = deque->leftblock;
(hash = ((PyASCIIObject *) key)->hash) == -1)
{
hash = PyObject_Hash(key);
- if (hash == -1)
+ if (hash == -1)
goto done;
}