On Tue, 9 Oct 2012 18:47:06 -0300 Lucas De Marchi
<lucas.demar...@profusion.mobi> said:

> On Tue, Oct 9, 2012 at 3:11 AM, Christopher Michael
> <cp.mich...@samsung.com> wrote:
> > On 09/10/12 07:01, Tom Hacohen wrote:
> >> On 09/10/12 07:55, David Seikel wrote:
> >>> On Tue, 09 Oct 2012 06:46:43 +0100 michael.blumenkra...@gmail.com wrote:
> >>> I'm gonna assume this is part of that borking, at least until I get up
> >>> off my fat arse to actually investigate -
> >>>
> >>>     CC     evas_object_image.lo
> >>> evas_object_image.c: In function ‘_image_border_scale_get’:
> >>> evas_object_image.c:756: error: first argument to ‘va_arg’ not of type
> >>>     ‘va_list’ make[4]: *** [evas_object_image.lo] Error 1
> >>
> >> Fixed in svn, thanks. Weird that it compiled here. I guess the va_list
> >> type here is void * or something, but no doubt about it, you are right.
> >>
> >> --
> >> Tom.
> >>
> >
> > And here is another one that needs fixing ...
> >
> > evas_object_box.c: In function 'evas_object_box_option_property_vset':
> > evas_object_box.c:2234:4: error: incompatible types when assigning to
> > type 'va_list' from type 'struct __va_list_tag *'
> > evas_object_box.c:2234:4: error: cast specifies array type
> > evas_object_box.c: In function '_box_option_property_vset':
> > evas_object_box.c:2243:4: warning: value computed is not used
> > [-Wunused-value]
> > evas_object_box.c: In function 'evas_object_box_option_property_vget':
> > evas_object_box.c:2265:4: error: incompatible types when assigning to
> > type 'va_list' from type 'struct __va_list_tag *'
> > evas_object_box.c:2265:4: error: cast specifies array type
> > evas_object_box.c: In function '_box_option_property_vget':
> > evas_object_box.c:2274:4: warning: value computed is not used
> > [-Wunused-value]
> > make[4]: *** [evas_object_box.lo] Error 1
> 
> classic. you can't take the address of a va_list, it will fail in very
> different manners on different platforms/architectures. This means you
> can't call va_arg() on different functions passing the arg around.
> Unless you use some hacks. There's a hack that works pretty well. See
> macro MAKE_PTR_FROM_VA_LIST() in edbus.
> 
> A bit of info on the commit that introduced that macro:
> http://git.profusion.mobi/cgit.cgi/lucas/edbus-history/commit/src/lib/edbus_private.h?id=16809d7cf38bf47b1dbef0e359695930a44c2752

i just fixed this exact problem on x86_64 BY using a pointer to a va_list.
correct (on comments in git commit) - val_list on x86_64 is indeed an array of
stuff. on ix86 its just a simple pointer (to the stack). it would seem this is
to handle some params being passed in registers vs stack, so this array of
stuff - its actually a struct of stuff, but anyway - it's not a basic type...
it probably stores the register values in it plus info as to which register
value its looking at and when you advance beyond the register args, you get
into the stack which i think it points to then too., BUt you can pass a POINTER
to va_list itself, though you can't pass a pointer to a specific arg. (on ix86
it becomes a pointer to a pointer.. and on x86_64 it becomes a pointer to this
struct).

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to