* Remove generator type check in raise_SIGINT_then_send_None
In the Cinder JIT we use a different type for generators, which breaks
the test which uses this function.
In general I believe the intent with generators is they have the right
structure rather than type, so a failure to find the 'send()' method is arguably
more correct if the wrong object is used.
* Also stop using PyGenObject type
static PyObject *
raise_SIGINT_then_send_None(PyObject *self, PyObject *args)
{
- PyGenObject *gen;
+ PyObject *gen;
- if (!PyArg_ParseTuple(args, "O!", &PyGen_Type, &gen))
+ if (!PyArg_ParseTuple(args, "O", &gen))
return NULL;
/* This is used in a test to check what happens if a signal arrives just
because we check for signals before every bytecode operation.
*/
raise(SIGINT);
- return PyObject_CallMethod((PyObject *)gen, "send", "O", Py_None);
+ return PyObject_CallMethod(gen, "send", "O", Py_None);
}