Re: error when calling function in another C file
Re: error when calling function in another C file
- Subject: Re: error when calling function in another C file
- From: Filipe Varela <email@hidden>
- Date: Wed, 2 Jan 2008 12:37:36 +0000
Your prototype is
Int Func(CFMutableArrayRef response);
And you're calling
MyCFunc
Did you quick write your code in the email or is it copy-paste? I
suspect not the latter because you do manage to compile the code, right?
Cheers
On 2008/01/02, at 12:10, Navneet Kumar wrote:
Hi, thnks for the reply.
Actually I'm doing-
-(id)init
{
[super init];
Response = [[NSMutableArray alloc] init];
MyCFunc(response);
return self;
}
Still the error...
-----Original Message-----
From: cocoa-dev-bounces+navneet=email@hidden
[mailto:cocoa-dev-bounces+navneet=email@hidden]
On Behalf
Of Navneet Kumar
Sent: Wednesday, January 02, 2008 3:35 PM
To: Cocoa-dev
Subject: error when calling function in another C file
Hi,
In my sample app, I'm calling a function from another C file as
follows:
MyCFile.h:-
Int Func(CFMutableArrayRef response);
SampleApp.h:-
#include "MyCFile.h"
@interface SampleApp: NSObject
{
NSMutableArray *response;
}
SampleApp.m:-
#import "SampleApp.h"
@implementation SampleApp
-(id)init
{
[super init];
MyCFunc(response);
return self;
}
Build succeeds without any warning or error.
Documents say that NSMutableArray * and CFArrayRef are toll-free
bridged.
And can be supplied as arguments to function interchangeably.
Running the program opens the assembly like code in debugger, with
objc_msgSend_rtp at the top of the stack and something related to
_CFArray
downwards.
What I may be doing wrong?
Thanks in advance.
Navneet
_______________________________________________
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
_______________________________________________
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