summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-01-24 22:49:18 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2014-01-24 22:52:34 +0200
commitb21fde2ba7b49d54b21ce860844dbeba3232acf2 (patch)
treefdf027a53ed971be15c64da9903b3e2a160adc56 /efl
parent445211f3691e8986b4eae7fa98b40a4e3754272f (diff)
Silence warnings in Cython 0.20
Diffstat (limited to 'efl')
-rw-r--r--efl/edje/efl.edje.pyx8
-rw-r--r--efl/edje/efl.edje_edit_part_state.pxi5
-rw-r--r--efl/edje/efl.edje_object.pxi4
-rw-r--r--efl/elementary/background.pyx10
-rw-r--r--efl/elementary/configuration.pyx20
-rw-r--r--efl/elementary/entry.pyx3
-rw-r--r--efl/elementary/general.pyx6
-rw-r--r--efl/elementary/genlist_item.pxi6
-rw-r--r--efl/elementary/hoversel.pyx14
-rw-r--r--efl/elementary/image.pyx10
-rw-r--r--efl/elementary/list.pyx3
-rw-r--r--efl/elementary/menu.pyx6
-rw-r--r--efl/elementary/naviframe.pyx7
-rw-r--r--efl/elementary/thumb.pyx10
-rw-r--r--efl/emotion/efl.emotion.pyx9
-rw-r--r--efl/evas/efl.evas_canvas.pxi25
-rw-r--r--efl/evas/efl.evas_object_image.pxi10
-rw-r--r--efl/evas/efl.evas_object_smart.pxi5
18 files changed, 116 insertions, 45 deletions
diff --git a/efl/edje/efl.edje.pyx b/efl/edje/efl.edje.pyx
index 10de817..a0e2322 100644
--- a/efl/edje/efl.edje.pyx
+++ b/efl/edje/efl.edje.pyx
@@ -260,7 +260,9 @@ def color_class_del(color_class):
260 260
261 261
262def color_class_list(): 262def color_class_list():
263 cdef Eina_List *lst, *itr 263 cdef:
264 Eina_List *lst
265 Eina_List *itr
264 ret = [] 266 ret = []
265 lst = edje_color_class_list() 267 lst = edje_color_class_list()
266 itr = lst 268 itr = lst
@@ -290,7 +292,9 @@ def text_class_del(text_class):
290 292
291 293
292def text_class_list(): 294def text_class_list():
293 cdef Eina_List *lst, *itr 295 cdef:
296 Eina_List *lst
297 Eina_List *itr
294 ret = [] 298 ret = []
295 lst = edje_text_class_list() 299 lst = edje_text_class_list()
296 itr = lst 300 itr = lst
diff --git a/efl/edje/efl.edje_edit_part_state.pxi b/efl/edje/efl.edje_edit_part_state.pxi
index f8a2b48..bcd7be5 100644
--- a/efl/edje/efl.edje_edit_part_state.pxi
+++ b/efl/edje/efl.edje_edit_part_state.pxi
@@ -64,7 +64,10 @@ cdef class State:
64 self.value)) 64 self.value))
65 """ 65 """
66 def rel1_to_get(self): 66 def rel1_to_get(self):
67 cdef const_char *tx, *ty 67 cdef:
68 const_char *tx
69 const_char *ty
70
68 tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name, 71 tx = edje_edit_state_rel1_to_x_get(self.edje.obj, self.part, self.name,
69 self.value) 72 self.value)
70 ty = edje_edit_state_rel1_to_y_get(self.edje.obj, self.part, self.name, 73 ty = edje_edit_state_rel1_to_y_get(self.edje.obj, self.part, self.name,
diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi
index 4de2fa9..6e412d7 100644
--- a/efl/edje/efl.edje_object.pxi
+++ b/efl/edje/efl.edje_object.pxi
@@ -213,7 +213,9 @@ cdef class Edje(Object):
213 :rtype: tuple of str 213 :rtype: tuple of str
214 214
215 """ 215 """
216 cdef const_char *file, *group 216 cdef:
217 const_char *file
218 const_char *group
217 edje_object_file_get(self.obj, &file, &group) 219 edje_object_file_get(self.obj, &file, &group)
218 return (_ctouni(file), _ctouni(group)) 220 return (_ctouni(file), _ctouni(group))
219 221
diff --git a/efl/elementary/background.pyx b/efl/elementary/background.pyx
index 30c041e..c9c6605 100644
--- a/efl/elementary/background.pyx
+++ b/efl/elementary/background.pyx
@@ -115,7 +115,10 @@ cdef class Background(LayoutClass):
115 115
116 """ 116 """
117 def __get__(self): 117 def __get__(self):
118 cdef const_char *filename, *group 118 cdef:
119 const_char *filename
120 const_char *group
121
119 elm_bg_file_get(self.obj, &filename, &group) 122 elm_bg_file_get(self.obj, &filename, &group)
120 return (_ctouni(filename), _ctouni(group)) 123 return (_ctouni(filename), _ctouni(group))
121 124
@@ -141,7 +144,10 @@ cdef class Background(LayoutClass):
141 <const_char *>group if group is not None else NULL): 144 <const_char *>group if group is not None else NULL):
142 raise RuntimeError("Could not set background file.") 145 raise RuntimeError("Could not set background file.")
143 def file_get(self): 146 def file_get(self):
144 cdef const_char *filename, *group 147 cdef:
148 const_char *filename
149 const_char *group
150
145 elm_bg_file_get(self.obj, &filename, &group) 151 elm_bg_file_get(self.obj, &filename, &group)
146 return (_ctouni(filename), _ctouni(group)) 152 return (_ctouni(filename), _ctouni(group))
147 153
diff --git a/efl/elementary/configuration.pyx b/efl/elementary/configuration.pyx
index 44b337e..7aef555 100644
--- a/efl/elementary/configuration.pyx
+++ b/efl/elementary/configuration.pyx
@@ -590,9 +590,12 @@ cdef class Configuration(object):
590 590
591 """ 591 """
592 def __get__(self): 592 def __get__(self):
593 cdef Eina_List *lst 593 cdef:
594 cdef Elm_Text_Class *data 594 Eina_List *lst
595 cdef const_char *name, *desc 595 Elm_Text_Class *data
596 const_char *name
597 const_char *desc
598
596 ret = [] 599 ret = []
597 lst = elm_config_text_classes_list_get() 600 lst = elm_config_text_classes_list_get()
598 while lst: 601 while lst:
@@ -617,10 +620,13 @@ cdef class Configuration(object):
617 620
618 """ 621 """
619 def __get__(self): 622 def __get__(self):
620 cdef const_Eina_List *lst 623 cdef:
621 cdef Elm_Font_Overlay *data 624 const_Eina_List *lst
622 cdef const_char *text_class, *font 625 Elm_Font_Overlay *data
623 cdef Evas_Font_Size size 626 const_char *text_class
627 const_char *font
628 Evas_Font_Size size
629
624 ret = [] 630 ret = []
625 lst = elm_config_font_overlay_list_get() 631 lst = elm_config_font_overlay_list_get()
626 while lst: 632 while lst:
diff --git a/efl/elementary/entry.pyx b/efl/elementary/entry.pyx
index c08947a..2668223 100644
--- a/efl/elementary/entry.pyx
+++ b/efl/elementary/entry.pyx
@@ -604,7 +604,8 @@ cdef class EntryContextMenuItem(object):
604 """ 604 """
605 def __get__(self): 605 def __get__(self):
606 cdef: 606 cdef:
607 const_char *icon_file, *icon_group 607 const_char *icon_file
608 const_char *icon_group
608 Elm_Icon_Type icon_type 609 Elm_Icon_Type icon_type
609 elm_entry_context_menu_item_icon_get(self.item, 610 elm_entry_context_menu_item_icon_get(self.item,
610 &icon_file, 611 &icon_file,
diff --git a/efl/elementary/general.pyx b/efl/elementary/general.pyx
index b43855f..5eed705 100644
--- a/efl/elementary/general.pyx
+++ b/efl/elementary/general.pyx
@@ -195,8 +195,10 @@ def init():
195 195
196 # FIXME: Why are we passing the cl args to elm_init here? 196 # FIXME: Why are we passing the cl args to elm_init here?
197 197
198 cdef int argc, i, arg_len 198 cdef:
199 cdef char **argv, *arg 199 int argc, i, arg_len
200 char **argv
201 char *arg
200 202
201 argc = len(sys.argv) 203 argc = len(sys.argv)
202 argv = <char **>PyMem_Malloc(argc * sizeof(char *)) 204 argv = <char **>PyMem_Malloc(argc * sizeof(char *))
diff --git a/efl/elementary/genlist_item.pxi b/efl/elementary/genlist_item.pxi
index a0d8d63..68282aa 100644
--- a/efl/elementary/genlist_item.pxi
+++ b/efl/elementary/genlist_item.pxi
@@ -161,7 +161,8 @@ cdef class GenlistItem(ObjectItem):
161 161
162 """ 162 """
163 cdef: 163 cdef:
164 Elm_Object_Item *item, *before 164 Elm_Object_Item *item
165 Elm_Object_Item *before
165 Genlist genlist = before_item.widget 166 Genlist genlist = before_item.widget
166 Evas_Smart_Cb cb = NULL 167 Evas_Smart_Cb cb = NULL
167 168
@@ -195,7 +196,8 @@ cdef class GenlistItem(ObjectItem):
195 196
196 """ 197 """
197 cdef: 198 cdef:
198 Elm_Object_Item *item, *after 199 Elm_Object_Item *item
200 Elm_Object_Item *after
199 Genlist genlist = after_item.widget 201 Genlist genlist = after_item.widget
200 Evas_Smart_Cb cb = NULL 202 Evas_Smart_Cb cb = NULL
201 203
diff --git a/efl/elementary/hoversel.pyx b/efl/elementary/hoversel.pyx
index cc98896..a7971f9 100644
--- a/efl/elementary/hoversel.pyx
+++ b/efl/elementary/hoversel.pyx
@@ -193,8 +193,11 @@ cdef class HoverselItem(ObjectItem):
193 a3) 193 a3)
194 194
195 def __get__(self): 195 def __get__(self):
196 cdef const_char *icon_file, *icon_group 196 cdef:
197 cdef Elm_Icon_Type icon_type 197 const_char *icon_file
198 const_char *icon_group
199 Elm_Icon_Type icon_type
200
198 if self.item == NULL: 201 if self.item == NULL:
199 a1 = self.icon_file.decode("UTF-8") 202 a1 = self.icon_file.decode("UTF-8")
200 a2 = self.icon_group.decode("UTF-8") 203 a2 = self.icon_group.decode("UTF-8")
@@ -218,8 +221,11 @@ cdef class HoverselItem(ObjectItem):
218 <const_char *>a2 if a2 is not None else NULL, 221 <const_char *>a2 if a2 is not None else NULL,
219 a3) 222 a3)
220 def icon_get(self): 223 def icon_get(self):
221 cdef const_char *icon_file, *icon_group 224 cdef:
222 cdef Elm_Icon_Type icon_type 225 const_char *icon_file
226 const_char *icon_group
227 Elm_Icon_Type icon_type
228
223 if self.item == NULL: 229 if self.item == NULL:
224 a1 = self.icon_file.decode("UTF-8") 230 a1 = self.icon_file.decode("UTF-8")
225 a2 = self.icon_group.decode("UTF-8") 231 a2 = self.icon_group.decode("UTF-8")
diff --git a/efl/elementary/image.pyx b/efl/elementary/image.pyx
index 3d5befb..a01b899 100644
--- a/efl/elementary/image.pyx
+++ b/efl/elementary/image.pyx
@@ -206,7 +206,10 @@ cdef class Image(Object):
206 raise RuntimeError("Could not set file.") 206 raise RuntimeError("Could not set file.")
207 207
208 def __get__(self): 208 def __get__(self):
209 cdef const_char *filename, *group 209 cdef:
210 const_char *filename
211 const_char *group
212
210 elm_image_file_get(self.obj, &filename, &group) 213 elm_image_file_get(self.obj, &filename, &group)
211 return (_ctouni(filename), _ctouni(group)) 214 return (_ctouni(filename), _ctouni(group))
212 215
@@ -218,7 +221,10 @@ cdef class Image(Object):
218 <const_char *>group if group is not None else NULL): 221 <const_char *>group if group is not None else NULL):
219 raise RuntimeError("Could not set file.") 222 raise RuntimeError("Could not set file.")
220 def file_get(self): 223 def file_get(self):
221 cdef const_char *filename, *group 224 cdef:
225 const_char *filename
226 const_char *group
227
222 elm_image_file_get(self.obj, &filename, &group) 228 elm_image_file_get(self.obj, &filename, &group)
223 return (_ctouni(filename), _ctouni(group)) 229 return (_ctouni(filename), _ctouni(group))
224 230
diff --git a/efl/elementary/list.pyx b/efl/elementary/list.pyx
index 192d617..7511fad 100644
--- a/efl/elementary/list.pyx
+++ b/efl/elementary/list.pyx
@@ -198,7 +198,8 @@ cdef class ListItem(ObjectItem):
198 """An item for the list widget.""" 198 """An item for the list widget."""
199 cdef: 199 cdef:
200 object label 200 object label
201 Evas_Object *icon_obj, *end_obj 201 Evas_Object *icon_obj
202 Evas_Object *end_obj
202 203
203 def __init__(self, label = None, evasObject icon = None, 204 def __init__(self, label = None, evasObject icon = None,
204 evasObject end = None, callback = None, cb_data = None, *args, **kargs): 205 evasObject end = None, callback = None, cb_data = None, *args, **kargs):
diff --git a/efl/elementary/menu.pyx b/efl/elementary/menu.pyx
index 3dd0a1b..ed7d38b 100644
--- a/efl/elementary/menu.pyx
+++ b/efl/elementary/menu.pyx
@@ -79,8 +79,10 @@ cdef class MenuItem(ObjectItem):
79 79
80 def add_to(self, Menu menu not None): 80 def add_to(self, Menu menu not None):
81 # TODO: document this 81 # TODO: document this
82 cdef Elm_Object_Item *item, *parent_obj = NULL 82 cdef:
83 cdef Evas_Smart_Cb cb = NULL 83 Elm_Object_Item *item
84 Elm_Object_Item *parent_obj = NULL
85 Evas_Smart_Cb cb = NULL
84 86
85 if self.cb_func is not None: 87 if self.cb_func is not None:
86 cb = _object_item_callback2 88 cb = _object_item_callback2
diff --git a/efl/elementary/naviframe.pyx b/efl/elementary/naviframe.pyx
index 4447358..0fe5b4c 100644
--- a/efl/elementary/naviframe.pyx
+++ b/efl/elementary/naviframe.pyx
@@ -109,8 +109,11 @@ cdef class NaviframeItem(ObjectItem):
109 109
110 """An item for the Naviframe widget.""" 110 """An item for the Naviframe widget."""
111 111
112 cdef object label, item_style 112 cdef:
113 cdef Evas_Object *prev_btn, *next_btn, *item_content 113 object label, item_style
114 Evas_Object *prev_btn
115 Evas_Object *next_btn
116 Evas_Object *item_content
114 117
115 def __cinit__(self): 118 def __cinit__(self):
116 self.prev_btn = NULL 119 self.prev_btn = NULL
diff --git a/efl/elementary/thumb.pyx b/efl/elementary/thumb.pyx
index 7cada91..08cfdb2 100644
--- a/efl/elementary/thumb.pyx
+++ b/efl/elementary/thumb.pyx
@@ -236,7 +236,10 @@ cdef class Thumb(Object):
236 <const_char *>file_name if file_name is not None else NULL, 236 <const_char *>file_name if file_name is not None else NULL,
237 <const_char *>key if key is not None else NULL) 237 <const_char *>key if key is not None else NULL)
238 def __get__(self): 238 def __get__(self):
239 cdef const_char *file_name, *key 239 cdef:
240 const_char *file_name
241 const_char *key
242
240 elm_thumb_file_get(self.obj, &file_name, &key) 243 elm_thumb_file_get(self.obj, &file_name, &key)
241 return(_ctouni(file_name), _ctouni(key)) 244 return(_ctouni(file_name), _ctouni(key))
242 245
@@ -255,7 +258,10 @@ cdef class Thumb(Object):
255 258
256 """ 259 """
257 def __get__(self): 260 def __get__(self):
258 cdef const_char *path, *key 261 cdef:
262 const_char *path
263 const_char *key
264
259 elm_thumb_path_get(self.obj, &path, &key) 265 elm_thumb_path_get(self.obj, &path, &key)
260 return(_ctouni(path), _ctouni(key)) 266 return(_ctouni(path), _ctouni(key))
261 267
diff --git a/efl/emotion/efl.emotion.pyx b/efl/emotion/efl.emotion.pyx
index aa32943..13971b7 100644
--- a/efl/emotion/efl.emotion.pyx
+++ b/efl/emotion/efl.emotion.pyx
@@ -141,9 +141,12 @@ def webcams_get():
141 .. versionadded:: 1.8 141 .. versionadded:: 1.8
142 142
143 """ 143 """
144 cdef const_Eina_List *lst, *itr 144 cdef:
145 cdef Emotion_Webcam *cam 145 const_Eina_List *lst
146 cdef const_char *name, *device 146 const_Eina_List *itr
147 Emotion_Webcam *cam
148 const_char *name
149 const_char *device
147 150
148 ret = [] 151 ret = []
149 lst = emotion_webcams_get() 152 lst = emotion_webcams_get()
diff --git a/efl/evas/efl.evas_canvas.pxi b/efl/evas/efl.evas_canvas.pxi
index 93cb1fb..b7c6728 100644
--- a/efl/evas/efl.evas_canvas.pxi
+++ b/efl/evas/efl.evas_canvas.pxi
@@ -389,9 +389,12 @@ cdef class Canvas(Eo):
389 :return: children objects. 389 :return: children objects.
390 :rtype: List of :py:class:`efl.evas.Object` 390 :rtype: List of :py:class:`efl.evas.Object`
391 """ 391 """
392 cdef Eina_List *objs, *itr 392 cdef:
393 cdef int ip, ih 393 Eina_List *objs
394 cdef Evas_Object *o 394 Eina_List *itr
395 int ip, ih
396 Evas_Object *o
397
395 ip = include_pass_events_objects 398 ip = include_pass_events_objects
396 ih = include_hidden_objects 399 ih = include_hidden_objects
397 objs = evas_objects_at_xy_get(self.obj, x, y, ip, ih) 400 objs = evas_objects_at_xy_get(self.obj, x, y, ip, ih)
@@ -419,9 +422,12 @@ cdef class Canvas(Eo):
419 :return: children objects. 422 :return: children objects.
420 :rtype: List of :py:class:`efl.evas.Object` 423 :rtype: List of :py:class:`efl.evas.Object`
421 """ 424 """
422 cdef Eina_List *objs, *itr 425 cdef:
423 cdef int ip, ih 426 Eina_List *objs
424 cdef Evas_Object *o 427 Eina_List *itr
428 int ip, ih
429 Evas_Object *o
430
425 ip = include_pass_events_objects 431 ip = include_pass_events_objects
426 ih = include_hidden_objects 432 ih = include_hidden_objects
427 objs = evas_objects_in_rectangle_get(self.obj, x, y, w, h, ip, ih) 433 objs = evas_objects_in_rectangle_get(self.obj, x, y, w, h, ip, ih)
@@ -554,8 +560,11 @@ cdef class Canvas(Eo):
554 def font_available_list(self): 560 def font_available_list(self):
555 """:rtype: list of str""" 561 """:rtype: list of str"""
556 # TODO: use list conv func 562 # TODO: use list conv func
557 cdef void *p 563 cdef:
558 cdef Eina_List *itr, *head 564 void *p
565 Eina_List *itr
566 Eina_List *head
567
559 lst = [] 568 lst = []
560 p = <void*>evas_font_available_list(self.obj) # avoid warning 569 p = <void*>evas_font_available_list(self.obj) # avoid warning
561 head = <Eina_List*>p 570 head = <Eina_List*>p
diff --git a/efl/evas/efl.evas_object_image.pxi b/efl/evas/efl.evas_object_image.pxi
index fb941b9..34d3a8a 100644
--- a/efl/evas/efl.evas_object_image.pxi
+++ b/efl/evas/efl.evas_object_image.pxi
@@ -192,7 +192,10 @@ cdef class Image(Object):
192 192
193 """ 193 """
194 def __get__(self): 194 def __get__(self):
195 cdef const_char *file, *key 195 cdef:
196 const_char *file
197 const_char *key
198
196 evas_object_image_file_get(self.obj, &file, &key) 199 evas_object_image_file_get(self.obj, &file, &key)
197 return (_ctouni(file), _ctouni(key)) 200 return (_ctouni(file), _ctouni(key))
198 201
@@ -223,7 +226,10 @@ cdef class Image(Object):
223 raise EvasLoadError(err, filename, key) 226 raise EvasLoadError(err, filename, key)
224 227
225 def file_get(self): 228 def file_get(self):
226 cdef const_char *file, *key 229 cdef:
230 const_char *file
231 const_char *key
232
227 evas_object_image_file_get(self.obj, &file, &key) 233 evas_object_image_file_get(self.obj, &file, &key)
228 return (_ctouni(file), _ctouni(key)) 234 return (_ctouni(file), _ctouni(key))
229 235
diff --git a/efl/evas/efl.evas_object_smart.pxi b/efl/evas/efl.evas_object_smart.pxi
index 6b9e0cf..06f6006 100644
--- a/efl/evas/efl.evas_object_smart.pxi
+++ b/efl/evas/efl.evas_object_smart.pxi
@@ -537,7 +537,10 @@ cdef class SmartObject(Object):
537 Default implementation to delete all children. 537 Default implementation to delete all children.
538 538
539 """ 539 """
540 cdef Eina_List *lst, *itr 540 cdef:
541 Eina_List *lst
542 Eina_List *itr
543
541 lst = evas_object_smart_members_get(self.obj) 544 lst = evas_object_smart_members_get(self.obj)
542 itr = lst 545 itr = lst
543 while itr: 546 while itr: