summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-01-06 14:58:18 +0000
committerTom Hacohen <tom@stosb.com>2014-01-06 15:29:34 +0000
commitb357bb1df6c5299a4cccea7d0c4df044550b90fc (patch)
treed246e3d232d7d3804ca24854e556c6fcdfbec89d /src
parent1d30461dde9e43b909887039260e0c4e069315a9 (diff)
Widget: Don't check if it's the correct class everywhere.
ELM_WIDGET_DATA_GET was checking it was the correct class. This is stupid and wrong (and makes tools rightfully complain) because these functions are implementations of that class anyway, so that would never be false. Functions that outside facing (that is, not called from eo_do) should use API_ENTRY.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_widget.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index d22399e23..e56f0e55a 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -16,8 +16,7 @@ EAPI Eo_Op ELM_WIDGET_BASE_ID = EO_NOOP;
16#define MY_CLASS_NAME_LEGACY "elm_widget" 16#define MY_CLASS_NAME_LEGACY "elm_widget"
17 17
18#define ELM_WIDGET_DATA_GET(o, wd) \ 18#define ELM_WIDGET_DATA_GET(o, wd) \
19 Elm_Widget_Smart_Data *wd = NULL; \ 19 Elm_Widget_Smart_Data *wd = eo_data_scope_get(o, MY_CLASS)
20 if (eo_isa(o, MY_CLASS)) wd = eo_data_scope_get(o, MY_CLASS)
21 20
22#define API_ENTRY \ 21#define API_ENTRY \
23 ELM_WIDGET_DATA_GET(obj, sd); \ 22 ELM_WIDGET_DATA_GET(obj, sd); \