ObjFW  Diff

Differences From Artifact [3637b5fc69]:

To Artifact [d28ad27aa9]:


105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

- (void)release
{
}

- (void)dealloc
{
	@throw [OFNotImplementedException exceptionWithClass: isa
						    selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */
}
@end

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

		placeholder.isa = [OFMutableDictionary_placeholder class];
}

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

	return [super alloc];
}

- init
{
	if (isa == [OFMutableDictionary class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException exceptionWithClass: c
							    selector: _cmd];
	}

	return [super init];
}

- (void)setObject: (id)object
	   forKey: (id)key
{
	@throw [OFNotImplementedException exceptionWithClass: isa
						    selector: _cmd];
}

-   (void)setObject: (id)object
  forKeyedSubscript: (id)key
{
	[self setObject: object
		 forKey: key];
}

- (void)removeObjectForKey: (id)key
{
	@throw [OFNotImplementedException exceptionWithClass: isa
						    selector: _cmd];
}

- copy
{
	return [[OFDictionary alloc] initWithDictionary: self];
}







|









>
|












|
|











|












|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

- (void)release
{
}

- (void)dealloc
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */
}
@end

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

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

	return [super alloc];
}

- init
{
	if (object_getClass(self) == [OFMutableDictionary class]) {
		Class c = [self class];
		[self release];
		@throw [OFNotImplementedException exceptionWithClass: c
							    selector: _cmd];
	}

	return [super init];
}

- (void)setObject: (id)object
	   forKey: (id)key
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

-   (void)setObject: (id)object
  forKeyedSubscript: (id)key
{
	[self setObject: object
		 forKey: key];
}

- (void)removeObjectForKey: (id)key
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
}

- copy
{
	return [[OFDictionary alloc] initWithDictionary: self];
}