kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=d5656fdd3d2abc7e8a1503ecebd915dce819c588
commit d5656fdd3d2abc7e8a1503ecebd915dce819c588 Author: Kai Huuhko <kai.huu...@gmail.com> Date: Wed Feb 3 11:07:27 2016 +0200 Elm.Genlist: Add small optimizations for filter and state cbs --- efl/elementary/genlist.pxi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/efl/elementary/genlist.pxi b/efl/elementary/genlist.pxi index d395297..2a2d78f 100644 --- a/efl/elementary/genlist.pxi +++ b/efl/elementary/genlist.pxi @@ -66,6 +66,8 @@ cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, cons cdef: GenlistItem item = <GenlistItem>data unicode u = _ctouni(part) + bint ret + Genlist o func = item.item_class._state_get_func if func is None: @@ -78,12 +80,14 @@ cdef Eina_Bool _py_elm_genlist_item_state_get(void *data, Evas_Object *obj, cons traceback.print_exc() return 0 - return ret if ret is not None else 0 + return ret cdef Eina_Bool _py_elm_genlist_item_filter_get(void *data, Evas_Object *obj, void *key) with gil: cdef: GenlistItem item = <GenlistItem>data object pykey = <object>key + bint ret + Genlist o func = item.item_class._filter_get_func if func is None: @@ -96,7 +100,7 @@ cdef Eina_Bool _py_elm_genlist_item_filter_get(void *data, Evas_Object *obj, voi traceback.print_exc() return 0 - return 1 if ret else 0 + return ret cdef void _py_elm_genlist_object_item_del(void *data, Evas_Object *obj) with gil: cdef GenlistItem item = <GenlistItem>data --