ObjFW  Diff

Differences From Artifact [34eb84dfb7]:

To Artifact [ca10e7bcfe]:


125
126
127
128
129
130
131

132
133
134
135
136
137
138
139
}
@end

@implementation OFDictionary
+ (void)initialize
{
	if (self == [OFDictionary class])

		placeholder.isa = [OFDictionaryPlaceholder class];
}

+ (instancetype)alloc
{
	if (self == [OFDictionary class])
		return (id)&placeholder;








>
|







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
}
@end

@implementation OFDictionary
+ (void)initialize
{
	if (self == [OFDictionary class])
		object_setClass((id)&placeholder,
		    [OFDictionaryPlaceholder class]);
}

+ (instancetype)alloc
{
	if (self == [OFDictionary class])
		return (id)&placeholder;

183
184
185
186
187
188
189
190

191
192
193
194
195
196
197
	va_end(arguments);

	return ret;
}

- (instancetype)init
{
	if ([self isMemberOfClass: [OFDictionary class]]) {

		@try {
			[self doesNotRecognizeSelector: _cmd];
		} @catch (id e) {
			[self release];
			@throw e;
		}








|
>







184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
	va_end(arguments);

	return ret;
}

- (instancetype)init
{
	if ([self isMemberOfClass: [OFDictionary class]] ||
	    [self isMemberOfClass: [OFMutableDictionary class]]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
		} @catch (id e) {
			[self release];
			@throw e;
		}