Re: Encapsulate C struct/toll-free bridging?
Re: Encapsulate C struct/toll-free bridging?
- Subject: Re: Encapsulate C struct/toll-free bridging?
- From: Gwynne <email@hidden>
- Date: Tue, 9 Mar 2004 11:54:58 -0500
- Resent-date: Tue, 9 Mar 2004 11:55:19 -0500
- Resent-from: Gwynne <email@hidden>
- Resent-message-id: <email@hidden t>
- Resent-to: email@hidden
On Mar 9, 2004, at 11:18 AM, Alastair Houghton wrote:
Unfortunately, it has the (IMO major) disadvantage that you can't use
@defs() in a structure declaration intended for use in a pure C or pure
C++ file. Or rather, you have to compile all files that use such
things using Objective-C(++), because @defs() is ObjC syntax.
I was thinking of toll-free bridging the way CoreFoundation does it,
where the Objective-C API and C API are both wrappers around an opaque
type. The private header of the implementation would define the
structure of @defs(), and the public header defines an opaque void* Ref
type which is passed to the C-style functions.
-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web:
http://musicimage.plasticchicken.com/
_______________________________________________
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.