ObjFW  Diff

Differences From Artifact [1881ae5509]:

To Artifact [85afaae721]:


64
65
66
67
68
69
70

71
72
73
74
75
76
77
/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))

static struct {
	Class isa;
} alloc_failed_exception;


size_t of_pagesize;

#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif








>







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))

static struct {
	Class isa;
} alloc_failed_exception;
static Class autoreleasepool = Nil;

size_t of_pagesize;

#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif

123
124
125
126
127
128
129

130
131
132
133
134
135
136
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;
#endif
}

+ (void)initialize
{

}

+ alloc
{
	OFObject *instance;
	size_t isize = class_getInstanceSize(self);








>







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;
#endif
}

+ (void)initialize
{
	autoreleasepool = [OFAutoreleasePool class];
}

+ alloc
{
	OFObject *instance;
	size_t isize = class_getInstanceSize(self);

607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
	if (!c)
		[self dealloc];
#endif
}

- autorelease
{
	[OFAutoreleasePool addObjectToTopmostPool: self];

	return self;
}

- (void)dealloc
{
	void **iter = PRE_IVAR->memchunks + PRE_IVAR->memchunks_size;







|







609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
	if (!c)
		[self dealloc];
#endif
}

- autorelease
{
	[autoreleasepool addObjectToTopmostPool: self];

	return self;
}

- (void)dealloc
{
	void **iter = PRE_IVAR->memchunks + PRE_IVAR->memchunks_size;