[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix, GDL2, EOQualifier (getKey()): args
From: |
David Ayers |
Subject: |
Re: Fix, GDL2, EOQualifier (getKey()): args |
Date: |
Wed, 23 Apr 2008 19:20:25 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.9 (X11/20080110) |
Tim McIntosh schrieb:
>
> 1. After passing ap to another function by value, it is not valid to use
> ap in the caller without re-initializing it. Currently
> _qualifierWithArgs() is violating this rule by passing 'args' in two
> sequential calls to getKey().
>
> 2. It is valid to do this if ap is instead passed by pointer (as in the
> original code and proposed changes).
>
> 3. Taking the address of a va_list that has been passed by value is
> unportable (see GCC bug comment #14). The original code and the
> proposed changes do this. It looks like this could be fixed by changing
> _qualifierWithArgs() to take 'va_list *' instead of 'va_list' and
> eliminating (or similarly changing the signature of)
> -qualifierWithQualifierFormat:varargList:.
Thanks for the summary! Redefining the EOF API is not something that
lies in our power :-)
But I'm wondering whether we can play some platform specific typedef
games in that file like:
#ifdef x86_64||ppc64
# Well the above should actually be an autoconf variable that simply
# test during configure which approach works better.
typedef va_list va_list_ref;
#else
typedef va_list *va_list_ref;
#endif
... with some special preparation for the va_list * case in
-qualifierWithQualifierFormat:varargList:.
I currently don't have either platform available for testing but I
suspect we'll have some patches to play with in a bit...
Cheers,
David
- Fix, GDL2, EOQualifier (getKey()): args, Georg Fleischmann, 2008/04/22
- Re: Fix, GDL2, EOQualifier (getKey()): args, David Ayers, 2008/04/23
- Re: Fix, GDL2, EOQualifier (getKey()): args, Tim McIntosh, 2008/04/23
- Re: Fix, GDL2, EOQualifier (getKey()): args,
David Ayers <=
- Re: Fix, GDL2, EOQualifier (getKey()): args, Tim McIntosh, 2008/04/24
- Re: Fix, GDL2, EOQualifier (getKey()): args, David Ayers, 2008/04/24
- Re: Fix, GDL2, EOQualifier (getKey()): args, Georg Fleischmann, 2008/04/24