]> git.saurik.com Git - apple/dyld.git/blob - testing/kernel-cache-tests/kext-vtable-patching/foo.cpp
dyld-832.7.1.tar.gz
[apple/dyld.git] / testing / kernel-cache-tests / kext-vtable-patching / foo.cpp
1
2 #include "foo.h"
3
4 OSDefineMetaClassAndStructors( Foo, OSObject )
5
6 // Index 0 has been replaced with a method
7 OSMetaClassDefineReservedUsed(Foo, 0)
8 OSMetaClassDefineReservedUnused( Foo, 1 )
9 OSMetaClassDefineReservedUnused( Foo, 2 )
10 OSMetaClassDefineReservedUnused( Foo, 3 )
11
12 int Foo::foo() {
13 return 0;
14 }
15
16 int Foo::fooUsed0() {
17 return 0;
18 }
19
20 int foo() {
21 Foo* foo = new Foo();
22 return foo->foo() + foo->fooUsed0();
23 }