Re: Mixing Obj-C and C "methods"
Re: Mixing Obj-C and C "methods"
- Subject: Re: Mixing Obj-C and C "methods"
- From: lowell <email@hidden>
- Date: Tue, 30 Jul 2013 05:53:30 -0700
The first two parameters to the function have to be an id and a SEL ...
typedef id (*IMP)(id, SEL, ...);
... (this is where we get self and _cmd, by the way) followed by the rest of the method params, if any.
lowell
On Jul 30, 2013, at 12:59 AM, Vincent Habchi <email@hidden> wrote:
> Hi everybody,
>
> I have a very simple question: if I embed a C-function (more precisely, a callback from an external C-library) in an Obj-C object, can I expect this function to behave like a regular method? I.e. can it freely access ‘self’ and other attributes?
>
> Thanks a lot!
> Vincent
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden