Re: Encapsulate C struct/toll-free bridging?
Re: Encapsulate C struct/toll-free bridging?
- Subject: Re: Encapsulate C struct/toll-free bridging?
- From: Alastair Houghton <email@hidden>
- Date: Tue, 9 Mar 2004 16:18:15 +0000
On 9 Mar 2004, at 16:06, Gwynne wrote:
>
This right here is the key paragraph. Objective-C objects can be
>
treated as C structures most easily this way:
>
>
@interface MyClass : NSObject
>
{
>
// instance vars
>
}
>
// methods
>
@end
>
>
struct MyClassC {
>
@defs(MyClass) // note: no semicolon
>
};
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.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.