summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo1_generator.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-05-28 17:24:35 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-05-29 10:04:01 +0300
commitfb6209f083bab798d64f1358288288e31b40b7d3 (patch)
treee5815264e8af4796ba9dfd6235549c2ed0ef4a5a /src/bin/eolian/eo1_generator.c
parentd9e177e61bf2621cbe3833c524b7fb2da2a66ef7 (diff)
Eolian: modify generators to use internal variables environment.
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo1_generator.c90
1 files changed, 41 insertions, 49 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index c798ce641b..003be9c1a3 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -5,6 +5,8 @@
5#include "eo1_generator.h" 5#include "eo1_generator.h"
6#include "common_funcs.h" 6#include "common_funcs.h"
7 7
8static _eolian_class_vars class_env;
9
8static const char 10static const char
9tmpl_dtor[] = "\ 11tmpl_dtor[] = "\
10static void\n\ 12static void\n\
@@ -131,15 +133,15 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
131 133
132 Eina_Strbuf *str_func = eina_strbuf_new(); 134 Eina_Strbuf *str_func = eina_strbuf_new();
133 if (scope == EOLIAN_SCOPE_PROTECTED) 135 if (scope == EOLIAN_SCOPE_PROTECTED)
134 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", capclass); 136 eina_strbuf_append_printf(str_func, "#ifdef %s_PROTECTED\n", class_env.upper_classname);
135 _template_fill(str_func, tmpl_eo_funcdef_doxygen, class, NULL, funcname, EINA_FALSE); 137 _template_fill(str_func, tmpl_eo_funcdef_doxygen, class, NULL, funcname, EINA_FALSE);
136 _template_fill(str_func, tmpl_eo_funcdef, class, NULL, funcname, EINA_FALSE); 138 _template_fill(str_func, tmpl_eo_funcdef, class, NULL, funcname, EINA_FALSE);
137 if (scope == EOLIAN_SCOPE_PROTECTED) 139 if (scope == EOLIAN_SCOPE_PROTECTED)
138 eina_strbuf_append_printf(str_func, "#endif\n"); 140 eina_strbuf_append_printf(str_func, "#endif\n");
139 eina_strbuf_append_printf(str_func, "\n"); 141 eina_strbuf_append_printf(str_func, "\n");
140 142
141 eina_strbuf_replace_all(str_func, "@#EOPREFIX", current_eo_prefix_upper); 143 eina_strbuf_replace_all(str_func, "@#EOPREFIX", class_env.upper_eo_prefix);
142 eina_strbuf_replace_all(str_func, "@#eoprefix", current_eo_prefix_lower); 144 eina_strbuf_replace_all(str_func, "@#eoprefix", class_env.lower_eo_prefix);
143 145
144 Eina_Strbuf *linedesc = eina_strbuf_new(); 146 Eina_Strbuf *linedesc = eina_strbuf_new();
145 eina_strbuf_append(linedesc, funcdesc ? funcdesc : "No description supplied."); 147 eina_strbuf_append(linedesc, funcdesc ? funcdesc : "No description supplied.");
@@ -244,6 +246,8 @@ eo_header_generate(const Eolian_Class class, Eina_Strbuf *buf)
244 const char *desc = eolian_class_description_get(class); 246 const char *desc = eolian_class_description_get(class);
245 Eina_Strbuf *linedesc = eina_strbuf_new(); 247 Eina_Strbuf *linedesc = eina_strbuf_new();
246 eina_strbuf_append(linedesc, "/**\n"); 248 eina_strbuf_append(linedesc, "/**\n");
249 _class_env_create(class, NULL, &class_env);
250
247 if (desc) 251 if (desc)
248 { 252 {
249 eina_strbuf_append(linedesc, desc); 253 eina_strbuf_append(linedesc, desc);
@@ -257,8 +261,8 @@ eo_header_generate(const Eolian_Class class, Eina_Strbuf *buf)
257 261
258 _template_fill(str_hdr, tmpl_eo_obj_header, class, NULL, "", EINA_TRUE); 262 _template_fill(str_hdr, tmpl_eo_obj_header, class, NULL, "", EINA_TRUE);
259 263
260 eina_strbuf_replace_all(str_hdr, "@#EOPREFIX", current_eo_prefix_upper); 264 eina_strbuf_replace_all(str_hdr, "@#EOPREFIX", class_env.upper_eo_prefix);
261 eina_strbuf_replace_all(str_hdr, "@#eoprefix", current_eo_prefix_lower); 265 eina_strbuf_replace_all(str_hdr, "@#eoprefix", class_env.lower_eo_prefix);
262 266
263 Eina_Strbuf *str_subid = eina_strbuf_new(); 267 Eina_Strbuf *str_subid = eina_strbuf_new();
264 Eina_Strbuf *str_ev = eina_strbuf_new(); 268 Eina_Strbuf *str_ev = eina_strbuf_new();
@@ -312,7 +316,7 @@ eo_header_generate(const Eolian_Class class, Eina_Strbuf *buf)
312 _template_fill(str_subid, tmpl_eo_subid, class, NULL, tmpstr, EINA_FALSE); 316 _template_fill(str_subid, tmpl_eo_subid, class, NULL, tmpstr, EINA_FALSE);
313 eo_fundef_generate(class, (Eolian_Function)data, EOLIAN_PROP_GET, str_hdr); 317 eo_fundef_generate(class, (Eolian_Function)data, EOLIAN_PROP_GET, str_hdr);
314 } 318 }
315 eina_strbuf_replace_all(str_subid, "@#EOPREFIX", current_eo_prefix_upper); 319 eina_strbuf_replace_all(str_subid, "@#EOPREFIX", class_env.upper_eo_prefix);
316 } 320 }
317 321
318 eina_strbuf_replace_all(str_hdr, "@#list_subid", eina_strbuf_string_get(str_subid)); 322 eina_strbuf_replace_all(str_hdr, "@#list_subid", eina_strbuf_string_get(str_subid));
@@ -332,7 +336,7 @@ eo_header_generate(const Eolian_Class class, Eina_Strbuf *buf)
332} 336}
333 337
334static Eina_Bool 338static Eina_Bool
335eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Function_Type ftype, Eina_Strbuf *buf, const char *impl_name) 339eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Function_Type ftype, Eina_Strbuf *buf, _eolian_class_vars *impl_env)
336{ 340{
337 const char *suffix = ""; 341 const char *suffix = "";
338 Eina_Bool var_as_ret = EINA_FALSE; 342 Eina_Bool var_as_ret = EINA_FALSE;
@@ -342,9 +346,7 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
342 Eina_Bool add_star = EINA_FALSE; 346 Eina_Bool add_star = EINA_FALSE;
343 347
344 Eina_Bool need_implementation = EINA_TRUE; 348 Eina_Bool need_implementation = EINA_TRUE;
345 if (!impl_name && eolian_function_is_virtual_pure(funcid, ftype)) need_implementation = EINA_FALSE; 349 if (!impl_env && eolian_function_is_virtual_pure(funcid, ftype)) need_implementation = EINA_FALSE;
346 _class_func_names_fill(class, NULL, NULL);
347 char *classname = strdup(current_classname);
348 350
349 Eina_Strbuf *fbody = eina_strbuf_new(); 351 Eina_Strbuf *fbody = eina_strbuf_new();
350 Eina_Strbuf *va_args = eina_strbuf_new(); 352 Eina_Strbuf *va_args = eina_strbuf_new();
@@ -374,12 +376,6 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
374 suffix = "_set"; 376 suffix = "_set";
375 } 377 }
376 378
377 char tmpstr[0xFF];
378 sprintf (tmpstr, "%s%s", eolian_function_name_get(funcid), suffix);
379 char tmpstr2[0xFF];
380 sprintf (tmpstr2, "%s_%s", lowclass, impl_name);
381 _class_func_names_fill(impl_name?NULL:class, impl_name?tmpstr2:NULL, tmpstr);
382
383 const Eina_List *l; 379 const Eina_List *l;
384 void *data; 380 void *data;
385 381
@@ -418,15 +414,16 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
418 { 414 {
419 Eina_Strbuf *ret_param = eina_strbuf_new(); 415 Eina_Strbuf *ret_param = eina_strbuf_new();
420 eina_strbuf_append_printf(fbody, "\n"); 416 eina_strbuf_append_printf(fbody, "\n");
421 eina_strbuf_append_printf(fbody, "%s%s _%s_%s%s(Eo *obj, @#Datatype_Data *pd@#full_params);\n\n", 417 eina_strbuf_append_printf(fbody, "%s%s _%s%s%s_%s%s(Eo *obj, @#Datatype_Data *pd@#full_params);\n\n",
422 ret_const?"const ":"", rettype?rettype:"void", 418 ret_const?"const ":"", rettype?rettype:"void",
423 lowclass, 419 class_env.lower_classname,
420 impl_env?"_":"",
421 impl_env?impl_env->lower_classname:"",
424 eolian_function_name_get(funcid), suffix); 422 eolian_function_name_get(funcid), suffix);
425 423
426 eina_strbuf_replace_all(fbody, "@#return_ret", tmpstr);
427 eina_strbuf_free(ret_param); 424 eina_strbuf_free(ret_param);
428 } 425 }
429 if (!impl_name) 426 if (!impl_env)
430 { 427 {
431 Eina_Strbuf *eo_func_decl = eina_strbuf_new(); 428 Eina_Strbuf *eo_func_decl = eina_strbuf_new();
432 Eina_Bool has_params = 429 Eina_Bool has_params =
@@ -436,7 +433,7 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
436 eina_strbuf_append_printf(eo_func_decl, 433 eina_strbuf_append_printf(eo_func_decl,
437 "EAPI EO_%sFUNC_BODY%s(%s_%s%s", 434 "EAPI EO_%sFUNC_BODY%s(%s_%s%s",
438 ret_is_void?"VOID_":"", has_params?"V":"", 435 ret_is_void?"VOID_":"", has_params?"V":"",
439 current_eo_prefix_lower, eolian_function_name_get(funcid), 436 class_env.lower_eo_prefix, eolian_function_name_get(funcid),
440 suffix); 437 suffix);
441 if (!ret_is_void) 438 if (!ret_is_void)
442 { 439 {
@@ -467,17 +464,16 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
467 else 464 else
468 { 465 {
469 if (data_type) eina_strbuf_replace_all(fbody, "@#Datatype_Data", data_type); 466 if (data_type) eina_strbuf_replace_all(fbody, "@#Datatype_Data", data_type);
470 else eina_strbuf_replace_all(fbody, "@#Datatype", classname); 467 else eina_strbuf_replace_all(fbody, "@#Datatype", class_env.full_classname);
471 } 468 }
472 469
473 if (!data_type || !strcmp(data_type, "null")) 470 if (!data_type || !strcmp(data_type, "null"))
474 eina_strbuf_replace_all(fbody, "@#Datatype", classname); 471 eina_strbuf_replace_all(fbody, "@#Datatype", class_env.full_classname);
475 else 472 else
476 eina_strbuf_replace_all(fbody, "@#Datatype_Data", data_type); 473 eina_strbuf_replace_all(fbody, "@#Datatype_Data", data_type);
477 } 474 }
478 eina_strbuf_append(buf, eina_strbuf_string_get(fbody)); 475 eina_strbuf_append(buf, eina_strbuf_string_get(fbody));
479 476
480 free(classname);
481 eina_strbuf_free(va_args); 477 eina_strbuf_free(va_args);
482 eina_strbuf_free(full_params); 478 eina_strbuf_free(full_params);
483 eina_strbuf_free(params); 479 eina_strbuf_free(params);
@@ -496,8 +492,8 @@ eo_func_desc_generate(const Eolian_Class class, const char *impl_name, const cha
496 eina_strbuf_reset(buf); 492 eina_strbuf_reset(buf);
497 eina_strbuf_append_printf(buf, 493 eina_strbuf_append_printf(buf,
498 "\n EO_OP_FUNC(%s_ID(%s_SUB_ID_%s), _eo_obj_%s%s%s_%s),", 494 "\n EO_OP_FUNC(%s_ID(%s_SUB_ID_%s), _eo_obj_%s%s%s_%s),",
499 current_eo_prefix_upper, current_eo_prefix_upper, capfunc, 495 class_env.upper_eo_prefix, class_env.upper_eo_prefix, capfunc,
500 lowclass, impl_name?"_":"", impl_name?impl_name:"", 496 class_env.lower_classname, impl_name?"_":"", impl_name?impl_name:"",
501 func_name); 497 func_name);
502 return EINA_TRUE; 498 return EINA_TRUE;
503} 499}
@@ -514,9 +510,9 @@ eo_op_desc_generate(const Eolian_Class class, Eolian_Function fid, Eolian_Functi
514 if (ftype == EOLIAN_PROP_GET) suffix = "_get"; 510 if (ftype == EOLIAN_PROP_GET) suffix = "_get";
515 if (ftype == EOLIAN_PROP_SET) suffix = "_set"; 511 if (ftype == EOLIAN_PROP_SET) suffix = "_set";
516 Eina_Bool is_virtual_pure = eolian_function_is_virtual_pure(fid, ftype); 512 Eina_Bool is_virtual_pure = eolian_function_is_virtual_pure(fid, ftype);
517 eina_strbuf_append_printf(buf, "\n EO_OP_FUNC(%s_%s%s, ", current_eo_prefix_lower, funcname, suffix); 513 eina_strbuf_append_printf(buf, "\n EO_OP_FUNC(%s_%s%s, ", class_env.lower_eo_prefix, funcname, suffix);
518 if (!is_virtual_pure) 514 if (!is_virtual_pure)
519 eina_strbuf_append_printf(buf, "_%s_%s%s, \"%s\"),", lowclass, funcname, suffix, desc); 515 eina_strbuf_append_printf(buf, "_%s_%s%s, \"%s\"),", class_env.lower_classname, funcname, suffix, desc);
520 else 516 else
521 eina_strbuf_append_printf(buf, "NULL, \"%s\"),", desc); 517 eina_strbuf_append_printf(buf, "NULL, \"%s\"),", desc);
522 518
@@ -563,9 +559,6 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
563 const Eina_List *itr; 559 const Eina_List *itr;
564 Eolian_Function fn; 560 Eolian_Function fn;
565 561
566 _class_func_names_fill(class, NULL, NULL);
567 char *classname = strdup(current_classname);
568
569 const char *str_classtype = NULL; 562 const char *str_classtype = NULL;
570 switch(eolian_class_type_get(class)) 563 switch(eolian_class_type_get(class))
571 { 564 {
@@ -587,8 +580,7 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
587 580
588 if (!str_classtype) 581 if (!str_classtype)
589 { 582 {
590 ERR ("Unknown class type for class %s !", classname); 583 ERR ("Unknown class type for class %s !", class_env.full_classname);
591 free(classname);
592 return EINA_FALSE; 584 return EINA_FALSE;
593 } 585 }
594 586
@@ -603,8 +595,8 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
603 _template_fill(str_end, tmpl_eo_src, class, NULL, NULL, EINA_TRUE); 595 _template_fill(str_end, tmpl_eo_src, class, NULL, NULL, EINA_TRUE);
604 596
605 eina_strbuf_replace_all(str_end, "@#type_class", str_classtype); 597 eina_strbuf_replace_all(str_end, "@#type_class", str_classtype);
606 eina_strbuf_replace_all(str_end, "@#EOPREFIX", current_eo_prefix_upper); 598 eina_strbuf_replace_all(str_end, "@#EOPREFIX", class_env.upper_eo_prefix);
607 eina_strbuf_replace_all(str_end, "@#eoprefix", current_eo_prefix_lower); 599 eina_strbuf_replace_all(str_end, "@#eoprefix", class_env.lower_eo_prefix);
608 600
609 eina_strbuf_reset(tmpbuf); 601 eina_strbuf_reset(tmpbuf);
610 eina_strbuf_replace_all(str_end, "@#ctor_func", eina_strbuf_string_get(tmpbuf)); 602 eina_strbuf_replace_all(str_end, "@#ctor_func", eina_strbuf_string_get(tmpbuf));
@@ -642,16 +634,16 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
642 634
643 eolian_implement_information_get(impl_desc, &impl_classname, &funcname, &ftype); 635 eolian_implement_information_get(impl_desc, &impl_classname, &funcname, &ftype);
644 Eolian_Class impl_class = eolian_class_find_by_name(impl_classname); 636 Eolian_Class impl_class = eolian_class_find_by_name(impl_classname);
637 _eolian_class_vars impl_env;
638 _class_env_create(impl_class, NULL, &impl_env);
645 639
646 eina_strbuf_reset(tmpl_impl); 640 eina_strbuf_reset(tmpl_impl);
647 _template_fill(str_func, NULL, impl_class, NULL, NULL, EINA_FALSE); /* Invoked to set the variables */
648 eina_strbuf_append(tmpl_impl, tmpl_eo_func_desc); 641 eina_strbuf_append(tmpl_impl, tmpl_eo_func_desc);
649 eina_strbuf_replace_all(tmpl_impl, "@#EOPREFIX", current_eo_prefix_upper); 642 eina_strbuf_replace_all(tmpl_impl, "@#eoprefix", impl_env.lower_eo_prefix);
650 eina_strbuf_replace_all(tmpl_impl, "@#eoprefix", current_eo_prefix_lower);
651 643
652 char implname[0xFF]; 644 char implname[0xFF];
653 char *tp = implname; 645 char *tp = implname;
654 sprintf(implname, "%s_%s", classname, impl_classname); 646 sprintf(implname, "%s_%s", class_env.full_classname, impl_env.full_classname);
655 eina_str_tolower(&tp); 647 eina_str_tolower(&tp);
656 648
657 eina_strbuf_replace_all(tmpl_impl, "@#class", implname); 649 eina_strbuf_replace_all(tmpl_impl, "@#class", implname);
@@ -682,7 +674,7 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
682 if (in_meth) 674 if (in_meth)
683 { 675 {
684 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, funcname, EINA_FALSE); 676 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, funcname, EINA_FALSE);
685 eo_bind_func_generate(class, in_meth, EOLIAN_UNRESOLVED, str_bodyf, impl_classname); 677 eo_bind_func_generate(class, in_meth, EOLIAN_UNRESOLVED, str_bodyf, &impl_env);
686 continue; 678 continue;
687 } 679 }
688 680
@@ -699,14 +691,14 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
699 { 691 {
700 sprintf(tmpstr, "%s_set", funcname); 692 sprintf(tmpstr, "%s_set", funcname);
701 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, tmpstr, EINA_FALSE); 693 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, tmpstr, EINA_FALSE);
702 eo_bind_func_generate(class, in_prop, EOLIAN_PROP_SET, str_bodyf, impl_classname); 694 eo_bind_func_generate(class, in_prop, EOLIAN_PROP_SET, str_bodyf, &impl_env);
703 } 695 }
704 696
705 if (prop_read) 697 if (prop_read)
706 { 698 {
707 sprintf(tmpstr, "%s_get", funcname); 699 sprintf(tmpstr, "%s_get", funcname);
708 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, tmpstr, EINA_FALSE); 700 _template_fill(str_op, tmpl_impl_str, impl_class, NULL, tmpstr, EINA_FALSE);
709 eo_bind_func_generate(class, in_prop, EOLIAN_PROP_GET, str_bodyf, impl_classname); 701 eo_bind_func_generate(class, in_prop, EOLIAN_PROP_GET, str_bodyf, &impl_env);
710 } 702 }
711 } 703 }
712 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf)); 704 eina_strbuf_append(str_op, eina_strbuf_string_get(tmpbuf));
@@ -805,7 +797,7 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
805 eina_strbuf_replace_all(events_desc, "@#list_evdesc", eina_strbuf_string_get(str_ev)); 797 eina_strbuf_replace_all(events_desc, "@#list_evdesc", eina_strbuf_string_get(str_ev));
806 eina_strbuf_replace_all(str_end, "@#events_desc", eina_strbuf_string_get(events_desc)); 798 eina_strbuf_replace_all(str_end, "@#events_desc", eina_strbuf_string_get(events_desc));
807 eina_strbuf_free(events_desc); 799 eina_strbuf_free(events_desc);
808 eina_strbuf_append_printf(tmpbuf, "_%s_event_desc", lowclass); 800 eina_strbuf_append_printf(tmpbuf, "_%s_event_desc", class_env.lower_classname);
809 } 801 }
810 else 802 else
811 { 803 {
@@ -819,10 +811,9 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
819 EINA_LIST_FOREACH(eolian_class_inherits_list_get(class), itr, inherit_name) 811 EINA_LIST_FOREACH(eolian_class_inherits_list_get(class), itr, inherit_name)
820 { 812 {
821 Eolian_Class inherit_class = eolian_class_find_by_name(inherit_name); 813 Eolian_Class inherit_class = eolian_class_find_by_name(inherit_name);
822 const char *eo_prefix = eolian_class_eo_prefix_get(inherit_class); 814 _eolian_class_vars inherit_env;
823 if (!eo_prefix) eo_prefix = inherit_name; 815 _class_env_create(inherit_class, NULL, &inherit_env);
824 _template_fill(tmpbuf, "@#EOPREFIX_CLASS, ", NULL, eo_prefix, "", EINA_FALSE); 816 eina_strbuf_append_printf(tmpbuf, "%s_CLASS, ", inherit_env.upper_eo_prefix);
825 eina_strbuf_replace_all(tmpbuf, "@#EOPREFIX", current_eo_prefix_upper);
826 } 817 }
827 818
828 if (eina_strbuf_length_get(tmpbuf) == 0) eina_strbuf_append(tmpbuf, "NULL, "); 819 if (eina_strbuf_length_get(tmpbuf) == 0) eina_strbuf_append(tmpbuf, "NULL, ");
@@ -858,7 +849,7 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
858 { 849 {
859 Eina_Strbuf *sizeofbuf = eina_strbuf_new(); 850 Eina_Strbuf *sizeofbuf = eina_strbuf_new();
860 eina_strbuf_append_printf(sizeofbuf, "sizeof(%s%s)", 851 eina_strbuf_append_printf(sizeofbuf, "sizeof(%s%s)",
861 data_type?data_type:classname, 852 data_type?data_type:class_env.full_classname,
862 data_type?"":"_Data"); 853 data_type?"":"_Data");
863 eina_strbuf_replace_all(str_end, "@#SizeOfData", eina_strbuf_string_get(sizeofbuf)); 854 eina_strbuf_replace_all(str_end, "@#SizeOfData", eina_strbuf_string_get(sizeofbuf));
864 eina_strbuf_free(sizeofbuf); 855 eina_strbuf_free(sizeofbuf);
@@ -867,7 +858,6 @@ eo_source_end_generate(const Eolian_Class class, Eina_Strbuf *buf)
867 858
868 ret = EINA_TRUE; 859 ret = EINA_TRUE;
869end: 860end:
870 free(classname);
871 eina_strbuf_free(tmpbuf); 861 eina_strbuf_free(tmpbuf);
872 eina_strbuf_free(str_op); 862 eina_strbuf_free(str_op);
873 eina_strbuf_free(str_func); 863 eina_strbuf_free(str_func);
@@ -890,6 +880,8 @@ eo_source_generate(const Eolian_Class class, Eina_Strbuf *buf)
890 880
891 if (!eo_source_beginning_generate(class, buf)) goto end; 881 if (!eo_source_beginning_generate(class, buf)) goto end;
892 882
883 _class_env_create(class, NULL, &class_env);
884
893 //Properties 885 //Properties
894 EINA_LIST_FOREACH(eolian_class_functions_list_get(class, EOLIAN_PROPERTY), itr, fn) 886 EINA_LIST_FOREACH(eolian_class_functions_list_get(class, EOLIAN_PROPERTY), itr, fn)
895 { 887 {