From: Daniel Kolesa Date: Thu, 20 Oct 2016 14:01:11 +0000 (+0200) Subject: eolian gen: automatically uppercase names for vars/constants X-Git-Tag: upstream/1.20.0~4016 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=930af741b975847917f17d17d83ef38b5d0c78c8;p=platform%2Fupstream%2Fefl.git eolian gen: automatically uppercase names for vars/constants --- diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index 86cfb5b..50c7d17 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -153,6 +153,7 @@ _var_generate(const Eolian_Variable *vr, Eina_Bool legacy) while ((p = strchr(fn, '.'))) *p = '_'; } + eina_str_toupper(&fn); if (!buf) buf = eina_strbuf_new(); else eina_strbuf_append_char(buf, '\n'); const Eolian_Type *vt = eolian_variable_base_type_get(vr); @@ -262,6 +263,7 @@ void eo_gen_types_source_gen(const char *eof, Eina_Strbuf *buf) char *fn = strdup(eolian_variable_full_name_get(vr)); for (char *p = strchr(fn, '.'); p; p = strchr(p, '.')) *p = '_'; + eina_str_toupper(&fn); const Eolian_Type *vt = eolian_variable_base_type_get(vr); Eina_Stringshare *ct = eolian_type_c_type_get(vt); diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index e9a0d89..a8609e4 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -1,4 +1,4 @@ -float Bar = 10.300000f; +float BAR = 10.300000f; Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value); diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h index 1c2032f..0d34ead 100644 --- a/src/tests/eolian/data/class_simple_ref_eo.h +++ b/src/tests/eolian/data/class_simple_ref_eo.h @@ -11,25 +11,25 @@ typedef Eo Class_Simple; #ifndef _CLASS_SIMPLE_EO_TYPES #define _CLASS_SIMPLE_EO_TYPES -#ifndef Foo +#ifndef FOO /** doc for constant * * @ingroup Foo */ -#define Foo 5 +#define FOO 5 #endif /** doc for global * * @ingroup Bar */ -extern float Bar; +extern float BAR; /** in header but not in source * * @ingroup Baz */ -extern long Baz; +extern long BAZ; #endif diff --git a/src/tests/eolian/data/class_simple_ref_legacy.h b/src/tests/eolian/data/class_simple_ref_legacy.h index a478e2f..30b4855 100644 --- a/src/tests/eolian/data/class_simple_ref_legacy.h +++ b/src/tests/eolian/data/class_simple_ref_legacy.h @@ -11,25 +11,25 @@ typedef Eo Class_Simple; #ifndef _CLASS_SIMPLE_EO_TYPES #define _CLASS_SIMPLE_EO_TYPES -#ifndef Foo +#ifndef FOO /** doc for constant * * @ingroup Foo */ -#define Foo 5 +#define FOO 5 #endif /** doc for global * * @ingroup Bar */ -extern float Bar; +extern float BAR; /** in header but not in source * * @ingroup Baz */ -extern long Baz; +extern long BAZ; #endif diff --git a/src/tests/eolian/data/docs_ref.h b/src/tests/eolian/data/docs_ref.h index 8c9627b..ce1d4bb 100644 --- a/src/tests/eolian/data/docs_ref.h +++ b/src/tests/eolian/data/docs_ref.h @@ -60,7 +60,7 @@ typedef Bar Alias; * * @ingroup pants */ -extern int pants; +extern int PANTS; /** Opaque struct docs. See @ref Foo for another struct. * diff --git a/src/tests/eolian/data/docs_ref_legacy.h b/src/tests/eolian/data/docs_ref_legacy.h index b4a1e63..9c1160e 100644 --- a/src/tests/eolian/data/docs_ref_legacy.h +++ b/src/tests/eolian/data/docs_ref_legacy.h @@ -60,7 +60,7 @@ typedef Bar Alias; * * @ingroup pants */ -extern int pants; +extern int PANTS; /** Opaque struct docs. See @ref Foo for another struct. *