static VALUE Lorcon_open_inject(VALUE self) { struct rldev *rld; Data_Get_Struct(self, struct rldev, rld); if (lorcon_open_inject(rld->context) < 0) return Qfalse; return Qtrue; }
static PyObject* PyLorcon2_Context_open_inject(PyLorcon2_Context *self) { if (lorcon_open_inject(self->context) < 0) { PyErr_SetString(Lorcon2Exception, lorcon_get_error(self->context)); return NULL; } self->monitored = 1; Py_INCREF(Py_None); return Py_None; }