Beispiel #1
0
static PyObject *
PyChannel_SendException_M(PyChannelObject *self, PyObject *klass,
			  PyObject *args)
{
	return PyStackless_CallMethod_Main((PyObject *) self,
		"send_exception", "(OO)", klass, args);
}
static PyObject *
PyTasklet_RaiseException_M(PyTaskletObject *self, PyObject *klass,
                           PyObject *args)
{
    return PyStackless_CallMethod_Main(
        (PyObject*)self, "raise_exception", "(OO)", klass, args);
}
static int
PyTasklet_Remove_M(PyTaskletObject *task)
{
    PyObject *ret = PyStackless_CallMethod_Main(
        (PyObject*)task, "remove", NULL);

    return slp_return_wrapper(ret);
}
Beispiel #4
0
static PyObject *
PyStackless_Schedule_M(PyObject *retval, int remove)
{
	return PyStackless_CallMethod_Main(
	    slp_module,
	    remove ? "schedule_remove" : "schedule",
	    "O", retval);
}
static PyTaskletObject *
PyTasklet_New_M(PyTypeObject *type, PyObject *func)
{
    char *fmt = "(O)";

    if (func == NULL) fmt = NULL;
    return (PyTaskletObject *) PyStackless_CallMethod_Main(
        (PyObject*)type, "__call__", fmt, func);
}
static PyObject *
PyTasklet_Run_M(PyTaskletObject *task)
{
    return PyStackless_CallMethod_Main((PyObject*)task, "run", NULL);
}
Beispiel #7
0
static PyObject *
PyChannel_Receive_M(PyChannelObject *self)
{
	return PyStackless_CallMethod_Main((PyObject *) self, "receive", NULL);
}
Beispiel #8
0
static PyObject *
PyChannel_Send_M(PyChannelObject *self, PyObject *arg)
{
	return PyStackless_CallMethod_Main((PyObject *) self, "send", "(O)",
					   arg);
}
Beispiel #9
0
static PyObject *
PyStackless_RunWatchdog_M(long timeout)
{
	return PyStackless_CallMethod_Main(slp_module, "run", "(i)", timeout);
}