kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=4639836d3e970a2a28de859e1bd000452d9404bc
commit 4639836d3e970a2a28de859e1bd000452d9404bc Author: Kai Huuhko <[email protected]> Date: Sun Jun 1 15:37:41 2014 +0300 warnings-- --- efl/elementary/configuration.pyx | 2 +- efl/elementary/genlist_item.pxi | 12 +++--------- efl/elementary/window.pyx | 6 +++--- efl/evas/efl.evas.pyx | 10 ++-------- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx index ed40e15..e3c3b7d 100644 --- a/efl/elementary/configuration.pyx +++ b/efl/elementary/configuration.pyx @@ -783,7 +783,7 @@ cdef class Configuration(object): """ def __get__(self): cdef: - Eina_List *lst = elm_config_color_overlay_list_get() + const Eina_List *lst = elm_config_color_overlay_list_get() Elm_Color_Overlay *ov const char *color_class diff --git a/efl/elementary/genlist_item.pxi b/efl/elementary/genlist_item.pxi index 34ef23d..96daebe 100644 --- a/efl/elementary/genlist_item.pxi +++ b/efl/elementary/genlist_item.pxi @@ -598,15 +598,9 @@ cdef class GenlistItem(ObjectItem): .. versionadded:: 1.9 """ - cdef: - Eina_List *l = elm_genlist_item_subitems_get(self.item) - list ret = list() - - while l: - ret.append(object_from_instance(<Evas_Object*>l.data)) - l = l.next - - return ret + return _object_item_list_to_python( + elm_genlist_item_subitems_get(self.item) + ) property expanded: """This function flags the item of type #ELM_GENLIST_ITEM_TREE as diff --git a/efl/elementary/window.pyx b/efl/elementary/window.pyx index 8ec7b44..849bec2 100644 --- a/efl/elementary/window.pyx +++ b/efl/elementary/window.pyx @@ -508,7 +508,7 @@ cdef class Window(Object): :return type: Elm_Win_Type .. versionadded: 1.9 - + """ return elm_win_type_get(self.obj) @@ -836,7 +836,7 @@ cdef class Window(Object): """ def __set__(self, list profiles): cdef: - const char **array + const char **array = NULL unsigned int arr_len = len(profiles) unsigned int i @@ -862,7 +862,7 @@ cdef class Window(Object): def available_profiles_set(self, list profiles): cdef: - const char **array + const char **array = NULL unsigned int arr_len = len(profiles) unsigned int i diff --git a/efl/evas/efl.evas.pyx b/efl/evas/efl.evas.pyx index 7be48df..fa63f8a 100644 --- a/efl/evas/efl.evas.pyx +++ b/efl/evas/efl.evas.pyx @@ -16,6 +16,7 @@ # along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. cimport efl.evas.enums as enums +from efl.utils.conversions cimport eina_list_strings_to_python_list EVAS_LAYER_MIN = enums.EVAS_LAYER_MIN EVAS_LAYER_MAX = enums.EVAS_LAYER_MAX @@ -310,14 +311,7 @@ def font_path_global_list(): .. versionadded: 1.10 """ - cdef Eina_List *lst = evas_font_path_global_list() - - ret = [] - while lst != NULL: - ret.append(<char*> lst.data) - lst = lst.next - - return ret + return eina_list_strings_to_python_list(evas_font_path_global_list()) --
