> Where exactly does it say that?
> 
> >        dispatch_block_t p;
> >
> >     if(cond){
> >             p =^ { print("cond\n"); };
> >     }else{
> >             p =^ { print("cond\n"); };
> >     }
> >     p();
> >
> > since the first part is equivalent to
> >
> >     if(cond){
> >             struct Block _t = ...;
> >             p = &_t;
> >     }
> 
> I'm pretty sure Apple's compiler is smart enough to allow the  
> construct that
> you've just mentioned. In fact, I'd be willing to bet on it. Sadly  
> just like about
> anybody else on this thread I don't have an access to Snow Leopard Mac  
> OS X
> at the moment. So if there needs to be an experiment run -- that'll  
> have to
> wait till next week.

as i believe was originally explained,
i ripped that example *directly* from the apple grand central
documentation on page 37 in the "Data Types" section:

http://developer.apple.com/mac/library/documentation/Performance/Reference/GCD_libdispatch_Ref/GCD_libdispatch_Ref.pdf

maybe you don't believe the documentation?

- erik

Reply via email to