• 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
CFStreamClientContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFStreamClientContext


  • Subject: CFStreamClientContext
  • From: Phil Larson <email@hidden>
  • Date: Sun, 8 Jun 2003 14:33:21 -0700

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?

Phil
_______________________________________________
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.

  • Follow-Ups:
    • Re: CFStreamClientContext
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: New Mac Developer looking for advice
  • Next by Date: Re: C question for you old guys ;-)
  • Previous by thread: Re: New Mac Developer looking for advice
  • Next by thread: Re: CFStreamClientContext
  • Index(es):
    • Date
    • Thread