Skip to content

Commit 32b481f

Browse files
author
Anselm Kruis
committed
Stackless issue python#265: fix PyChannel_Send_M
The implementation was buggy. This affects only users of the C-API, that call PyChannel_Send() and PyChannel_Send_nr() for calls from outside of the interpreter (with no main-tasklet).
1 parent e917a36 commit 32b481f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Stackless/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ What's New in Stackless 3.X.X?
99

1010
*Release date: 20XX-XX-XX*
1111

12+
- https://github.com/stackless-dev/stackless/issues/265
13+
Fix C-API functions PyChannel_Send() and PyChannel_Send_nr() for calls from
14+
outside of the interpreter (with no main-tasklet).
15+
1216
- https://github.com/stackless-dev/stackless/issues/264
1317
Implement bpo-35134 for Stackless: move header Include/slp_tstate.h to
1418
Include/cpython/slp_tstate.h.

Stackless/module/channelobject.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,13 @@ the sender will be blocked. Otherwise, the receiver will\n\
425425
be activated immediately, and the sender is put at the end of\n\
426426
the runnables list.");
427427

428+
static PyObject *
429+
impl_channel_send(PyChannelObject *self, PyObject *arg);
430+
428431
static PyObject *
429432
PyChannel_Send_M(PyChannelObject *self, PyObject *arg)
430433
{
431-
PyMethodDef def = {"send", (PyCFunction)PyChannel_Send, METH_O};
434+
PyMethodDef def = {"send", (PyCFunction)impl_channel_send, METH_O};
432435
return PyStackless_CallCMethod_Main(&def, (PyObject *) self, "O", arg);
433436
}
434437

0 commit comments

Comments
 (0)