ecore.FdHandler: implement is_deleted for consistency with other classes

This commit is contained in:
Davide Andreoli 2016-08-14 10:35:58 +02:00
parent 939cd71702
commit 380e7a58ff
1 changed files with 11 additions and 0 deletions

View File

@ -144,6 +144,17 @@ cdef class FdHandler(object):
cdef object _exec(self):
return self.func(self, *self.args, **self.kargs)
def is_deleted(self):
"""Check if the object has been deleted thus leaving the object shallow.
:return: True if the object has been deleted yet, False otherwise.
:rtype: bool
.. versionadded:: 1.18
"""
return bool(self.obj == NULL)
def delete(self):
"""Stop callback emission and free internal resources."""
if self.obj != NULL: