[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options.
From: Jakub Narebski <jnareb () gmail ! com>
Date: 2010-07-29 9:16:42
Message-ID: 201007291116.44859.jnareb () gmail ! com
[Download RAW message or body]
On Wed, 28 Jul 2010, Pierre Habouzit wrote:
> you cannot take the address of a bit portably in C, so you can't let
> parseopt set/clear bits through bitfields (as in unsigned field : 1 in a
> struct in C I mean).
>
> So to use parseopt OPTION_BIT feature, you have to convert them to C
> flags as in "unsigned flags" and explicit masks defines/enums.
>
> IOW:
>
> struct foo {
> unsigned bar : 1,
> ...
> baz : 1;
> };
>
> Must be converted into:
>
> struct foo {
> #define FOO_FLAG_BAR (1U << 1)
> ...
> #define FOO_FLAG_BAZ (1U << 18)
> unsigned flags;
> }
>
> so that you can use parseopt. that's what I meant.
>
>
> This was done for the rev-list parsing stuff e.g.
e.g. what?
--
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic