• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: error when calling function in another C file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: error when calling function in another C file


  • Subject: RE: error when calling function in another C file
  • From: "Navneet Kumar" <email@hidden>
  • Date: Wed, 2 Jan 2008 17:40:23 +0530

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

  • Follow-Ups:
    • Re: error when calling function in another C file
      • From: Filipe Varela <email@hidden>
    • RE: error when calling function in another C file
      • From: RICKY SHARP <email@hidden>
References: 
 >error when calling function in another C file (From: "Navneet Kumar" <email@hidden>)

  • Prev by Date: Re:NSLog not coming through
  • Next by Date: RE: error when calling function in another C file
  • Previous by thread: Re: error when calling function in another C file
  • Next by thread: RE: error when calling function in another C file
  • Index(es):
    • Date
    • Thread