darling-cocotron/objc/objc_cache.h
2015-05-23 20:15:45 -04:00

15 lines
432 B
Objective-C

#import <objc/objc-class.h>
// the cache entry size must be a power of 2
typedef struct {
intptr_t offsetToNextEntry;
struct objc_method *method;
} OBJCMethodCacheEntry;
#define OBJCMethodCacheNumberOfEntries 64
#define OBJCMethodCacheMask ((OBJCMethodCacheNumberOfEntries - 1) * sizeof(OBJCMethodCacheEntry))
typedef struct objc_cache {
OBJCMethodCacheEntry table[OBJCMethodCacheNumberOfEntries];
} OBJCMethodCache;