On Tue, 13 Feb 2007 09:37:38 +0200 Muli Ben-Yehuda wrote:
> On Mon, Feb 12, 2007 at 03:47:50PM -0800, Joe Perches wrote:
>
> > Now that most of the sizeof(array)/sizeof(array[0]) conversions have
> > been done (there are about 800 done and about another 130 left),
> > perhaps it could be useful
On Tue, 2007-02-13 at 21:54 +1100, Nick Piggin wrote:
> Bernd Petrovitsch wrote:
> > On Tue, 2007-02-13 at 18:42 +1100, Nick Piggin wrote:
> >
> >>Joe Perches wrote:
> >
> > [...]
> >
> >>>perhaps:
> >>>
> >>>#define array_for_each(element, array) \
> >>> for ((element) = (array); \
> >>>
Bernd Petrovitsch wrote:
On Tue, 2007-02-13 at 18:42 +1100, Nick Piggin wrote:
Joe Perches wrote:
[...]
perhaps:
#define array_for_each(element, array) \
for ((element) = (array); \
(element) < ((array) + ARRAY_SIZE((array))); \
(element)++)
If you're
On Tue, 2007-02-13 at 18:42 +1100, Nick Piggin wrote:
> Joe Perches wrote:
[...]
> > perhaps:
> >
> > #define array_for_each(element, array) \
> > for ((element) = (array); \
> > (element) < ((array) + ARRAY_SIZE((array))); \
> > (element)++)
>
> If you're going for
In article <[EMAIL PROTECTED]> (at Mon, 12 Feb 2007 15:47:50 -0800), Joe
Perches <[EMAIL PROTECTED]> says:
> Now that most of the sizeof(array)/sizeof(array[0])
> conversions have been done (there are about 800 done
> and about another 130 left), perhaps it could be
> useful to change the code
Joe Perches wrote:
On Tue, 2007-02-13 at 15:19 +1100, Nick Piggin wrote:
#define array_for_each(element, array) \
for (int __idx = 0; __idx < ARRAY_SIZE((array)); \
__idx++, (element) = &(array[__idx]))
If you really wanted to introduce your loop, then please call it
On Mon, Feb 12, 2007 at 03:47:50PM -0800, Joe Perches wrote:
> Now that most of the sizeof(array)/sizeof(array[0]) conversions have
> been done (there are about 800 done and about another 130 left),
> perhaps it could be useful to change the code to use a define
> similar to the list_for_each
>
On Tue, 2007-02-13 at 15:19 +1100, Nick Piggin wrote:
> >> #define array_for_each(element, array) \
> >>for (int __idx = 0; __idx < ARRAY_SIZE((array)); \
> >>__idx++, (element) = &(array[__idx]))
> If you really wanted to introduce your loop, then please call it
>
Joe Perches wrote:
On Tue, 2007-02-13 at 11:20 +1100, Ben Nizette wrote:
#define array_for_each(element, array) \
for (int __idx = 0; __idx < ARRAY_SIZE((array)); \
__idx++, (element) = &(array[__idx]))
This requires all interior loop code be changed.
Ben is right
On Tue, 2007-02-13 at 11:20 +1100, Ben Nizette wrote:
> #define array_for_each(element, array) \
> for (int __idx = 0; __idx < ARRAY_SIZE((array)); \
> __idx++, (element) = &(array[__idx]))
This requires all interior loop code be changed.
-
To unsubscribe from this list:
Joe Perches wrote:
Now that most of the sizeof(array)/sizeof(array[0])
conversions have been done (there are about 800 done
and about another 130 left), perhaps it could be
useful to change the code to use a define similar
to the list_for_each
#define list_for_each(pos, head) \
for (pos
Now that most of the sizeof(array)/sizeof(array[0])
conversions have been done (there are about 800 done
and about another 130 left), perhaps it could be
useful to change the code to use a define similar
to the list_for_each
#define list_for_each(pos, head) \
for (pos = (head)->next;
12 matches
Mail list logo