Re: static void declaration in apple example code

2012-10-14 Thread William Sumner
On Sep 22, 2012, at 5:46 PM, Boris Dobroslav wrote: > I'm perplexed by one line that appears in the file AVSPDocument.h from the > apple example code project AVSimplePlayer: > > staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; This is my preferred method of generating un

Re: static void declaration in apple example code

2012-10-12 Thread John McCall
On Oct 12, 2012, at 12:46 AM, Dave Keck wrote: >> staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; > > This declares a unique pointer, whose value is defined as the address in > memory where the pointer lives. > > This technique can be useful when you need a value that's r

Re: static void declaration in apple example code

2012-10-12 Thread Kyle Sluder
On Sat, Sep 22, 2012, at 04:46 PM, Boris Dobroslav wrote: > Hi, > > I'm perplexed by one line that appears in the file AVSPDocument.h from > the apple example code project AVSimplePlayer: > > staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; > > This definition appears o

Re: static void declaration in apple example code

2012-10-12 Thread Dave Keck
> staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; This declares a unique pointer, whose value is defined as the address in memory where the pointer lives. This technique can be useful when you need a value that's reasonably assured to be unique -- i.e., this technique gu

Re: static void declaration in apple example code

2012-10-12 Thread Greg Parker
On Sep 22, 2012, at 4:46 PM, Boris Dobroslav wrote: > I'm perplexed by one line that appears in the file AVSPDocument.h from the > apple example code project AVSimplePlayer: > > staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; > > This definition appears outside of Object

static void declaration in apple example code

2012-10-12 Thread Boris Dobroslav
Hi, I'm perplexed by one line that appears in the file AVSPDocument.h from the apple example code project AVSimplePlayer: staticvoid *AVSPPlayerItemStatusContext = &AVSPPlayerItemStatusContext; This definition appears outside of Objective-C @interface or @implementation, so it must be pure C