• 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: Obj-C language question: C function within @implementation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C language question: C function within @implementation


  • Subject: Re: Obj-C language question: C function within @implementation
  • From: daniel <email@hidden>
  • Date: Thu, 3 Jul 2003 09:56:30 -0700

The code compiles inside the @implementation block because of Apple's fairly recent (last couple years?) automatic "C <-> ObjC" bridging support.

It doesn't compile outside the @implementation block because there's no Obj-C runtime to associate with the message sends that are made within the function.

All in all, I'd say your poor, disparaged co-worker is probably doing something more or less correctly! :-)

Daniel

On Thursday, July 3, 2003, at 08:15 AM, Sean McBride wrote:

The error my coworker made (aside from step 3 itself :)) was to
accidentally put the C function within the @implementation block, and it
still compiles. I noticed this, and moved the C function out of the
@implementation block and it stopped compiling. I'm wondering if it
should never have compiled in the first place.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Obj-C language question: C function within @implementation
      • From: Oscar Morales Vivó <email@hidden>
    • Re: Obj-C language question: C function within @implementation
      • From: Henry McGilton <email@hidden>
References: 
 >Re: Obj-C language question: C function within @implementation (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Suggesting an initial filename with document-based app?
  • Next by Date: Re: EOF: Dead or Alive?
  • Previous by thread: Re: Obj-C language question: C function within @implementation
  • Next by thread: Re: Obj-C language question: C function within @implementation
  • Index(es):
    • Date
    • Thread