Re: CFStreamClientContext
Re: CFStreamClientContext
- Subject: Re: CFStreamClientContext
- From: Fritz Anderson <email@hidden>
- Date: Fri, 13 Jun 2003 17:22:18 -0500
On Sunday, June 8, 2003, at 04:33 PM, Phil Larson wrote:
I watched the networking videos from last year's WWDC about run loops
and cfnetwork and networking and I have a question.
In the example of CFStreamClientContext, they just pass CFRetain,
CFRelease, and CFCopyDescription in for the memory management
callbacks. When I do this in my own code the compiler gives a warning
that they aren't the right type. Here's how I'm making my
CFStreamClientContext:
CFStreamClientContext clientContext = {
0,
self,
CFRetain,
CFRelease,
CFCopyDescription
};
And I get this warning:
warning: initialization from incompatible pointer type
I've tried putting casts to CFAllocatorRetainCallBack etc., but that
didn't stop the warnings. I've searched the web and I only see people
passing in NULL to the callbacks. That removes the warnings,
obviously, but removes the callbacks. What's going on here?
Maybe you didn't get the casts right... CFRetain, CFRelease, and
CFCopyDescription have the right signatures for callbacks that manage
CFType data. Try again with the casts, or just ignore the warnings.
-- F
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.