summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-03-23 19:15:25 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2015-03-23 19:15:25 +0200
commitfcc93216f9b7179f4af13b29ddde848fcc94f19f (patch)
tree2526dc8f2be2e3da6e1ecac897f63b0f1b482e3e
parent8a0dccbf227d0ba211a0d66ee4a2882df01ead44 (diff)
Evas.SmartObject: Fix smart callbacks with NULL event_info
If the event has a conversion func assigned but event_info is NULL we should pass None instead of dropping the parameter. This behavior is now the same as before the callback rework.
-rw-r--r--efl/evas/efl.evas_object_smart.pxi4
1 files changed, 3 insertions, 1 deletions
diff --git a/efl/evas/efl.evas_object_smart.pxi b/efl/evas/efl.evas_object_smart.pxi
index 087841e..3014e08 100644
--- a/efl/evas/efl.evas_object_smart.pxi
+++ b/efl/evas/efl.evas_object_smart.pxi
@@ -420,11 +420,13 @@ cdef void _smart_callback(void *data, Evas_Object *o, void *event_info) with gil
420 if event_info == NULL: 420 if event_info == NULL:
421 try: 421 try:
422 tmp_args = [spec.obj] 422 tmp_args = [spec.obj]
423 if spec.event_conv != NULL:
424 tmp_args.append(None)
423 tmp_args.extend(spec.args) 425 tmp_args.extend(spec.args)
424 PyObject_Call(spec.func, tuple(tmp_args), spec.kargs) 426 PyObject_Call(spec.func, tuple(tmp_args), spec.kargs)
425 except Exception: 427 except Exception:
426 traceback.print_exc() 428 traceback.print_exc()
427 elif spec.event_conv == NULL: 429 elif event_info != NULL and spec.event_conv == NULL:
428 EINA_LOG_DOM_WARN( 430 EINA_LOG_DOM_WARN(
429 PY_EFL_EVAS_LOG_DOMAIN, 431 PY_EFL_EVAS_LOG_DOMAIN,
430 'event_info for event "%s" is not NULL and there is no event_conv!', 432 'event_info for event "%s" is not NULL and there is no event_conv!',