• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CFStreamClientContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >CFStreamClientContext (From: Phil Larson <email@hidden>)

  • Prev by Date: Re: NSApplication delegate not released on quit?
  • Next by Date: Re: CGShieldingWindowLevel question
  • Previous by thread: CFStreamClientContext
  • Next by thread: looking for 'ftime' from...
  • Index(es):
    • Date
    • Thread