Hum. This was done on purpose. If you want to use Eina_Magic like
Ecore_Magic, you should be able to force the use of Eina_Magic,
always. That's why the code is not removed from the library and why I
didn't include the config directly. So if their is a bug somewhere in
eina, we should inclue Eina.h or directly eina_config.h at the
beginning (This should always be the case for all eina file).

On Sat, Dec 6, 2008 at 7:17 AM, Enlightenment SVN
<[EMAIL PROTECTED]> wrote:
> Log:
>  Fix couple of issues with MAGIC handling.
>
>  eina_magic.h MUST include eina_config.h, otherwise it will not
>  consider EINA_MAGIC stuff. Worse than that, some files were including
>  that directly and were considering EINA_MAGIC attribute even if the
>  file that alloc'ed the memory were not!
>
>  Also add missing EINA_MAGIC_SET() to iterators and accessors.
>
>
> Author:       barbieri
> Date:         2008-12-05 22:17:11 -0800 (Fri, 05 Dec 2008)
> New Revision: 37960
>
> Modified:
>  trunk/eina/src/include/eina_magic.h trunk/eina/src/lib/eina_hash.c 
> trunk/eina/src/lib/eina_inlist.c trunk/eina/src/lib/eina_rbtree.c
>
> Modified: trunk/eina/src/include/eina_magic.h
> ===================================================================
> --- trunk/eina/src/include/eina_magic.h 2008-12-06 06:13:55 UTC (rev 37959)
> +++ trunk/eina/src/include/eina_magic.h 2008-12-06 06:17:11 UTC (rev 37960)
> @@ -19,6 +19,8 @@
>  #ifndef EINA_MAGIC_H_
>  #define EINA_MAGIC_H_
>
> +#include "eina_config.h"
> +
>  #ifdef EINA_MAGIC_DEBUG
>
>  #include "eina_types.h"
>
> Modified: trunk/eina/src/lib/eina_hash.c
> ===================================================================
> --- trunk/eina/src/lib/eina_hash.c      2008-12-06 06:13:55 UTC (rev 37959)
> +++ trunk/eina/src/lib/eina_hash.c      2008-12-06 06:17:11 UTC (rev 37960)
> @@ -286,6 +286,8 @@
>
>    for (hash_num = 0; hash_num < EINA_HASH_BUCKET_SIZE; hash_num++)
>      {
> +       if (!hash->buckets[hash_num])
> +         continue;
>        it = eina_rbtree_iterator_prefix(hash->buckets[hash_num]);
>        eina_iterator_foreach(it, EINA_EACH(_eina_hash_rbtree_each), &each);
>        eina_iterator_free(it);
> @@ -1009,6 +1011,8 @@
>    it->iterator.get_container = 
> FUNC_ITERATOR_GET_CONTAINER(_eina_hash_iterator_get_container);
>    it->iterator.free = FUNC_ITERATOR_FREE(_eina_hash_iterator_free);
>
> +   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
> +
>    return &it->iterator;
>  }
>
> @@ -1030,6 +1034,8 @@
>    it->iterator.get_container = 
> FUNC_ITERATOR_GET_CONTAINER(_eina_hash_iterator_get_container);
>    it->iterator.free = FUNC_ITERATOR_FREE(_eina_hash_iterator_free);
>
> +   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
> +
>    return &it->iterator;
>  }
>
> @@ -1051,6 +1057,8 @@
>    it->iterator.get_container = 
> FUNC_ITERATOR_GET_CONTAINER(_eina_hash_iterator_get_container);
>    it->iterator.free = FUNC_ITERATOR_FREE(_eina_hash_iterator_free);
>
> +   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
> +
>    return &it->iterator;
>  }
>
>
> Modified: trunk/eina/src/lib/eina_inlist.c
> ===================================================================
> --- trunk/eina/src/lib/eina_inlist.c    2008-12-06 06:13:55 UTC (rev 37959)
> +++ trunk/eina/src/lib/eina_inlist.c    2008-12-06 06:17:11 UTC (rev 37960)
> @@ -355,6 +355,8 @@
>    it->iterator.get_container = 
> FUNC_ITERATOR_GET_CONTAINER(eina_inlist_iterator_get_container);
>    it->iterator.free = FUNC_ITERATOR_FREE(eina_inlist_iterator_free);
>
> +   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
> +
>    return &it->iterator;
>  }
>
> @@ -380,5 +382,7 @@
>    it->accessor.get_container = 
> FUNC_ACCESSOR_GET_CONTAINER(eina_inlist_accessor_get_container);
>    it->accessor.free = FUNC_ACCESSOR_FREE(eina_inlist_accessor_free);
>
> +   EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
> +
>    return &it->accessor;
>  }
>
> Modified: trunk/eina/src/lib/eina_rbtree.c
> ===================================================================
> --- trunk/eina/src/lib/eina_rbtree.c    2008-12-06 06:13:55 UTC (rev 37959)
> +++ trunk/eina/src/lib/eina_rbtree.c    2008-12-06 06:17:11 UTC (rev 37960)
> @@ -179,6 +179,8 @@
>    it->iterator.get_container = 
> FUNC_ITERATOR_GET_CONTAINER(_eina_rbtree_iterator_get_content);
>    it->iterator.free = FUNC_ITERATOR_FREE(_eina_rbtree_iterator_free);
>
> +   EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
> +
>    return &it->iterator;
>
>  on_error:
>
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> enlightenment-svn mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>



-- 
Cedric BAIL

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to