Eolian: Add nonzero function and remove useless warning from iterator
This commit is contained in:
parent
e46e109cab
commit
5e74c720a9
|
@ -141,6 +141,9 @@ cdef class EinaIterator(object):
|
|||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def __nonzero__(self):
|
||||
return self.itr is not NULL
|
||||
|
||||
def __next__(self):
|
||||
cdef:
|
||||
|
@ -148,9 +151,6 @@ cdef class EinaIterator(object):
|
|||
bint itr_ret
|
||||
|
||||
if self.itr is NULL:
|
||||
EINA_LOG_DOM_WARN(
|
||||
EOLIAN_DOM, "Iterator is NULL!", NULL
|
||||
)
|
||||
raise StopIteration
|
||||
itr_ret = eina_iterator_next(self.itr, &data)
|
||||
if not itr_ret:
|
||||
|
|
Loading…
Reference in New Issue