Re: [evolution-patches] [PATCH]Bug # 58014: cannot add multiple participants for the same category in tasks



sizeof a pointer isn't the same as sizeof an array.
FWIW, sizeof is a compile-time operation, not run-time.

Jeff

On Fri, 2004-05-07 at 11:28 -0400, Rodney Dawes wrote:
That doesn't explain why it doesn't work. It only reiterates that it
doesn't. I was hoping for a more technical explination of why it doesn't
work on dynamically created arrays or such.

-- dobey

On Enj , 2004-05-06 at 12:32 -0400, Jeffrey Stedfast wrote:
> G_N_ELEMENTS() only works on static arrays, eg not dynamically created
> arrays.
> 
> but yea, he certainly doesn't need to run thru the loop twice.
> 
> Jeff
> 
> On Thu, 2004-05-06 at 12:28 -0400, Rodney Dawes wrote: 
> > There's no reason to run through the loop twice, so you don't need to
> > count the elements first, since you aren't appending to the array and
> > doing reallocing. You can just do "for (i = 0; cards[i] != NULL; i++)"
> > instead. Aside from that, why does G_N_ELEMENTS (cards) not work?
> > 
> > -- dobey

-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]