aboutsummaryrefslogtreecommitdiffstats
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
parentSilence some false compiler warnings (diff)
downloadpython-efl-f872e7b8c6baa20b485d5e6f262d326c0acb1565.tar.gz
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():
not carry any penalty though.
"""
- EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN,
- "Initializing efl.elementary", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Initializing efl.elementary")
# argc and argv are currently used by EFL to support app restart
# and binary relocation. These are probably not useful to us but we
@@ -761,8 +760,7 @@ def shutdown():
not carry any penalty though.
"""
- EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN,
- "Shutting down efl.elementary", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_ELM_LOG_DOMAIN, "Shutting down efl.elementary")
return elm_shutdown()
@@ -880,8 +878,7 @@ def run():
running the main (event/processing) loop for Elementary.
"""
- EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN,
- "Starting up main loop.", NULL)
+ EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Starting up main loop.")
with nogil:
elm_run()
@@ -901,8 +898,7 @@ def exit():
for you.
"""
- EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN,
- "Ending main loop.", NULL)
+ EINA_LOG_DOM_DBG(PY_EFL_ELM_LOG_DOMAIN, "Ending main loop.")
elm_exit()
def 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):
if data == NULL:
# Create a dummy object item.
- EINA_LOG_DOM_WARN(PY_EFL_ELM_LOG_DOMAIN,
- "Creating an incomplete ObjectItem.", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_ELM_LOG_DOMAIN, "Creating an incomplete ObjectItem.")
item = ObjectItem.__new__(ObjectItem)
item._set_obj(it)
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
######################################################################
def init():
- EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Initializing efl.eo", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Initializing efl.eo")
return efl_object_init()
def shutdown():
- EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Shutting down efl.eo", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_EO_LOG_DOMAIN, "Shutting down efl.eo")
return efl_object_shutdown()
init()
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
def init():
- EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Initializing efl.evas", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Initializing efl.evas")
if evas_object_event_callbacks_len != enums.EVAS_CALLBACK_LAST:
raise SystemError("Number of object callbacks changed from %d to %d." %
@@ -1225,7 +1225,7 @@ def init():
def shutdown():
- EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Shutting down efl.evas", NULL)
+ EINA_LOG_DOM_INFO(PY_EFL_EVAS_LOG_DOMAIN, "Shutting down efl.evas")
return evas_shutdown()
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
ret.append(SmartCbDescription.create(arr[i]))
if arr[i+1] != NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "array was not NULL terminated!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "array was not NULL terminated!")
return ret
@@ -102,13 +102,13 @@ cdef void _smart_object_delete(Evas_Object *o) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -127,13 +127,13 @@ cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) with gi
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -152,13 +152,13 @@ cdef void _smart_object_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) with
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -177,13 +177,13 @@ cdef void _smart_object_show(Evas_Object *o) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -202,13 +202,13 @@ cdef void _smart_object_hide(Evas_Object *o) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
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
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -253,13 +253,13 @@ cdef void _smart_object_clip_set(Evas_Object *o, Evas_Object *clip) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -280,13 +280,13 @@ cdef void _smart_object_clip_unset(Evas_Object *o) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -305,13 +305,13 @@ cdef void _smart_object_calculate(Evas_Object *o) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -331,13 +331,13 @@ cdef void _smart_object_member_add(Evas_Object *o, Evas_Object *clip) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <SmartObject>tmp
@@ -359,13 +359,13 @@ cdef void _smart_object_member_del(Evas_Object *o, Evas_Object *clip) with gil:
tmp = evas_smart_data_get(evas_object_smart_smart_get(o))
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "cls is NULL!")
return
cls = <Smart>tmp
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_WARN(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
obj = None
else:
obj = <Eo>tmp
@@ -395,7 +395,7 @@ cdef object _smart_cb_pass_conv(void *addr):
cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil:
if data == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "data is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "data is NULL!")
return
cdef:
@@ -408,7 +408,7 @@ cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil
tmp = efl_key_data_get(o, "python-eo")
if tmp == NULL:
- EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!", NULL)
+ EINA_LOG_DOM_ERR(PY_EFL_EVAS_LOG_DOMAIN, "obj is NULL!")
return
else:
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
cdef public int PY_EFL_LOG_DOMAIN = rootlog.eina_log_domain
def logger_test_dbg():
- EINA_LOG_DOM_DBG(PY_EFL_LOG_DOMAIN, "test message", NULL)
+ EINA_LOG_DOM_DBG(PY_EFL_LOG_DOMAIN, "test message")