summaryrefslogtreecommitdiff
path: root/src/bin/eolian/headers.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-04-18 16:34:49 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-04-18 16:38:14 +0200
commit543902f2ba13b69b052eb21a4a36324d96f5eeba (patch)
tree1e8319b39e6de8fd942ca7ecd2de28fe107067fb /src/bin/eolian/headers.c
parentd13cfe1b83f594238f199e590bfc50fa7fd8c945 (diff)
eolian: make doc ref resolution global
Doc refs no longer introduce new dependencies into files. Instead, they're parsed globally, and any doc ref lookup is also made globally. This allows unit based dependencies to correspond more to what files actually really need at compile time/runtime, with docs being irrelevant to that; it also simplifies the API. The doc resolution API now takes Eolian_State instead of Eolian_Unit, too.
Diffstat (limited to 'src/bin/eolian/headers.c')
-rw-r--r--src/bin/eolian/headers.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index db6ea53..4ebf9a7 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -66,7 +66,7 @@ eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf,
66} 66}
67 67
68static void 68static void
69_gen_func(const Eolian_Unit *src, const Eolian_Function *fid, 69_gen_func(const Eolian_State *state, const Eolian_Function *fid,
70 Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname, 70 Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname,
71 char *cnameu, Eina_Bool legacy) 71 char *cnameu, Eina_Bool legacy)
72{ 72{
@@ -104,7 +104,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
104 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY); 104 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY);
105 if (hasdoc) 105 if (hasdoc)
106 { 106 {
107 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(src, fid, ftype, 0, legacy); 107 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0, legacy);
108 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf)); 108 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf));
109 eina_strbuf_append_char(buf, '\n'); 109 eina_strbuf_append_char(buf, '\n');
110 eina_strbuf_free(dbuf); 110 eina_strbuf_free(dbuf);
@@ -181,7 +181,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
181} 181}
182 182
183void 183void
184eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl, 184eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
185 Eina_Strbuf *buf, Eina_Bool legacy) 185 Eina_Strbuf *buf, Eina_Bool legacy)
186{ 186{
187 if (!cl) 187 if (!cl)
@@ -197,7 +197,7 @@ eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl,
197 const Eolian_Documentation *doc = eolian_class_documentation_get(cl); 197 const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
198 if (doc) 198 if (doc)
199 { 199 {
200 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(src, doc, 200 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
201 eolian_class_name_get(cl), 0, EINA_FALSE); 201 eolian_class_name_get(cl), 0, EINA_FALSE);
202 if (cdoc) 202 if (cdoc)
203 { 203 {
@@ -237,15 +237,15 @@ eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl,
237 { 237 {
238 case EOLIAN_PROP_GET: 238 case EOLIAN_PROP_GET:
239 case EOLIAN_PROP_SET: 239 case EOLIAN_PROP_SET:
240 _gen_func(src, fid, ftype, buf, cname, cnameu, legacy); 240 _gen_func(state, fid, ftype, buf, cname, cnameu, legacy);
241 break; 241 break;
242 case EOLIAN_PROPERTY: 242 case EOLIAN_PROPERTY:
243 _gen_func(src, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy); 243 _gen_func(state, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy);
244 eina_strbuf_append_char(buf, '\n'); 244 eina_strbuf_append_char(buf, '\n');
245 _gen_func(src, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy); 245 _gen_func(state, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy);
246 break; 246 break;
247 default: 247 default:
248 _gen_func(src, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy); 248 _gen_func(state, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy);
249 } 249 }
250 } 250 }
251 eina_iterator_free(itr); 251 eina_iterator_free(itr);
@@ -282,7 +282,7 @@ events:
282 eina_strbuf_append_printf(buf, "EWAPI extern const " 282 eina_strbuf_append_printf(buf, "EWAPI extern const "
283 "Efl_Event_Description _%s;\n\n", evn); 283 "Efl_Event_Description _%s;\n\n", evn);
284 284
285 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(src, ev, 285 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
286 eolian_class_name_get(cl)); 286 eolian_class_name_get(cl));
287 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf)); 287 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
288 eina_strbuf_append_char(buf, '\n'); 288 eina_strbuf_append_char(buf, '\n');