mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
pytevent: Define missing TeventFd_Type object
The type objects for Fd was declared but never defined, resulting in segfaults when it was used. Define it. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
This commit is contained in:
parent
f5838df58e
commit
4399dc582f
@ -415,6 +415,19 @@ static void py_fd_handler(struct tevent_context *ev,
|
||||
Py_XDECREF(ret);
|
||||
}
|
||||
|
||||
static void py_tevent_fp_dealloc(TeventFd_Object *self)
|
||||
{
|
||||
talloc_free(self->fd);
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
static PyTypeObject TeventFd_Type = {
|
||||
.tp_name = "tevent.Fd",
|
||||
.tp_basicsize = sizeof(TeventFd_Object),
|
||||
.tp_dealloc = (destructor)py_tevent_fp_dealloc,
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT,
|
||||
};
|
||||
|
||||
static PyObject *py_tevent_context_add_fd(TeventContext_Object *self, PyObject *args)
|
||||
{
|
||||
int fd, flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user