2010-05-14 17:53:35 +00:00
|
|
|
#define POOL_NAME slot
|
|
|
|
#define POOL_TYPE struct objc_slot
|
|
|
|
#include "pool.h"
|
|
|
|
|
2011-03-22 00:08:45 +00:00
|
|
|
/**
|
|
|
|
* Allocates a new slot and initialises it for this method.
|
|
|
|
*/
|
2010-06-03 15:17:12 +00:00
|
|
|
static inline struct objc_slot *new_slot_for_method_in_class(Method method,
|
2010-05-14 17:53:35 +00:00
|
|
|
Class class)
|
|
|
|
{
|
|
|
|
struct objc_slot *slot = slot_pool_alloc();
|
|
|
|
slot->owner = class;
|
2011-04-28 11:59:18 +00:00
|
|
|
slot->types = method->selector->types;
|
2011-04-22 12:13:28 +00:00
|
|
|
slot->selector = method->selector;
|
2010-06-03 15:17:12 +00:00
|
|
|
slot->method = method->imp;
|
2010-05-14 17:53:35 +00:00
|
|
|
slot->version = 1;
|
|
|
|
return slot;
|
|
|
|
}
|