summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-23 11:50:09 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-10-02 10:19:06 +0300
commit4645fa2a821de5f727385531c77207bd603194e4 (patch)
treeabc3ec9ac1a35641469cbcd173c5ecfdcb0e8f02
parent1cccd3dd9a461178a533f48bc79d3d4a3025781a (diff)
Generator: more consts for lists
-rw-r--r--src/lib/generator.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/generator.c b/src/lib/generator.c
index 29e6084..6c0171c 100644
--- a/src/lib/generator.c
+++ b/src/lib/generator.c
@@ -39,9 +39,9 @@ typedef struct
39 39
40/* Check if current dep_id is in list of Dep_Ids */ 40/* Check if current dep_id is in list of Dep_Ids */
41static Eina_Bool 41static Eina_Bool
42_is_in_list(Eina_List *lst, Dep_Id *dep_id) 42_is_in_list(const Eina_List *lst, Dep_Id *dep_id)
43{ 43{
44 Eina_List *itr; 44 const Eina_List *itr;
45 Dep_Id *dep_id_itr; 45 Dep_Id *dep_id_itr;
46 EINA_LIST_FOREACH(lst, itr, dep_id_itr) 46 EINA_LIST_FOREACH(lst, itr, dep_id_itr)
47 if (dep_id_itr == dep_id) return EINA_TRUE; 47 if (dep_id_itr == dep_id) return EINA_TRUE;
@@ -207,9 +207,9 @@ _wdg_prop_add_generate(Gui_Session *session EINA_UNUSED, const Gui_Widget *wdg,
207 207
208 const Op_Desc *op_desc; 208 const Op_Desc *op_desc;
209 Gui_Value *gui_value; 209 Gui_Value *gui_value;
210 Eina_List *itr; 210 const Eina_List *itr;
211 211
212 Eina_List *values_lst = prop_value_get(prop); 212 const Eina_List *values_lst = prop_value_get(prop);
213 213
214 Eina_Stringshare *class_id = wdg_class_name_get(wdg); 214 Eina_Stringshare *class_id = wdg_class_name_get(wdg);
215 if (!class_id) 215 if (!class_id)
@@ -249,7 +249,7 @@ _content_set_generate(Gui_Session *session EINA_UNUSED, const Gui_Widget *wdg, c
249 Widget_Context *wdg_ctx = data; 249 Widget_Context *wdg_ctx = data;
250 const Op_Desc *op_desc; 250 const Op_Desc *op_desc;
251 Gui_Value *gui_value; 251 Gui_Value *gui_value;
252 Eina_List *itr; 252 const Eina_List *itr;
253 253
254 Eina_Stringshare *class_id = wdg_class_name_get(wdg); 254 Eina_Stringshare *class_id = wdg_class_name_get(wdg);
255 if (!class_id) 255 if (!class_id)
@@ -264,7 +264,7 @@ _content_set_generate(Gui_Session *session EINA_UNUSED, const Gui_Widget *wdg, c
264 return EINA_FALSE; 264 return EINA_FALSE;
265 } 265 }
266 266
267 Eina_List *values_lst = prop_value_get(prop); 267 const Eina_List *values_lst = prop_value_get(prop);
268 268
269 eina_strbuf_append_printf(wdg_ctx->buf, " eo_do(%s, %s(", wdg_name_get(wdg), 269 eina_strbuf_append_printf(wdg_ctx->buf, " eo_do(%s, %s(", wdg_name_get(wdg),
270 db_op_desc_func_name_get(op_desc)); 270 db_op_desc_func_name_get(op_desc));
@@ -288,7 +288,7 @@ _item_iterate(Gui_Session *session, Widget_Context *wdg_ctx, const Gui_Widget *w
288 Dep_Id *wit_id = item_container_item_dep_id_get(wit); 288 Dep_Id *wit_id = item_container_item_dep_id_get(wit);
289 const char *item_name = dep_name_get(wit_id); 289 const char *item_name = dep_name_get(wit_id);
290 const Op_Desc *op_desc; 290 const Op_Desc *op_desc;
291 Eina_List *itr; 291 const Eina_List *itr;
292 292
293 Eina_Stringshare *class_id = wdg_class_name_get(wdg); 293 Eina_Stringshare *class_id = wdg_class_name_get(wdg);
294 if (!class_id) 294 if (!class_id)
@@ -314,7 +314,7 @@ _item_iterate(Gui_Session *session, Widget_Context *wdg_ctx, const Gui_Widget *w
314 item_name ? item_name : "", item_name ? " = " : "", 314 item_name ? item_name : "", item_name ? " = " : "",
315 db_op_desc_func_name_get(op_desc)); 315 db_op_desc_func_name_get(op_desc));
316 316
317 Eina_List *values_lst = prop_value_get(prop); 317 const Eina_List *values_lst = prop_value_get(prop);
318 Gui_Value *val; 318 Gui_Value *val;
319 EINA_LIST_FOREACH(values_lst, itr, val) 319 EINA_LIST_FOREACH(values_lst, itr, val)
320 { 320 {
@@ -390,7 +390,7 @@ _wdg_add_generate(Gui_Session *session, const Gui_Widget *wdg, void *data)
390 /* Looking for op_id of current constructor*/ 390 /* Looking for op_id of current constructor*/
391 Op_Desc *op_desc = NULL; 391 Op_Desc *op_desc = NULL;
392 Gui_Value *gui_value = NULL; 392 Gui_Value *gui_value = NULL;
393 Eina_List *values_lst, *itr; 393 const Eina_List *values_lst, *itr;
394 394
395 char *constr_id = wdg_data_get(wdg, CONSTRUCTOR); 395 char *constr_id = wdg_data_get(wdg, CONSTRUCTOR);
396 op_desc = db_mro_op_desc_get(class_id, NULL, constr_id); 396 op_desc = db_mro_op_desc_get(class_id, NULL, constr_id);
@@ -435,7 +435,7 @@ _iter_widget(Gui_Session *session, Global_Gen_Context *gl_ctx, Widget_Context *w
435 435
436 if (manager_widget_create(session, wdg, MODE_GENERATOR, wdg_ctx)) 436 if (manager_widget_create(session, wdg, MODE_GENERATOR, wdg_ctx))
437 { 437 {
438 Eina_List *itr; 438 const Eina_List *itr;
439 Dep_Id *wid; 439 Dep_Id *wid;
440 440
441 manager_widget_configure(session, wdg, MODE_GENERATOR, wdg_ctx); 441 manager_widget_configure(session, wdg, MODE_GENERATOR, wdg_ctx);
@@ -500,7 +500,7 @@ _wdg_creation_function_generate(Gui_Session *session, Gui_Widget *wdg, Widget_Co
500static void 500static void
501_sequence_generate(Gui_Session *session, Gui_Sequence *seq, Sequence_Context *seq_ctx) 501_sequence_generate(Gui_Session *session, Gui_Sequence *seq, Sequence_Context *seq_ctx)
502{ 502{
503 Eina_List *itr; 503 const Eina_List *itr;
504 Gui_Action *action; 504 Gui_Action *action;
505 Global_Gen_Context *gl_ctx = seq_ctx->gl_ctx; 505 Global_Gen_Context *gl_ctx = seq_ctx->gl_ctx;
506 506
@@ -541,7 +541,7 @@ _sequence_generate(Gui_Session *session, Gui_Sequence *seq, Sequence_Context *se
541 /* If parameter of action's property is object, need to declare it as (static) global. */ 541 /* If parameter of action's property is object, need to declare it as (static) global. */
542 if (prop) 542 if (prop)
543 { 543 {
544 Eina_List *itr2; 544 const Eina_List *itr2;
545 Gui_Value *gui_value; 545 Gui_Value *gui_value;
546 EINA_LIST_FOREACH(prop_value_get(prop), itr2, gui_value) 546 EINA_LIST_FOREACH(prop_value_get(prop), itr2, gui_value)
547 { 547 {
@@ -696,14 +696,14 @@ _ctx_generate(Global_Gen_Context *gl_ctx)
696 } 696 }
697 697
698 /* Generate sequences */ 698 /* Generate sequences */
699 Eina_List* seqs_list = gui_context_seq_list_get(ctx); 699 const Eina_List* seqs_list = gui_context_seq_list_get(ctx);
700 EINA_LIST_FOREACH(seqs_list, itr, dep_id) 700 EINA_LIST_FOREACH(seqs_list, itr, dep_id)
701 { 701 {
702 Gui_Sequence *seq = sequence_get(dep_id); 702 Gui_Sequence *seq = sequence_get(dep_id);
703 if (seq) _sequence_generate(gl_ctx->session, seq, &seq_ctx); 703 if (seq) _sequence_generate(gl_ctx->session, seq, &seq_ctx);
704 } 704 }
705 705
706 Eina_List* wdgs_list = gui_context_wdg_list_get(ctx); 706 const Eina_List* wdgs_list = gui_context_wdg_list_get(ctx);
707 Eina_Strbuf *wdgs_buf = eina_strbuf_new(); 707 Eina_Strbuf *wdgs_buf = eina_strbuf_new();
708 Widget_Context wdg_ctx; 708 Widget_Context wdg_ctx;
709 wdg_ctx.gl_ctx = gl_ctx; 709 wdg_ctx.gl_ctx = gl_ctx;