summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-09-28 14:15:15 +0100
committerTom Hacohen <tom@stosb.com>2015-09-28 15:09:16 +0100
commit37f84b7e966372384e2dfe5d191a6f907a17962e (patch)
tree49d261ffd0ca6cc5a3a8498a352d5aad7ff2bd49 /src/bin/eolian/eo_generator.c
parent5f74afe4f79f660022cae07f6d113b07bfaa23a7 (diff)
Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway it's a good opportunity to drop this. This may cause a slight performance issues with legacy events, such as smart callbacks. This shouldn't really be a problem as we've migrated away from them. If it does, we need to migrate the remaining parts. Only relevant for callbacks that are added before the classes are created, which shouldn't be possible except for smart, only for old evas callbacks.
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo_generator.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index a07bdfc539..5ade88d2bd 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -586,7 +586,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
586 586
587static Eina_Bool 587static Eina_Bool
588eo_op_desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolian_Function_Type ftype, 588eo_op_desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolian_Function_Type ftype,
589 const char *desc, Eina_Strbuf *buf) 589 Eina_Strbuf *buf)
590{ 590{
591 _eolian_class_func_vars func_env; 591 _eolian_class_func_vars func_env;
592 const char *funcname = eolian_function_name_get(fid); 592 const char *funcname = eolian_function_name_get(fid);
@@ -603,12 +603,12 @@ eo_op_desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolia
603 if (!is_virtual_pure) 603 if (!is_virtual_pure)
604 { 604 {
605 Eolian_Function_Type ftype2 = (Eolian_Function_Type) eina_hash_find(_funcs_params_init, funcname); 605 Eolian_Function_Type ftype2 = (Eolian_Function_Type) eina_hash_find(_funcs_params_init, funcname);
606 eina_strbuf_append_printf(buf, "%s_%s_%s%s, \"%s\"),", 606 eina_strbuf_append_printf(buf, "%s_%s_%s%s),",
607 ftype == ftype2?"__eolian":"", 607 ftype == ftype2?"__eolian":"",
608 class_env.lower_classname, funcname, suffix, desc); 608 class_env.lower_classname, funcname, suffix);
609 } 609 }
610 else 610 else
611 eina_strbuf_append_printf(buf, "NULL, \"%s\"),", desc); 611 eina_strbuf_append_printf(buf, "NULL),");
612 612
613 return EINA_TRUE; 613 return EINA_TRUE;
614} 614}
@@ -625,16 +625,11 @@ eo_source_beginning_generate(const Eolian_Class *class, Eina_Strbuf *buf)
625 EINA_ITERATOR_FOREACH(itr, event) 625 EINA_ITERATOR_FOREACH(itr, event)
626 { 626 {
627 Eina_Stringshare *evname = eolian_event_c_name_get(event); 627 Eina_Stringshare *evname = eolian_event_c_name_get(event);
628 const char *evdesc = NULL;
629 const Eolian_Documentation *doc = eolian_event_documentation_get(event);
630 if (doc) evdesc = eolian_documentation_summary_get(doc);
631 char *evdesc_line1 = _source_desc_get(evdesc);
632 628
633 eina_strbuf_append_printf(tmpbuf, 629 eina_strbuf_append_printf(tmpbuf,
634 "EOAPI const Eo_Event_Description _%s =\n EO_EVENT_DESCRIPTION(\"%s\", \"%s\");\n", 630 "EOAPI const Eo_Event_Description _%s =\n EO_EVENT_DESCRIPTION(\"%s\");\n",
635 evname, eolian_event_name_get(event), evdesc_line1); 631 evname, eolian_event_name_get(event));
636 eina_stringshare_del(evname); 632 eina_stringshare_del(evname);
637 free(evdesc_line1);
638 } 633 }
639 eina_iterator_free(itr); 634 eina_iterator_free(itr);
640 635
@@ -652,14 +647,8 @@ _desc_generate(const Eolian_Class *class, const Eolian_Function *fid, Eolian_Fun
652 snprintf(tmpstr, sizeof(tmpstr), "%s%s", funcname, (ftype == EOLIAN_PROP_SET) 647 snprintf(tmpstr, sizeof(tmpstr), "%s%s", funcname, (ftype == EOLIAN_PROP_SET)
653 ? "_set" : ((ftype == EOLIAN_PROP_GET) ? "_get" : "")); 648 ? "_set" : ((ftype == EOLIAN_PROP_GET) ? "_get" : ""));
654 649
655 const char *opdesc = NULL; 650 eo_op_desc_generate(class, fid, ftype, tmpbuf);
656 const Eolian_Documentation *doc = eolian_function_documentation_get(fid, ftype);
657 if (doc) opdesc = eolian_documentation_summary_get(doc);
658
659 char *desc = _source_desc_get(opdesc);
660 eo_op_desc_generate(class, fid, ftype, desc, tmpbuf);
661 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); 651 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf));
662 free(desc);
663} 652}
664 653
665static Eina_Bool 654static Eina_Bool