static block *freeblocks[MAXFREEBLOCKS];
static block *
-newblock(Py_ssize_t len) {
+newblock(void) {
block *b;
if (numfreeblocks) {
numfreeblocks--;
if (deque == NULL)
return NULL;
- b = newblock(0);
+ b = newblock();
if (b == NULL) {
Py_DECREF(deque);
return NULL;
deque_append(dequeobject *deque, PyObject *item)
{
if (deque->rightindex == BLOCKLEN - 1) {
- block *b = newblock(Py_SIZE(deque));
+ block *b = newblock();
if (b == NULL)
return NULL;
b->leftlink = deque->rightblock;
deque_appendleft(dequeobject *deque, PyObject *item)
{
if (deque->leftindex == 0) {
- block *b = newblock(Py_SIZE(deque));
+ block *b = newblock();
if (b == NULL)
return NULL;
b->rightlink = deque->leftblock;
iternext = *Py_TYPE(it)->tp_iternext;
while ((item = iternext(it)) != NULL) {
if (deque->rightindex == BLOCKLEN - 1) {
- block *b = newblock(Py_SIZE(deque));
+ block *b = newblock();
if (b == NULL) {
Py_DECREF(item);
Py_DECREF(it);
iternext = *Py_TYPE(it)->tp_iternext;
while ((item = iternext(it)) != NULL) {
if (deque->leftindex == 0) {
- block *b = newblock(Py_SIZE(deque));
+ block *b = newblock();
if (b == NULL) {
Py_DECREF(item);
Py_DECREF(it);
adversary could cause it to never terminate).
*/
- b = newblock(0);
+ b = newblock();
if (b == NULL) {
PyErr_Clear();
goto alternate_method;
deque->state++;
for (i = 0 ; i < n-1 ; ) {
if (deque->rightindex == BLOCKLEN - 1) {
- block *b = newblock(Py_SIZE(deque) + i);
+ block *b = newblock();
if (b == NULL) {
Py_SIZE(deque) += i;
return NULL;
while (n > 0) {
if (leftindex == 0) {
if (b == NULL) {
- b = newblock(len);
+ b = newblock();
if (b == NULL)
goto done;
}
while (n < 0) {
if (rightindex == BLOCKLEN - 1) {
if (b == NULL) {
- b = newblock(len);
+ b = newblock();
if (b == NULL)
goto done;
}