ObjFW  Diff

Differences From Artifact [366d9b52dc]:

To Artifact [89524405ee]:


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFMutableDictionary_hashtable.h"

#import "OFNotImplementedException.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableDictionary_placeholder: OFDictionary
@end







|

|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <stdlib.h>

#import "OFMutableDictionary_hashtable.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableDictionary_placeholder: OFDictionary
@end
104
105
106
107
108
109
110
111

112
113

114
115
116
117
118
119
120

- (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])







|
>
|
|
>







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

- (void)release
{
}

- (void)dealloc
{
	[self doesNotRecognizeSelector: _cmd];
	abort();

	/* Get rid of a stupid warning */
	[super dealloc];
}
@end

@implementation OFMutableDictionary
+ (void)initialize
{
	if (self == [OFMutableDictionary class])
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

	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];
}








>
|
>
>
|
|
<
>








<
|
>











<
|
>







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
170
171
172
173

	return [super alloc];
}

- init
{
	if (object_getClass(self) == [OFMutableDictionary class]) {
		@try {
			[self doesNotRecognizeSelector: _cmd];
			abort();
		} @catch (id e) {
			[self release];
			@throw e;

		}
	}

	return [super init];
}

- (void)setObject: (id)object
	   forKey: (id)key
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

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

- (void)removeObjectForKey: (id)key
{

	[self doesNotRecognizeSelector: _cmd];
	abort();
}

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