summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-05-09 16:16:42 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-05-09 16:17:44 +0200
commit6312cafe204d32ab7b374bbdecd407846e8a50fb (patch)
tree6952882dde59028cb80b14e316a254dc5c7baa78 /src/lib/eolian
parent49209553f6e0f5b82cda3cbf846d4d79c6b58249 (diff)
eolian: move from eo_prefix to c_prefix
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_class.c2
-rw-r--r--src/lib/eolian/database_class_api.c2
-rw-r--r--src/lib/eolian/database_event_api.c2
-rw-r--r--src/lib/eolian/database_function_api.c8
-rw-r--r--src/lib/eolian/eo_lexer.h6
-rw-r--r--src/lib/eolian/eo_parser.c8
-rw-r--r--src/lib/eolian/eolian_database.h2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/eolian/database_class.c b/src/lib/eolian/database_class.c
index 34551d3..4c8c45d 100644
--- a/src/lib/eolian/database_class.c
+++ b/src/lib/eolian/database_class.c
@@ -33,7 +33,7 @@ database_class_del(Eolian_Class *cl)
33 eina_list_free(cl->callables); 33 eina_list_free(cl->callables);
34 eina_list_free(cl->composite); 34 eina_list_free(cl->composite);
35 35
36 if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix); 36 if (cl->c_prefix) eina_stringshare_del(cl->c_prefix);
37 if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix); 37 if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix);
38 if (cl->data_type) eina_stringshare_del(cl->data_type); 38 if (cl->data_type) eina_stringshare_del(cl->data_type);
39 39
diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c
index fa7d36b..3e3b0d7 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -24,7 +24,7 @@ EAPI Eina_Stringshare*
24eolian_class_eo_prefix_get(const Eolian_Class *cl) 24eolian_class_eo_prefix_get(const Eolian_Class *cl)
25{ 25{
26 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL); 26 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
27 return cl->eo_prefix; 27 return cl->c_prefix;
28} 28}
29 29
30EAPI Eina_Stringshare* 30EAPI Eina_Stringshare*
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 74f69cd..4142c50 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -55,7 +55,7 @@ eolian_event_c_name_get(const Eolian_Event *event)
55 char buf[512]; 55 char buf[512];
56 char *tmp = buf; 56 char *tmp = buf;
57 const char *pfx = event->klass->ev_prefix; 57 const char *pfx = event->klass->ev_prefix;
58 if (!pfx) pfx = event->klass->eo_prefix; 58 if (!pfx) pfx = event->klass->c_prefix;
59 if (!pfx) pfx = event->klass->base.name; 59 if (!pfx) pfx = event->klass->base.name;
60 snprintf(buf, sizeof(buf), "%s_EVENT_%s", pfx, event->base.name); 60 snprintf(buf, sizeof(buf), "%s_EVENT_%s", pfx, event->base.name);
61 eina_str_toupper(&tmp); 61 eina_str_toupper(&tmp);
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index 8a38443..60c4f6b 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -38,11 +38,11 @@ eolian_function_type_get(const Eolian_Function *fid)
38} 38}
39 39
40static const char * 40static const char *
41_get_eo_prefix(const Eolian_Function *foo_id, char *buf) 41_get_c_prefix(const Eolian_Function *foo_id, char *buf)
42{ 42{
43 char *tmp = buf; 43 char *tmp = buf;
44 if (foo_id->klass->eo_prefix) 44 if (foo_id->klass->c_prefix)
45 return foo_id->klass->eo_prefix; 45 return foo_id->klass->c_prefix;
46 strcpy(buf, foo_id->klass->base.name); 46 strcpy(buf, foo_id->klass->base.name);
47 eina_str_tolower(&buf); 47 eina_str_tolower(&buf);
48 while ((tmp = strchr(tmp, '.'))) *tmp = '_'; 48 while ((tmp = strchr(tmp, '.'))) *tmp = '_';
@@ -88,7 +88,7 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id,
88{ 88{
89 char tbuf[512]; 89 char tbuf[512];
90 tbuf[0] = '\0'; 90 tbuf[0] = '\0';
91 const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf): tbuf; 91 const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_c_prefix(foo_id, tbuf): tbuf;
92 92
93 if (!prefix) 93 if (!prefix)
94 return NULL; 94 return NULL;
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 9a510e1..4fec039 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -24,9 +24,9 @@ enum Tokens
24 * they just fill in the "kw" field of the token */ 24 * they just fill in the "kw" field of the token */
25#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ 25#define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
26 \ 26 \
27 KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \ 27 KW(abstract), KW(c_prefix), KW(composite), KW(constructor), KW(constructors), \
28 KW(destructor), KW(eo_prefix), KW(event_prefix), KW(events), \ 28 KW(data), KW(destructor), KW(event_prefix), KW(events), KW(extends), \
29 KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \ 29 KW(free), KW(get), KW(implements), KW(import), KW(interface), \
30 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \ 30 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
31 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \ 31 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
32 \ 32 \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index ebf3b1c..65a28df 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1864,7 +1864,7 @@ error:
1864static void 1864static void
1865parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) 1865parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
1866{ 1866{
1867 Eina_Bool has_eo_prefix = EINA_FALSE, 1867 Eina_Bool has_c_prefix = EINA_FALSE,
1868 has_event_prefix = EINA_FALSE, 1868 has_event_prefix = EINA_FALSE,
1869 has_data = EINA_FALSE, 1869 has_data = EINA_FALSE,
1870 has_methods = EINA_FALSE, 1870 has_methods = EINA_FALSE,
@@ -1880,12 +1880,12 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type)
1880 } 1880 }
1881 for (;;) switch (ls->t.kw) 1881 for (;;) switch (ls->t.kw)
1882 { 1882 {
1883 case KW_eo_prefix: 1883 case KW_c_prefix:
1884 CASE_LOCK(ls, eo_prefix, "eo prefix definition") 1884 CASE_LOCK(ls, c_prefix, "c prefix definition")
1885 eo_lexer_get(ls); 1885 eo_lexer_get(ls);
1886 check_next(ls, ':'); 1886 check_next(ls, ':');
1887 _validate_pfx(ls); 1887 _validate_pfx(ls);
1888 ls->klass->eo_prefix = eina_stringshare_ref(ls->t.value.s); 1888 ls->klass->c_prefix = eina_stringshare_ref(ls->t.value.s);
1889 eo_lexer_get(ls); 1889 eo_lexer_get(ls);
1890 check_next(ls, ';'); 1890 check_next(ls, ';');
1891 break; 1891 break;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 8c1b02b..baf2fde 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -177,7 +177,7 @@ struct _Eolian_Class
177 Eolian_Object base; 177 Eolian_Object base;
178 Eolian_Class_Type type; 178 Eolian_Class_Type type;
179 Eolian_Documentation *doc; 179 Eolian_Documentation *doc;
180 Eina_Stringshare *eo_prefix; 180 Eina_Stringshare *c_prefix;
181 Eina_Stringshare *ev_prefix; 181 Eina_Stringshare *ev_prefix;
182 Eina_Stringshare *data_type; 182 Eina_Stringshare *data_type;
183 union { 183 union {