Dear raster

Thank you for getting back out and sorry for an inconvenience.
I should have be more careful.
But It's necessary code for type change.
After I check the issue, I will fix the seg fault.

Thanks
--
Jaehwan Kim


2011년 12월 16일 금요일에 Enlightenment SVN님이 작성:

> Log:
> back out:
>  r66257 <- another small fix on the real problem
>  r66250 <- a small fix on the real problem
>  r66242 <- the real problem
>
>  jaewhan - your commit yesterday (r66242) has made edje_cc very
>  unstable and it will randomly segv (sometimes yes, sometimes no). as
>  such it's at the point i can't even compile e and elm without it
>  segving somewhere during build, so this gets backed out. review your
>  change carefully and look for issues.
>
>
>
> Author:       raster
> Date:         2011-12-15 16:29:05 -0800 (Thu, 15 Dec 2011)
> New Revision: 66265
> Trac:         http://trac.enlightenment.org/e/changeset/66265
>
> Modified:
>  trunk/edje/src/bin/edje_cc_handlers.c trunk/edje/src/bin/edje_cc_mem.c
> trunk/edje/src/bin/edje_cc_out.c
>
> Modified: trunk/edje/src/bin/edje_cc_handlers.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_handlers.c       2011-12-15 22:27:59 UTC
> (rev 66264)
> +++ trunk/edje/src/bin/edje_cc_handlers.c       2011-12-16 00:29:05 UTC
> (rev 66265)
> @@ -832,7 +832,7 @@
>  }
>
>  static Edje_Part_Description_Common *
> -_edje_part_description_alloc(Edje_Part_Description_Common *ced, unsigned
> char type, const char *collection, const char *part)
> +_edje_part_description_alloc(unsigned char type, const char *collection,
> const char *part)
>  {
>    Edje_Part_Description_Common *result = NULL;
>
> @@ -841,15 +841,14 @@
>       case EDJE_PART_TYPE_RECTANGLE:
>       case EDJE_PART_TYPE_SWALLOW:
>       case EDJE_PART_TYPE_GROUP:
> -        result = mem_realloc(ced, SZ(Edje_Part_Description_Common));
> +        result = mem_alloc(SZ(Edje_Part_Description_Common));
>         break;
>       case EDJE_PART_TYPE_TEXT:
>       case EDJE_PART_TYPE_TEXTBLOCK:
>        {
>           Edje_Part_Description_Text *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_Text));
> -           memset(&(ed->text), 0, SZ(Edje_Part_Description_Spec_Text));
> +          ed = mem_alloc(SZ(Edje_Part_Description_Text));
>
>           ed->text.color3.r = 0;
>           ed->text.color3.g = 0;
> @@ -867,8 +866,7 @@
>        {
>           Edje_Part_Description_Image *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_Image));
> -           memset(&(ed->image), 0, SZ(Edje_Part_Description_Spec_Image));
> +          ed = mem_alloc(SZ(Edje_Part_Description_Image));
>
>           ed->image.id = -1;
>
> @@ -881,8 +879,7 @@
>         {
>            Edje_Part_Description_Proxy *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_Proxy));
> -           memset(&(ed->proxy), 0, SZ(Edje_Part_Description_Spec_Proxy));
> +           ed = mem_alloc(SZ(Edje_Part_Description_Proxy));
>
>            ed->proxy.id = -1;
>
> @@ -895,8 +892,7 @@
>        {
>           Edje_Part_Description_Box *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_Box));
> -           memset(&(ed->box), 0, SZ(Edje_Part_Description_Spec_Box));
> +          ed = mem_alloc(SZ(Edje_Part_Description_Box));
>
>           ed->box.layout = NULL;
>           ed->box.alt_layout = NULL;
> @@ -912,8 +908,7 @@
>        {
>           Edje_Part_Description_Table *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_Table));
> -           memset(&(ed->table), 0, SZ(Edje_Part_Description_Spec_Table));
> +          ed = mem_alloc(SZ(Edje_Part_Description_Table));
>
>           ed->table.homogeneous = EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE;
>           ed->table.align.x = FROM_DOUBLE(0.5);
> @@ -928,8 +923,7 @@
>        {
>           Edje_Part_Description_External *ed;
>
> -           ed = mem_realloc(ced, SZ(Edje_Part_Description_External));
> -           ed->external_params = NULL;
> +          ed = mem_alloc(SZ(Edje_Part_Description_External));
>
>           ed->external_params = NULL;
>
> @@ -948,53 +942,6 @@
>  }
>
>  static void
> -_edje_part_description_lookup_del(Edje_Part_Collection *pc,
> Edje_Part_Description_Common *ced, unsigned char type)
> -{
> -   switch (type)
> -     {
> -      case EDJE_PART_TYPE_RECTANGLE:
> -      case EDJE_PART_TYPE_SWALLOW:
> -      case EDJE_PART_TYPE_GROUP:
> -         break;
> -      case EDJE_PART_TYPE_TEXT:
> -      case EDJE_PART_TYPE_TEXTBLOCK:
> -        {
> -           Edje_Part_Description_Text *ed =
> (Edje_Part_Description_Text*)ced;
> -
> -           data_queue_part_lookup(pc, NULL, &(ed->text.id_source));
> -           data_queue_part_lookup(pc, NULL, &(ed->text.id_text_source));
> -           break;
> -        }
> -      case EDJE_PART_TYPE_IMAGE:
> -        {
> -           int i;
> -           Edje_Part_Description_Image *ed =
> (Edje_Part_Description_Image*)ced;
> -           Edje_Part_Image_Id *iid;
> -
> -           data_queue_image_lookup(NULL, &(ed->image.id), NULL);
> -
> -           for (i = 0; i < ed->image.tweens_count; i++)
> -             {
> -                iid = ed->image.tweens[i];
> -                data_queue_image_lookup(NULL, &(iid->id), NULL);
> -             }
> -           break;
> -        }
> -      case EDJE_PART_TYPE_PROXY:
> -        {
> -           Edje_Part_Description_Proxy *ed =
> (Edje_Part_Description_Proxy*)ced;
> -
> -           data_queue_part_lookup(pc, NULL, &(ed->proxy.id));
> -           break;
> -        }
> -      case EDJE_PART_TYPE_BOX:
> -      case EDJE_PART_TYPE_TABLE:
> -      case EDJE_PART_TYPE_EXTERNAL:
> -         break;
> -     }
> -}
> -
> -static void
>  _edje_program_check(const char *name, Edje_Program *me, Edje_Program
> **pgrms, unsigned int count)
>  {
>    Edje_Part_Collection *pc;
> @@ -2998,22 +2945,9 @@
>  static void
>  st_collections_group_parts_part_type(void)
>  {
> -   Edje_Part_Collection *pc;
> -   Edje_Part *ep;
> -   int i;
> -
>    check_arg_count(1);
>
> -   pc = eina_list_data_get(eina_list_last(edje_collections));
> -   ep = current_part;
> -
> -   if (ep->default_desc)
> -     _edje_part_description_lookup_del(pc, ep->default_desc, ep->type);
> -
> -   for (i = 0; i < ep->other.desc_count; i++)
> -     _edje_part_description_lookup_del(pc, ep->other.desc[i], ep->type);
> -
> -   ep->type = parse_enum(0,
> +   current_part->type = parse_enum(0,
>                                    "NONE", EDJE_PART_TYPE_NONE,
>                                    "RECT", EDJE_PART_TYPE_RECTANGLE,
>                                    "TEXT", EDJE_PART_TYPE_TEXT,
> @@ -3026,11 +2960,6 @@
>                                    "EXTERNAL", EDJE_PART_TYPE_EXTERNAL,
>                                    "PROXY", EDJE_PART_TYPE_PROXY,
>                                    NULL);
> -   if (ep->default_desc)
> -     ep->default_desc = _edje_part_description_alloc(ep->default_desc,
> ep->type, pc->part, ep->name);
> -
> -   for (i = 0; i < ep->other.desc_count; i++)
> -     ep->other.desc[i] = _edje_part_description_alloc(ep->other.desc[i],
> ep->type, pc->part, ep->name);
>  }
>
>  /**
> @@ -4137,12 +4066,12 @@
>  {
>    Edje_Part_Collection *pc;
>    Edje_Part *ep;
> -   Edje_Part_Description_Common *ed = NULL;
> +   Edje_Part_Description_Common *ed;
>
>    pc = eina_list_data_get(eina_list_last(edje_collections));
>    ep = current_part;
>
> -   ed = _edje_part_description_alloc(ed, ep->type, pc->part, ep->name);
> +   ed = _edje_part_description_alloc(ep->type, pc->part, ep->name);
>
>    if (!ep->default_desc)
>      {
>
> Modified: trunk/edje/src/bin/edje_cc_mem.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_mem.c    2011-12-15 22:27:59 UTC (rev 66264)
> +++ trunk/edje/src/bin/edje_cc_mem.c    2011-12-16 00:29:05 UTC (rev 66265)
> @@ -26,22 +26,6 @@
>    return NULL;
>  }
>
> -void *
> -mem_realloc(void *p, size_t size)
> -{
> -   void *mem;
> -
> -   if (!p)
> -     mem = calloc(1, size);
> -   else
> -     mem = realloc(p, size);
> -   if (mem) return mem;
> -   ERR("%s: Error. %s:%i memory allocation of " FMT_SIZE_T " bytes
> failed. %s",
> -       progname, file_in, line, size, strerror(errno));
> -   exit(-1);
> -   return NULL;
> -}
> -
>  char *
>  mem_strdup(const char *s)
>  {
>
> Modified: trunk/edje/src/bin/edje_cc_out.c
> ===================================================================
> --- trunk/edje/src/bin/edje_cc_out.c    2011-12-15 22:27:59 UTC (rev 66264)
> +++ trunk/edje/src/bin/edje_cc_out.c    2011-12-16 00:29:05 UTC (rev 66265)
> @@ -1391,7 +1391,7 @@
>         if ((pl->pc == pc) && (pl->dest == dest))
>           {
>              free(pl->name);
> -             if (name && name[0])
> +             if (name[0])
>                pl->name = mem_strdup(name);
>              else
>                {
> @@ -1401,7 +1401,7 @@
>              return;
>           }
>      }
> -   if (!name || !name[0]) return;
> +   if (!name[0]) return;
>
>    pl = mem_alloc(SZ(Part_Lookup));
>    part_lookups = eina_list_append(part_lookups, pl);
> @@ -1536,25 +1536,8 @@
>  void
>  data_queue_image_lookup(char *name, int *dest, Eina_Bool *set)
>  {
> -  Eina_List *l, *ln;
>    Image_Lookup *il;
>
> -   EINA_LIST_FOREACH_SAFE(image_lookups, l, ln, il)
> -     {
> -        if (il->dest == dest)
> -          {
> -             free(il->name);
> -             if (name && name[0])
> -               il->name = mem_strdup(name);
> -             else
> -               {
> -                  image_lookups = eina_list_remove_list(image_lookups, l);
> -                  free(il);
> -               }
> -          }
> -     }
> -   if (!name || !name[0]) return;
> -
>    il = mem_alloc(SZ(Image_Lookup));
>    image_lookups = eina_list_append(image_lookups, il);
>    il->name = mem_strdup(name);
>
>
>
> ------------------------------------------------------------------------------
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to