On Thu, May 07, 2009 at 10:53:06AM -0300, Gustavo Sverzut Barbieri wrote :
> On Thu, May 7, 2009 at 5:31 AM, Albin Tonnerre <albin.tonne...@gmail.com> 
> wrote:
> > On Fri, May 01, 2009 at 08:43:01AM -0300, Gustavo Sverzut Barbieri wrote :
> >> On Fri, May 1, 2009 at 8:34 AM, Albin Tonnerre <albin.tonne...@gmail.com> 
> >> wrote:
> >> > On Fri, May 01, 2009 at 01:18:38PM +0200, Vincent Torri wrote :


> >> >> On Fri, 1 May 2009, Gustavo Sverzut Barbieri wrote:

> >> >> > On Thu, Apr 30, 2009 at 9:13 PM, Carsten Haitzler 
> >> >> > <ras...@rasterman.com> wrote:
> >> >> > The only problem I see and I already talked to Albin about it is on
> >> >> > weird compilers without offsetof() macros.

> >> >> offsetof seems to exist in the lib c of Microsoft

> >> > And FWIW, ISO C (both 89 and 99) says it should be defined in 
> >> > <stddef.h>, so if
> >> > it doesn't exist you probably have more serious problems than this.

> >> excellent, so no problems!

> > So, commit or not commmit ? :)

> commit.

Patch attached.

Regard,
-- 
Albin Tonnerre
Index: eina/src/include/eina_inlist.h
===================================================================
--- eina/src/include/eina_inlist.h	(revision 40723)
+++ eina/src/include/eina_inlist.h	(working copy)
@@ -38,6 +38,7 @@
 
 #define EINA_INLIST Eina_Inlist __in_list
 #define EINA_INLIST_GET(Inlist) (&((Inlist)->__in_list))
+#define EINA_INLIST_CONTAINER_GET(ptr, type) ((type *) ((Eina_Inlist *) ptr - offsetof(type, __in_list)))
 
 EAPI Eina_Inlist * eina_inlist_append(Eina_Inlist *in_list, Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT;
 EAPI Eina_Inlist * eina_inlist_prepend(Eina_Inlist *in_list, Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT;

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to