aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_object_smart_clipped.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-13 17:59:13 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-14 14:00:02 +0900
commit2fc23aa561a86b4a26daaaa71acc0d590cafe62c (patch)
tree5bccac4878e5e26a0c1bc020299fef86718c2140 /src/lib/evas/canvas/evas_object_smart_clipped.c
parentevas: Improve render debug logs (diff)
downloadefl-2fc23aa561a86b4a26daaaa71acc0d590cafe62c.tar.gz
evas: Fix evas_object_smart_clipped_clipper_get
This was broken for smart objects that are not "clipped smart objects". This fixes the example evas_smart_object. NOTE: This EAPI was removed in efl-1.18! /!\ This was an uncaught API break between 1.17 and 1.18 /!\ @fix
Diffstat (limited to 'src/lib/evas/canvas/evas_object_smart_clipped.c')
-rw-r--r--src/lib/evas/canvas/evas_object_smart_clipped.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c
index b8abd63e55..f9f95dda98 100644
--- a/src/lib/evas/canvas/evas_object_smart_clipped.c
+++ b/src/lib/evas/canvas/evas_object_smart_clipped.c
@@ -11,19 +11,16 @@
efl_data_scope_get(eo_obj, MY_CLASS) : \
evas_object_smart_data_get(eo_obj));
-#define CSO_DATA_GET_OR_RETURN(eo_obj, ptr) \
- CSO_DATA_GET(eo_obj, ptr) \
- if (!ptr) return;
+#define CSO_DATA_GET_OR_RETURN(eo_obj, ptr, ...) \
+ CSO_DATA_GET(eo_obj, ptr) \
+ if (!ptr) return __VA_ARGS__;
EAPI Evas_Object *
evas_object_smart_clipped_clipper_get(const Evas_Object *eo_obj)
{
- Evas_Object_Smart_Clipped_Data *obj;
+ CSO_DATA_GET_OR_RETURN(eo_obj, cso, NULL);
- if (!efl_isa(eo_obj, EFL_CANVAS_GROUP_CLIPPED_CLASS))
- return NULL;
- obj = efl_data_scope_get(eo_obj, EFL_CANVAS_GROUP_CLIPPED_CLASS);
- return obj->clipper;
+ return cso->clipper;
}
static void