summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-10-19 13:21:11 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-10-19 13:25:06 +0300
commitdedd8cef64be99e59d7b0ca23f2651d06bdf3c7e (patch)
tree7813c2d2d5a209a4b069084a6f6964d4ef7946e0 /src/bin/eolian/eo_generator.c
parentaf513b6af3a6a19c28c81c4d1ad7edb11bfb1520 (diff)
Eolian/Generator: support common descriptions for properties.
Diffstat (limited to 'src/bin/eolian/eo_generator.c')
-rw-r--r--src/bin/eolian/eo_generator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index bc16c75a91..9ab894603d 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -114,7 +114,6 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
114 } 114 }
115 eina_iterator_free(itr); 115 eina_iterator_free(itr);
116 } 116 }
117 const char *funcdesc = eolian_function_description_get(func, ftype);
118 Eina_Strbuf *str_func = eina_strbuf_new(); 117 Eina_Strbuf *str_func = eina_strbuf_new();
119 if (scope == EOLIAN_SCOPE_PROTECTED) 118 if (scope == EOLIAN_SCOPE_PROTECTED)
120 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", class_env.upper_classname); 119 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", class_env.upper_classname);
@@ -127,7 +126,12 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
127 eina_strbuf_append_printf(str_func, "\n"); 126 eina_strbuf_append_printf(str_func, "\n");
128 127
129 Eina_Strbuf *linedesc = eina_strbuf_new(); 128 Eina_Strbuf *linedesc = eina_strbuf_new();
130 eina_strbuf_append(linedesc, funcdesc ? funcdesc : "No description supplied."); 129 const char *common_desc = eolian_function_description_get(func, EOLIAN_UNRESOLVED);
130 const char *specific_desc = (ftype == EOLIAN_PROP_SET || ftype == EOLIAN_PROP_GET) ?
131 eolian_function_description_get(func, ftype) : NULL;
132 if (!common_desc && !specific_desc) eina_strbuf_append(linedesc, "No description supplied.");
133 if (common_desc) eina_strbuf_append_printf(linedesc, "%s\n", common_desc);
134 if (specific_desc) eina_strbuf_append(linedesc, specific_desc);
131 if (eina_strbuf_length_get(linedesc)) 135 if (eina_strbuf_length_get(linedesc))
132 { 136 {
133 eina_strbuf_replace_all(linedesc, "\n", "\n * "); 137 eina_strbuf_replace_all(linedesc, "\n", "\n * ");