summaryrefslogtreecommitdiff
path: root/src/bin/eolian/headers.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-05-24 16:36:23 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-05-30 17:15:53 +0200
commit45a73a08789f0f91ea72cf647f55058e6f3d4813 (patch)
tree833d9fbf7b3e7a467eb570d1382b64eee6747c8b /src/bin/eolian/headers.c
parent83bf422159750680e0b7ae9add94ad7e4bd0edba (diff)
eolian: pass unit to class get_by_name/file
Diffstat (limited to 'src/bin/eolian/headers.c')
-rw-r--r--src/bin/eolian/headers.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 27f498e..8538731 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -12,8 +12,9 @@ _get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Dir pdir)
12} 12}
13 13
14static void 14static void
15_gen_func(const Eolian_Function *fid, Eolian_Function_Type ftype, 15_gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
16 Eina_Strbuf *buf, char *cname, char *cnameu, Eina_Bool legacy) 16 Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname,
17 char *cnameu, Eina_Bool legacy)
17{ 18{
18 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, legacy); 19 Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, legacy);
19 if (!fcn) 20 if (!fcn)
@@ -49,7 +50,7 @@ _gen_func(const Eolian_Function *fid, Eolian_Function_Type ftype,
49 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY); 50 hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY);
50 if (hasdoc) 51 if (hasdoc)
51 { 52 {
52 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(fid, ftype, 0, legacy); 53 Eina_Strbuf *dbuf = eo_gen_docs_func_gen(src, fid, ftype, 0, legacy);
53 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf)); 54 eina_strbuf_append(buf, eina_strbuf_string_get(dbuf));
54 eina_strbuf_append_char(buf, '\n'); 55 eina_strbuf_append_char(buf, '\n');
55 eina_strbuf_free(dbuf); 56 eina_strbuf_free(dbuf);
@@ -183,7 +184,7 @@ _gen_func(const Eolian_Function *fid, Eolian_Function_Type ftype,
183} 184}
184 185
185void 186void
186eo_gen_header_gen(const Eolian_Unit *src EINA_UNUSED, const Eolian_Class *cl, 187eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl,
187 Eina_Strbuf *buf, Eina_Bool legacy) 188 Eina_Strbuf *buf, Eina_Bool legacy)
188{ 189{
189 if (!cl) 190 if (!cl)
@@ -199,7 +200,7 @@ eo_gen_header_gen(const Eolian_Unit *src EINA_UNUSED, const Eolian_Class *cl,
199 const Eolian_Documentation *doc = eolian_class_documentation_get(cl); 200 const Eolian_Documentation *doc = eolian_class_documentation_get(cl);
200 if (doc) 201 if (doc)
201 { 202 {
202 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(doc, 203 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(src, doc,
203 eolian_class_full_name_get(cl), 0, EINA_FALSE); 204 eolian_class_full_name_get(cl), 0, EINA_FALSE);
204 if (cdoc) 205 if (cdoc)
205 { 206 {
@@ -239,15 +240,15 @@ eo_gen_header_gen(const Eolian_Unit *src EINA_UNUSED, const Eolian_Class *cl,
239 { 240 {
240 case EOLIAN_PROP_GET: 241 case EOLIAN_PROP_GET:
241 case EOLIAN_PROP_SET: 242 case EOLIAN_PROP_SET:
242 _gen_func(fid, ftype, buf, cname, cnameu, legacy); 243 _gen_func(src, fid, ftype, buf, cname, cnameu, legacy);
243 break; 244 break;
244 case EOLIAN_PROPERTY: 245 case EOLIAN_PROPERTY:
245 _gen_func(fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy); 246 _gen_func(src, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy);
246 eina_strbuf_append_char(buf, '\n'); 247 eina_strbuf_append_char(buf, '\n');
247 _gen_func(fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy); 248 _gen_func(src, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy);
248 break; 249 break;
249 default: 250 default:
250 _gen_func(fid, EOLIAN_METHOD, buf, cname, cnameu, legacy); 251 _gen_func(src, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy);
251 } 252 }
252 } 253 }
253 eina_iterator_free(itr); 254 eina_iterator_free(itr);
@@ -284,7 +285,7 @@ events:
284 eina_strbuf_append_printf(buf, "EWAPI extern const " 285 eina_strbuf_append_printf(buf, "EWAPI extern const "
285 "Efl_Event_Description _%s;\n\n", evn); 286 "Efl_Event_Description _%s;\n\n", evn);
286 287
287 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(ev, 288 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(src, ev,
288 eolian_class_full_name_get(cl)); 289 eolian_class_full_name_get(cl));
289 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf)); 290 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
290 eina_strbuf_append_char(buf, '\n'); 291 eina_strbuf_append_char(buf, '\n');