• 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
error when calling function in another C file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error when calling function in another C file


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

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

  • Follow-Ups:
    • RE: error when calling function in another C file
      • From: "Navneet Kumar" <email@hidden>
    • Re: error when calling function in another C file
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: How to disallow user from selecting locked folders
  • Next by Date: Re: How to disallow user from selecting locked folders
  • Previous by thread: Re: How to disallow user from selecting locked folders
  • Next by thread: Re: error when calling function in another C file
  • Index(es):
    • Date
    • Thread