• 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: DefaultOutputDevice timestamps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DefaultOutputDevice timestamps


  • Subject: Re: DefaultOutputDevice timestamps
  • From: Kurt Revis <email@hidden>
  • Date: Wed, 24 Oct 2001 14:21:36 -0700

This doesn't have anything strictly to do with the original problem, but I thought I'd try to clear up some slight misconceptions.

On Wednesday, October 24, 2001, at 12:14 PM, Jeff Moore wrote:
As I understand it, method dispatching in ObjC is done through a central
dispatching routine that does a look up by name for the method. I think it
then marshals the arguments through the stack (maybe in registers, I don't
recall) to call your method.

The Objective-C parameter-passing mechanism is exactly the same as in C. There's nothing weird or magic about it.

Sending an Obj-C message like [object blorf] translates directly to a C function call, objc_msgSend(object, @selector(blorf)). (The @selector just looks up a SEL structure at compile time. There is one SEL for each Objective-C method signature.)

Also, Obj-C methods are really just regular C functions, with two extra hidden arguments: a pointer to the object (self) and a SEL indicating which method is being invoked. If you like, you can bypass the Obj-C runtime completely and directly call these functions, although usually you'd only do that as an optimization.

This is all pretty reliable, and it's rare to have problems with it.

I'm not sure about this one. Since ObjC object references are pointers, I
would think that you should be able to pass that in directly using casting
as appropriate.

That's what he did, and it works fine.

One thing you can try is to make sure that your IOProc's declaration and
definition are outside of any ObjC @implementation or @interface statements.
This may make a difference in how the compiler treats the code (I don't know
for certain).

I don't believe that this makes any difference. Plain C functions may be declared and defined anywhere in an Obj-C implementation file.

Hope this helps.

--
Kurt Revis
email@hidden


References: 
 >Re: DefaultOutputDevice timestamps (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: DefaultOutputDevice timestamps
  • Next by Date: Multiple Devices or Multiple Streams
  • Previous by thread: Re: DefaultOutputDevice timestamps
  • Next by thread: Re: DefaultOutputDevice timestamps
  • Index(es):
    • Date
    • Thread