Re: DefaultOutputDevice timestamps
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