summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-01-10 20:15:02 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2020-01-10 20:19:47 +0100
commita7d5b089da67c4a30731ef876efe7530b6707db0 (patch)
treefe845eead080fc2e6c2b3f2dad6d2d94bac2184d /src/bin
parentd3159a31d761cb48f18e6c678256646452efa621 (diff)
eolian_gen: utilize c_name instead of name for generation
This will make generated output properly respect the @c_name tags.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/docs.c2
-rw-r--r--src/bin/eolian/headers.c4
-rw-r--r--src/bin/eolian/main.c2
-rw-r--r--src/bin/eolian/types.c16
4 files changed, 12 insertions, 12 deletions
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index c01508d..2f27a10 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -462,7 +462,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
462 462
463 int curl = 0; 463 int curl = 0;
464 464
465 const char *group = eolian_class_name_get(eolian_function_class_get(fid)); 465 const char *group = eolian_class_c_name_get(eolian_function_class_get(fid));
466 const Eolian_Implement *fimp = eolian_function_implement_get(fid); 466 const Eolian_Implement *fimp = eolian_function_implement_get(fid);
467 467
468 if (ftype == EOLIAN_METHOD) 468 if (ftype == EOLIAN_METHOD)
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index ead40d8..0ba05ee 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -211,7 +211,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
211 if (doc) 211 if (doc)
212 { 212 {
213 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc, 213 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
214 eolian_class_name_get(cl), 0); 214 eolian_class_c_name_get(cl), 0);
215 if (cdoc) 215 if (cdoc)
216 { 216 {
217 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc)); 217 eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
@@ -287,7 +287,7 @@ events:
287 "Efl_Event_Description _%s;\n\n", evn); 287 "Efl_Event_Description _%s;\n\n", evn);
288 288
289 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev, 289 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
290 eolian_class_name_get(cl)); 290 eolian_class_c_name_get(cl));
291 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf)); 291 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
292 eina_strbuf_append_char(buf, '\n'); 292 eina_strbuf_append_char(buf, '\n');
293 eina_strbuf_free(evdbuf); 293 eina_strbuf_free(evdbuf);
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 114f989..8e965e2 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -288,7 +288,7 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname,
288 char **cnameu, char **cnamel) 288 char **cnameu, char **cnamel)
289{ 289{
290 char *cn = NULL, *cnu = NULL, *cnl = NULL; 290 char *cn = NULL, *cnu = NULL, *cnl = NULL;
291 cn = eo_gen_c_full_name_get(eolian_class_name_get(cl)); 291 cn = eo_gen_c_full_name_get(eolian_class_c_name_get(cl));
292 if (!cn) 292 if (!cn)
293 abort(); 293 abort();
294 if (cname) 294 if (cname)
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 9623283..9b44279 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -8,7 +8,7 @@ static Eina_Strbuf *
8_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp, 8_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
9 Eina_Bool full) 9 Eina_Bool full)
10{ 10{
11 char *grp = strdup(eolian_typedecl_name_get(tp)); 11 char *grp = strdup(eolian_typedecl_c_name_get(tp));
12 char *p = strrchr(grp, '.'); 12 char *p = strrchr(grp, '.');
13 if (p) *p = '\0'; 13 if (p) *p = '\0';
14 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp), 14 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp),
@@ -30,7 +30,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
30 case EOLIAN_TYPEDECL_STRUCT_OPAQUE: 30 case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
31 { 31 {
32 const Eolian_Struct_Type_Field *memb; 32 const Eolian_Struct_Type_Field *memb;
33 char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp)); 33 char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
34 if (tpt == EOLIAN_TYPEDECL_STRUCT_OPAQUE || !full) 34 if (tpt == EOLIAN_TYPEDECL_STRUCT_OPAQUE || !full)
35 { 35 {
36 eina_strbuf_append_printf(buf, "typedef struct _%s %s", fn, fn); 36 eina_strbuf_append_printf(buf, "typedef struct _%s %s", fn, fn);
@@ -119,7 +119,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
119 eina_strbuf_append(buf, "\n"); 119 eina_strbuf_append(buf, "\n");
120 } 120 }
121 eina_iterator_free(membs); 121 eina_iterator_free(membs);
122 char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp)); 122 char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
123 eina_strbuf_append_printf(buf, "} %s", fn); 123 eina_strbuf_append_printf(buf, "} %s", fn);
124 free(fn); 124 free(fn);
125 break; 125 break;
@@ -142,7 +142,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
142 } 142 }
143 143
144 /* Function name */ 144 /* Function name */
145 char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp)); 145 char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
146 eina_strbuf_append_printf(buf, "(*%s)", fn); 146 eina_strbuf_append_printf(buf, "(*%s)", fn);
147 free(fn); 147 free(fn);
148 148
@@ -170,7 +170,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
170static Eina_Strbuf * 170static Eina_Strbuf *
171_const_generate(const Eolian_State *state, const Eolian_Constant *vr) 171_const_generate(const Eolian_State *state, const Eolian_Constant *vr)
172{ 172{
173 char *fn = strdup(eolian_constant_name_get(vr)); 173 char *fn = strdup(eolian_constant_c_name_get(vr));
174 char *p = strrchr(fn, '.'); 174 char *p = strrchr(fn, '.');
175 if (p) *p = '\0'; 175 if (p) *p = '\0';
176 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_constant_documentation_get(vr), 176 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_constant_documentation_get(vr),
@@ -211,7 +211,7 @@ _const_generate(const Eolian_State *state, const Eolian_Constant *vr)
211static Eina_Strbuf * 211static Eina_Strbuf *
212_err_generate(const Eolian_State *state, const Eolian_Error *err) 212_err_generate(const Eolian_State *state, const Eolian_Error *err)
213{ 213{
214 char *fn = strdup(eolian_error_name_get(err)); 214 char *fn = strdup(eolian_error_c_name_get(err));
215 char *p = strrchr(fn, '.'); 215 char *p = strrchr(fn, '.');
216 if (p) *p = '\0'; 216 if (p) *p = '\0';
217 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_error_documentation_get(err), 217 Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_error_documentation_get(err),
@@ -319,7 +319,7 @@ _source_gen_error(Eina_Strbuf *buf, const Eolian_Error *err)
319 if (eolian_error_is_extern(err)) 319 if (eolian_error_is_extern(err))
320 return; 320 return;
321 321
322 char *fn = strdup(eolian_error_name_get(err)); 322 char *fn = strdup(eolian_error_c_name_get(err));
323 for (char *p = strchr(fn, '.'); p; p = strchr(p, '.')) 323 for (char *p = strchr(fn, '.'); p; p = strchr(p, '.'))
324 *p = '_'; 324 *p = '_';
325 eina_str_tolower(&fn); 325 eina_str_tolower(&fn);
@@ -385,7 +385,7 @@ Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof)
385 const Eolian_Class *cl = eolian_state_class_by_file_get(eos, eof); 385 const Eolian_Class *cl = eolian_state_class_by_file_get(eos, eof);
386 if (!cl) 386 if (!cl)
387 return NULL; 387 return NULL;
388 char *clfn = eo_gen_c_full_name_get(eolian_class_name_get(cl)); 388 char *clfn = eo_gen_c_full_name_get(eolian_class_c_name_get(cl));
389 if (!clfn) 389 if (!clfn)
390 return NULL; 390 return NULL;
391 Eina_Strbuf *ret = eina_strbuf_new(); 391 Eina_Strbuf *ret = eina_strbuf_new();