From b798005e809e6fcd3fc807e57042861d1019b71d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 23 Nov 2017 15:20:00 +0900 Subject: [PATCH] elm: Add hack to make test case work Because of the way elm_code test case is written, by directly including the C file, we end up with two symbols for the internal _elm_legacy_add flag. This makes some test case fail (after applying a pending patch). Solution found by Sungtaek Hong. elm_code test case needs to be fixed. Don't include the C files directly, testing static inlines should be done through a common .x or something, but not by including the C file itself. This has led and will lead to many issues. --- src/lib/elementary/elm_code_widget.c | 2 +- src/lib/elementary/elm_widget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 54e3543..55a8ed8 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -24,7 +24,7 @@ typedef enum { ELM_CODE_WIDGET_COLOR_COUNT } Elm_Code_Widget_Colors; -Eina_Unicode status_icons[] = { +static Eina_Unicode status_icons[] = { ' ', ' ', ' ', diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 24ce4b7..c8ae55b 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -813,7 +813,7 @@ _elm_widget_sub_object_redirect_to_top(Evas_Object *obj, Evas_Object *sobj) /* Internal hack to mark legacy objects as such before construction. * No need for TLS: Only UI objects created in the main loop matter. */ -EAPI Eina_Bool _elm_legacy_add; +EAPI extern Eina_Bool _elm_legacy_add; #define elm_legacy_add(k, p, ...) ({ _elm_legacy_add = 1; \ efl_add(k, p, efl_canvas_object_legacy_ctor(efl_added), ##__VA_ARGS__); }) -- 2.7.4