summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-16 19:36:19 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-17 13:10:35 +0900
commitedafd4ec34629d8200b04e4fda074ac0f5dadf92 (patch)
treefc48d90156c20dd11939f0017857dc7bceefeca4
parent6ac68c92526c21aec48cf584b23f34ef45dc5ee5 (diff)
Evas: Improve EVAS_OBJECT_LEGACY_API a bit more
This now calls EINA_SAFETY_ERROR which makes it easy to then break inside _eina_legacy_error.
-rw-r--r--src/lib/evas/include/evas_private.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index ceee4a7aeb..48b0b0bae6 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -579,7 +579,8 @@ MAGIC_CHECK_FAILED(o, t, m)
579 do { Evas_Object_Protected_Data *_o = eo_data_scope_get(_eo, EVAS_OBJECT_CLASS); \ 579 do { Evas_Object_Protected_Data *_o = eo_data_scope_get(_eo, EVAS_OBJECT_CLASS); \
580 if (EINA_UNLIKELY(!_o)) return __VA_ARGS__; \ 580 if (EINA_UNLIKELY(!_o)) return __VA_ARGS__; \
581 if (EINA_UNLIKELY(!_o->legacy)) { \ 581 if (EINA_UNLIKELY(!_o->legacy)) { \
582 ERR("Calling legacy function '%s' on EO object '%s' is not permitted!", __FUNCTION__, eo_class_name_get(_o->object)); \ 582 char buf[1024]; snprintf(buf, sizeof(buf), "Calling legacy API on EO object '%s' is not permitted!", eo_class_name_get(_o->object)); \
583 EINA_SAFETY_ERROR(buf); \
583 return __VA_ARGS__; \ 584 return __VA_ARGS__; \
584 } } while (0) 585 } } while (0)
585#else 586#else
@@ -587,7 +588,8 @@ MAGIC_CHECK_FAILED(o, t, m)
587 do { Evas_Object_Protected_Data *_o = eo_data_scope_get(_eo, EVAS_OBJECT_CLASS); \ 588 do { Evas_Object_Protected_Data *_o = eo_data_scope_get(_eo, EVAS_OBJECT_CLASS); \
588 if (EINA_UNLIKELY(!_o)) return __VA_ARGS__; \ 589 if (EINA_UNLIKELY(!_o)) return __VA_ARGS__; \
589 if (EINA_UNLIKELY(!_o->legacy)) { \ 590 if (EINA_UNLIKELY(!_o->legacy)) { \
590 ERR("Calling legacy function '%s' on EO object '%s' is not permitted!", __FUNCTION__, eo_class_name_get(_o->object)); \ 591 char buf[1024]; snprintf(buf, sizeof(buf), "Calling legacy API on EO object '%s' is not permitted!", eo_class_name_get(_o->object)); \
592 EINA_SAFETY_ERROR(buf); \
591 } } while (0) 593 } } while (0)
592#endif 594#endif
593 595