> 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 guarantees that the value is unique with respect to all other statically- or dynamically- allocated memory in the process. (The pedantic caveat being that if some other piece of code chooses to use a context pointer that's just a randomly-generated number, there's of course a chance of collision.) I'm unsure whether this is compliant C99, but it's common enough that I would expect Clang/LLVM to continue compiling it in the future. _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
