summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-10-14 22:45:32 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-10-14 22:45:32 +0200
commitf872e7b8c6baa20b485d5e6f262d326c0acb1565 (patch)
tree7d52e356cfa9e9e2099f1ff58e54261c6c62e940
parente0d892ecaa014f1f823fceda52a3fb9d178fefd5 (diff)
Fix usage of EINA_LOG_* functions
spotted by warnings :)
-rw-r--r--efl/elementary/__init__.pyx12
-rw-r--r--efl/elementary/object_item.pxi3
-rw-r--r--efl/eo/efl.eo.pyx4
-rw-r--r--efl/evas/efl.evas.pyx4
-rw-r--r--efl/evas/efl.evas_object_smart.pxi50
-rw-r--r--efl/utils/logger.pyx2
6 files changed, 35 insertions, 40 deletions
diff --git a/efl/elementary/__init__.pyx b/efl/elementary/__init__.pyx
index d2b84c5..91081d2 100644
--- a/efl/elementary/__init__.pyx
+++ b/efl/elementary/__init__.pyx
@@ -713,8 +713,7 @@ def init():
713 not carry any penalty though. 713 not carry any penalty though.
714 714
715 """ 715 """
716 EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, 716 EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Initializing efl.elementary")
717 "Initializing efl.elementary", NULL)
718 717
719 # argc and argv are currently used by EFL to support app restart 718 # argc and argv are currently used by EFL to support app restart
720 # and binary relocation. These are probably not useful to us but we 719 # and binary relocation. These are probably not useful to us but we
@@ -761,8 +760,7 @@ def shutdown():
761 not carry any penalty though. 760 not carry any penalty though.
762 761
763 """ 762 """
764 EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, 763 EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Shutting down efl.elementary")
765 "Shutting down efl.elementary", NULL)
766 return elm_shutdown() 764 return elm_shutdown()
767 765
768 766
@@ -880,8 +878,7 @@ def run():
880 running the main (event/processing) loop for Elementary. 878 running the main (event/processing) loop for Elementary.
881 879
882 """ 880 """
883 EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, 881 EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Starting up main loop.")
884 "Starting up main loop.", NULL)
885 with nogil: 882 with nogil:
886 elm_run() 883 elm_run()
887 884
@@ -901,8 +898,7 @@ def exit():
901 for you. 898 for you.
902 899
903 """ 900 """
904 EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, 901 EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Ending main loop.")
905 "Ending main loop.", NULL)
906 elm_exit() 902 elm_exit()
907 903
908def policy_set(Elm_Policy policy, value): 904def policy_set(Elm_Policy policy, value):
diff --git a/efl/elementary/object_item.pxi b/efl/elementary/object_item.pxi
index ac278ad..1f296bd 100644
--- a/efl/elementary/object_item.pxi
+++ b/efl/elementary/object_item.pxi
@@ -52,8 +52,7 @@ cdef _object_item_to_python(Elm_Object_Item *it):
52 52
53 if data == NULL: 53 if data == NULL:
54 # Create a dummy object item. 54 # Create a dummy object item.
55 EINA_LOG_DOM_WARN(PY_EFL_ELM_LOG_DOMAIN, 55 EINA_LOG_DOM_WARN(PY_EFL_ELM_LOG_DOMAIN, "Creating an incomplete ObjectItem.")
56 "Creating an incomplete ObjectItem.", NULL)
57 item = ObjectItem.__new__(ObjectItem) 56 item = ObjectItem.__new__(ObjectItem)
58 item._set_obj(it) 57 item._set_obj(it)
59 else: 58 else:
diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index faa1478..195ee05 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -60,11 +60,11 @@ import atexit
60###################################################################### 60######################################################################
61 61
62def init(): 62def init():
63 EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Initializing efl.eo", NULL) 63 EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Initializing efl.eo")
64 return efl_object_init() 64 return efl_object_init()
65 65
66def shutdown(): 66def shutdown():
67 EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Shutting down efl.eo", NULL) 67 EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Shutting down efl.eo")
68 return efl_object_shutdown() 68 return efl_object_shutdown()
69 69
70init() 70init()
diff --git a/efl/evas/efl.evas.pyx b/efl/evas/efl.evas.pyx
index 8bc7e57..b84f513 100644
--- a/efl/evas/efl.evas.pyx
+++ b/efl/evas/efl.evas.pyx
@@ -1213,7 +1213,7 @@ FILL_VERT = 0.5, EVAS_HINT_FILL
1213 1213
1214 1214
1215def init(): 1215def init():
1216 EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Initializing efl.evas", NULL) 1216 EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Initializing efl.evas")
1217 1217
1218 if evas_object_event_callbacks_len != enums.EVAS_CALLBACK_LAST: 1218 if evas_object_event_callbacks_len != enums.EVAS_CALLBACK_LAST:
1219 raise SystemError("Number of object callbacks changed from %d to %d." % 1219 raise SystemError("Number of object callbacks changed from %d to %d." %
@@ -1225,7 +1225,7 @@ def init():
1225 1225
1226 1226
1227def shutdown(): 1227def shutdown():
1228 EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Shutting down efl.evas", NULL) 1228 EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Shutting down efl.evas")
1229 return evas_shutdown() 1229 return evas_shutdown()
1230 1230
1231 1231
diff --git a/efl/evas/efl.evas_object_smart.pxi b/efl/evas/efl.evas_object_smart.pxi
index dc3c396..cd03495 100644
--- a/efl/evas/efl.evas_object_smart.pxi
+++ b/efl/evas/efl.evas_object_smart.pxi
@@ -39,7 +39,7 @@ cdef list _descriptions_to_list(const Evas_Smart_Cb_Description **arr, unsigned
39 ret.append(SmartCbDescription.create(arr[i])) 39 ret.append(SmartCbDescription.create(arr[i]))
40 40
41 if arr[i+1] != NULL: 41 if arr[i+1] != NULL:
42 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "array was not NULL terminated!", NULL) 42 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "array was not NULL terminated!")
43 43
44 return ret 44 return ret
45 45
@@ -102,13 +102,13 @@ cdef void _smart_object_delete(Evas_Object *o) with gil:
102 102
103 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 103 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
104 if tmp == NULL: 104 if tmp == NULL:
105 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 105 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
106 return 106 return
107 cls = <Smart>tmp 107 cls = <Smart>tmp
108 108
109 tmp = efl_key_data_get(o, "python-eo") 109 tmp = efl_key_data_get(o, "python-eo")
110 if tmp == NULL: 110 if tmp == NULL:
111 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 111 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
112 obj = None 112 obj = None
113 else: 113 else:
114 obj = <SmartObject>tmp 114 obj = <SmartObject>tmp
@@ -127,13 +127,13 @@ cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) with gi
127 127
128 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 128 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
129 if tmp == NULL: 129 if tmp == NULL:
130 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 130 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
131 return 131 return
132 cls = <Smart>tmp 132 cls = <Smart>tmp
133 133
134 tmp = efl_key_data_get(o, "python-eo") 134 tmp = efl_key_data_get(o, "python-eo")
135 if tmp == NULL: 135 if tmp == NULL:
136 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 136 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
137 obj = None 137 obj = None
138 else: 138 else:
139 obj = <SmartObject>tmp 139 obj = <SmartObject>tmp
@@ -152,13 +152,13 @@ cdef void _smart_object_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) with
152 152
153 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 153 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
154 if tmp == NULL: 154 if tmp == NULL:
155 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 155 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
156 return 156 return
157 cls = <Smart>tmp 157 cls = <Smart>tmp
158 158
159 tmp = efl_key_data_get(o, "python-eo") 159 tmp = efl_key_data_get(o, "python-eo")
160 if tmp == NULL: 160 if tmp == NULL:
161 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 161 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
162 obj = None 162 obj = None
163 else: 163 else:
164 obj = <SmartObject>tmp 164 obj = <SmartObject>tmp
@@ -177,13 +177,13 @@ cdef void _smart_object_show(Evas_Object *o) with gil:
177 177
178 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 178 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
179 if tmp == NULL: 179 if tmp == NULL:
180 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 180 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
181 return 181 return
182 cls = <Smart>tmp 182 cls = <Smart>tmp
183 183
184 tmp = efl_key_data_get(o, "python-eo") 184 tmp = efl_key_data_get(o, "python-eo")
185 if tmp == NULL: 185 if tmp == NULL:
186 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 186 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
187 obj = None 187 obj = None
188 else: 188 else:
189 obj = <SmartObject>tmp 189 obj = <SmartObject>tmp
@@ -202,13 +202,13 @@ cdef void _smart_object_hide(Evas_Object *o) with gil:
202 202
203 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 203 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
204 if tmp == NULL: 204 if tmp == NULL:
205 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 205 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
206 return 206 return
207 cls = <Smart>tmp 207 cls = <Smart>tmp
208 208
209 tmp = efl_key_data_get(o, "python-eo") 209 tmp = efl_key_data_get(o, "python-eo")
210 if tmp == NULL: 210 if tmp == NULL:
211 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 211 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
212 obj = None 212 obj = None
213 else: 213 else:
214 obj = <SmartObject>tmp 214 obj = <SmartObject>tmp
@@ -227,13 +227,13 @@ cdef void _smart_object_color_set(Evas_Object *o, int r, int g, int b, int a) wi
227 227
228 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 228 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
229 if tmp == NULL: 229 if tmp == NULL:
230 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 230 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
231 return 231 return
232 cls = <Smart>tmp 232 cls = <Smart>tmp
233 233
234 tmp = efl_key_data_get(o, "python-eo") 234 tmp = efl_key_data_get(o, "python-eo")
235 if tmp == NULL: 235 if tmp == NULL:
236 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 236 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
237 obj = None 237 obj = None
238 else: 238 else:
239 obj = <SmartObject>tmp 239 obj = <SmartObject>tmp
@@ -253,13 +253,13 @@ cdef void _smart_object_clip_set(Evas_Object *o, Evas_Object *clip) with gil:
253 253
254 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 254 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
255 if tmp == NULL: 255 if tmp == NULL:
256 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 256 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
257 return 257 return
258 cls = <Smart>tmp 258 cls = <Smart>tmp
259 259
260 tmp = efl_key_data_get(o, "python-eo") 260 tmp = efl_key_data_get(o, "python-eo")
261 if tmp == NULL: 261 if tmp == NULL:
262 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 262 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
263 obj = None 263 obj = None
264 else: 264 else:
265 obj = <SmartObject>tmp 265 obj = <SmartObject>tmp
@@ -280,13 +280,13 @@ cdef void _smart_object_clip_unset(Evas_Object *o) with gil:
280 280
281 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 281 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
282 if tmp == NULL: 282 if tmp == NULL:
283 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 283 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
284 return 284 return
285 cls = <Smart>tmp 285 cls = <Smart>tmp
286 286
287 tmp = efl_key_data_get(o, "python-eo") 287 tmp = efl_key_data_get(o, "python-eo")
288 if tmp == NULL: 288 if tmp == NULL:
289 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 289 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
290 obj = None 290 obj = None
291 else: 291 else:
292 obj = <SmartObject>tmp 292 obj = <SmartObject>tmp
@@ -305,13 +305,13 @@ cdef void _smart_object_calculate(Evas_Object *o) with gil:
305 305
306 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 306 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
307 if tmp == NULL: 307 if tmp == NULL:
308 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 308 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
309 return 309 return
310 cls = <Smart>tmp 310 cls = <Smart>tmp
311 311
312 tmp = efl_key_data_get(o, "python-eo") 312 tmp = efl_key_data_get(o, "python-eo")
313 if tmp == NULL: 313 if tmp == NULL:
314 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 314 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
315 obj = None 315 obj = None
316 else: 316 else:
317 obj = <SmartObject>tmp 317 obj = <SmartObject>tmp
@@ -331,13 +331,13 @@ cdef void _smart_object_member_add(Evas_Object *o, Evas_Object *clip) with gil:
331 331
332 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 332 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
333 if tmp == NULL: 333 if tmp == NULL:
334 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 334 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
335 return 335 return
336 cls = <Smart>tmp 336 cls = <Smart>tmp
337 337
338 tmp = efl_key_data_get(o, "python-eo") 338 tmp = efl_key_data_get(o, "python-eo")
339 if tmp == NULL: 339 if tmp == NULL:
340 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 340 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
341 obj = None 341 obj = None
342 else: 342 else:
343 obj = <SmartObject>tmp 343 obj = <SmartObject>tmp
@@ -359,13 +359,13 @@ cdef void _smart_object_member_del(Evas_Object *o, Evas_Object *clip) with gil:
359 359
360 tmp = evas_smart_data_get(evas_object_smart_smart_get(o)) 360 tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
361 if tmp == NULL: 361 if tmp == NULL:
362 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL) 362 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
363 return 363 return
364 cls = <Smart>tmp 364 cls = <Smart>tmp
365 365
366 tmp = efl_key_data_get(o, "python-eo") 366 tmp = efl_key_data_get(o, "python-eo")
367 if tmp == NULL: 367 if tmp == NULL:
368 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 368 EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
369 obj = None 369 obj = None
370 else: 370 else:
371 obj = <Eo>tmp 371 obj = <Eo>tmp
@@ -395,7 +395,7 @@ cdef object _smart_cb_pass_conv(void *addr):
395 395
396cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil: 396cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil:
397 if data == NULL: 397 if data == NULL:
398 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "data is NULL!", NULL) 398 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "data is NULL!")
399 return 399 return
400 400
401 cdef: 401 cdef:
@@ -408,7 +408,7 @@ cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil
408 408
409 tmp = efl_key_data_get(o, "python-eo") 409 tmp = efl_key_data_get(o, "python-eo")
410 if tmp == NULL: 410 if tmp == NULL:
411 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL) 411 EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
412 return 412 return
413 else: 413 else:
414 obj = <SmartObject>tmp 414 obj = <SmartObject>tmp
diff --git a/efl/utils/logger.pyx b/efl/utils/logger.pyx
index 34d4ba7..1509132 100644
--- a/efl/utils/logger.pyx
+++ b/efl/utils/logger.pyx
@@ -125,4 +125,4 @@ rootlog.propagate = False
125cdef public int PY_EFL_LOG_DOMAIN = rootlog.eina_log_domain 125cdef public int PY_EFL_LOG_DOMAIN = rootlog.eina_log_domain
126 126
127def logger_test_dbg(): 127def logger_test_dbg():
128 EINA_LOG_DOM_DBG(PY_EFL_LOG_DOMAIN, "test message", NULL) 128 EINA_LOG_DOM_DBG(PY_EFL_LOG_DOMAIN, "test message")