summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-05-16 15:31:37 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-05-16 15:43:52 +0200
commit4ab1f2388eb303f8e5d9eae31cdcf39df683c736 (patch)
tree9dc1d113f199f97b1025e38a6c1479303b833a70 /src/bin/eolian
parent7f45f94af0201d48f7fcae14c6320ce3b9bcab71 (diff)
eolian: add API to retrieve the C name of an object
This is to prepare for type/class renaming support. This adds the necessary API to retrieve C-specific names. Other refactoring is necessary elsewhere for now. This also renames the old API eolian_class_c_name_get to eolian_class_c_macro_get to avoid conflict as well as clarify the intention.
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/headers.c2
-rw-r--r--src/bin/eolian/sources.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index d35c604..645d694 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -205,7 +205,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
205 } 205 }
206 } 206 }
207 207
208 Eina_Stringshare *mname = eolian_class_c_name_get(cl); 208 Eina_Stringshare *mname = eolian_class_c_macro_get(cl);
209 Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl); 209 Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl);
210 eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname); 210 eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname);
211 eina_stringshare_del(mname); 211 eina_stringshare_del(mname);
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 265dc75..37acd7e 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -1163,14 +1163,14 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf)
1163 eina_strbuf_append(buf, ", NULL"); 1163 eina_strbuf_append(buf, ", NULL");
1164 else 1164 else
1165 { 1165 {
1166 Eina_Stringshare *mname = eolian_class_c_name_get(icl); 1166 Eina_Stringshare *mname = eolian_class_c_macro_get(icl);
1167 eina_strbuf_append_printf(buf, ", %s", mname); 1167 eina_strbuf_append_printf(buf, ", %s", mname);
1168 eina_stringshare_del(mname); 1168 eina_stringshare_del(mname);
1169 } 1169 }
1170 Eina_Iterator *itr = eolian_class_extensions_get(cl); 1170 Eina_Iterator *itr = eolian_class_extensions_get(cl);
1171 EINA_ITERATOR_FOREACH(itr, icl) 1171 EINA_ITERATOR_FOREACH(itr, icl)
1172 { 1172 {
1173 Eina_Stringshare *mname = eolian_class_c_name_get(icl); 1173 Eina_Stringshare *mname = eolian_class_c_macro_get(icl);
1174 eina_strbuf_append_printf(buf, ", %s", mname); 1174 eina_strbuf_append_printf(buf, ", %s", mname);
1175 eina_stringshare_del(mname); 1175 eina_stringshare_del(mname);
1176 } 1176 }
@@ -1342,7 +1342,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
1342 if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor")) 1342 if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor"))
1343 { 1343 {
1344 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype); 1344 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
1345 Eina_Stringshare *mname = eolian_class_c_name_get(cl); 1345 Eina_Stringshare *mname = eolian_class_c_macro_get(cl);
1346 eina_strbuf_append(buf, " "); 1346 eina_strbuf_append(buf, " ");
1347 eina_strbuf_append(buf, fcn); 1347 eina_strbuf_append(buf, fcn);
1348 eina_stringshare_del(fcn); 1348 eina_stringshare_del(fcn);