Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git] / objc / objc_cache.h
blob9ba2d393a642e0a2f2bd8276d65109cfcac5f30a
1 #import <objc/objc-class.h>
3 // the cache entry size must be a power of 2
4 typedef struct {
5 intptr_t offsetToNextEntry;
6 struct objc_method *method;
7 } OBJCMethodCacheEntry;
9 #define OBJCMethodCacheNumberOfEntries 64
10 #define OBJCMethodCacheMask ((OBJCMethodCacheNumberOfEntries - 1) * sizeof(OBJCMethodCacheEntry))
12 typedef struct objc_cache {
13 OBJCMethodCacheEntry table[OBJCMethodCacheNumberOfEntries];
14 } OBJCMethodCache;