kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit ec7c8b8e1d23d0b5e9fd7d28f519c252e8037253
parent 2217c7a2c83cea3d76d95b2b8e6ed4bb1640f3be
Author: Joris Vink <joris@coders.se>
Date:   Thu, 14 Mar 2019 17:31:57 +0100

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.

Diffstat:
src/python.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -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); }