mirror of
https://git.kore.io/kore.git
synced 2024-11-16 15:06:37 +01:00
fix a few minor problems with pylock.
- when pylocks are deallocated we ended up deleting the wrong object. - do not call Py_DECREF on the op when inside the op its iternext call.
This commit is contained in:
parent
2217c7a2c8
commit
ec7c8b8e1d
@ -2445,7 +2445,7 @@ pylock_dealloc(struct pylock *lock)
|
||||
Py_DECREF((PyObject *)op);
|
||||
}
|
||||
|
||||
PyObject_Del((PyObject *)op);
|
||||
PyObject_Del((PyObject *)lock);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
@ -2572,8 +2572,6 @@ pylock_op_iternext(struct pylock_op *op)
|
||||
TAILQ_REMOVE(&op->lock->ops, op, list);
|
||||
PyErr_SetNone(PyExc_StopIteration);
|
||||
|
||||
Py_DECREF((PyObject *)op);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user