Filter type undeclared?

109 Views Asked by At

I should cast an Interrupt Filter to pass to a function, but the thing is, my Xcode always tells me that the Filter type is undeclared..

Here is part of my code:

interruptSrc = IOFilterInterruptEventSource::filterInterruptEventSource((OSObject*)this,
                                   (IOInterruptEventAction)&VoodooSDHC::interruptHandler,
                                   (Filter)&VoodooSDHC::interruptFilter,
                                   (IOService*)provider);

I'm new to Mac and Xcode so I don't really know what should I do in this case.

How does it complain about it being not defined, when the function is actually taking a parameter of that type?

1

There are 1 best solutions below

0
On

You're taking the address of something and casting it to something that doesn't look like a pointer. Either that's a pointer typedef (spawn of the devil) or that's not a good cast.

Are you sure it's not supposed to be:

(Filter *)&VoodooSDHC::interruptFilter,

?