Re: HTTP post
Re: HTTP post
- Subject: Re: HTTP post
- From: Finlay Dobbie <email@hidden>
- Date: Mon, 29 Oct 2001 23:11:28 +0000
On Monday, October 29, 2001, at 10:33 pm, Ricky Sharp wrote:
Is it the plans to one day have "equal" core foundation implementations
for both Carbon and Cocoa? (e.g. I think it's been shown that a
CFString and NSString can be exchanged. Not sure if this is the case
with other CFxxx APIs.
See the Foundation release notes at
http://developer.apple.com/techpubs/macosx/ReleaseNotes/Foundation.html
"Toll-free" Bridging with CF Types
Foundation now links with the new CoreFoundation framework, and several
classes in Foundation are now implemented in terms of the new APIs in
CoreFoundation. Some classes are also "toll-free bridged" with their
CoreFoundation counterparts. What this means is that the CoreFoundation
type is interchangeable in function or method calls with the bridged
Foundation object. For example, CFArray and NSArray are toll-free
bridged, which means than in API where you see an NSArray * parameter,
you can pass in a CFArrayRef, and in API where you see a CFArrayRef
parameter, you can pass in an NSArray instance. This applies to all
libraries, not just CoreFoundation and Foundation. It also applies to
developers' concrete subclasses of abstract types like NSArray.
However, not all Foundation classes have counterparts in CoreFoundation,
and even of those which seem to have counterparts, not all are (or will
ever be) toll-free bridged. For example, there is a CFRunLoop type and
an NSRunLoop class. These are not toll-free bridged, however, and are
not interchangeable. NSRunLoop does however use CFRunLoop in its
implementation.
Here is a list of types and classes which are toll-free bridged in this
release. More may be bridged in the future.
- CFArray & NSArray
- CFCharacterSet & NSCharacterSet
- CFData & NSData
- CFDate & NSDate
- CFDictionary & NSDictionary
- CFRunLoopTimer & NSTimer
- CFSet & NSSet
- CFString & NSString
- CFURL & NSURL
<from a later release note entry>
Toll-free Bridging
CFTimeZone and NSTimeZone are now toll-free bridged.
-- Finlay