ObjFW  Diff

Differences From Artifact [7b8005c3d9]:

To Artifact [8288a048e9]:


34
35
36
37
38
39
40
41

42
43
44
45
46

47
48
49
50
51
52
53


54
55
56
57
58
59
60
61


62
63
64
65
66
67
68
69



70
71
72
73
74
75
76
77

78
79
80
81
82
83


84
85
86
87
88
89

90
91
92
93
94
95


96
97
98
99
100
101
102


103
104
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
170

171
172
173
174
175
176


177
178
179
180
181
182
183
184
185

186
187
188
189
190
191


192
193
194
195
196
197
198
199

200
201
202
203
204
205

206
207
208
209
210

211
212
213
214
215
216
217
34
35
36
37
38
39
40

41
42
43
44
45

46
47
48
49
50
51


52
53
54
55
56
57
58
59


60
61
62
63
64
65
66



67
68
69
70
71
72
73
74
75
76

77
78
79
80
81


82
83
84
85
86
87
88

89
90
91
92
93


94
95
96
97
98
99
100


101
102
103
104
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

170
171
172
173
174


175
176
177
178
179
180
181
182
183
184

185
186
187
188
189


190
191
192
193
194
195
196
197
198

199
200
201
202
203
204

205
206
207
208
209

210
211
212
213
214
215
216
217







-
+




-
+





-
-
+
+






-
-
+
+





-
-
-
+
+
+







-
+




-
-
+
+





-
+




-
-
+
+





-
-
+
+






-
-
-
+
+
+







-
+




-
-
+
+





-
-
+
+






-
-
-
+
+
+







-
+












-
-
+
+






-
+




-
-
+
+








-
+




-
-
+
+







-
+





-
+




-
+







	Class isa;
} placeholder;

@interface OFMutableString_placeholder: OFMutableString
@end

@implementation OFMutableString_placeholder
- init
- (instancetype)init
{
	return (id)[[OFMutableString_UTF8 alloc] init];
}

- initWithUTF8String: (const char *)UTF8String
- (instancetype)initWithUTF8String: (const char *)UTF8String
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF8String: UTF8String];
}

- initWithUTF8String: (const char *)UTF8String
	      length: (size_t)UTF8StringLength
- (instancetype)initWithUTF8String: (const char *)UTF8String
			    length: (size_t)UTF8StringLength
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF8String: UTF8String
			length: UTF8StringLength];
}

- initWithCString: (const char *)cString
	 encoding: (of_string_encoding_t)encoding
- (instancetype)initWithCString: (const char *)cString
		       encoding: (of_string_encoding_t)encoding
{
	return (id)[[OFMutableString_UTF8 alloc] initWithCString: cString
							encoding: encoding];
}

- initWithCString: (const char *)cString
	 encoding: (of_string_encoding_t)encoding
	   length: (size_t)cStringLength
- (instancetype)initWithCString: (const char *)cString
		       encoding: (of_string_encoding_t)encoding
			 length: (size_t)cStringLength
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithCString: cString
		   encoding: encoding
		     length: cStringLength];
}

- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
	return (id)[[OFMutableString_UTF8 alloc] initWithString: string];
}

- initWithCharacters: (const of_unichar_t *)characters
	      length: (size_t)length
- (instancetype)initWithCharacters: (const of_unichar_t *)characters
			    length: (size_t)length
{
	return (id)[[OFMutableString_UTF8 alloc] initWithCharacters: characters
							     length: length];
}

- initWithUTF16String: (const char16_t *)string
- (instancetype)initWithUTF16String: (const char16_t *)string
{
	return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string];
}

- initWithUTF16String: (const char16_t *)string
	       length: (size_t)length
- (instancetype)initWithUTF16String: (const char16_t *)string
			     length: (size_t)length
{
	return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string
							      length: length];
}

- initWithUTF16String: (const char16_t *)string
	    byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
			  byteOrder: (of_byte_order_t)byteOrder
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF16String: string
		      byteOrder: byteOrder];
}

- initWithUTF16String: (const char16_t *)string
	       length: (size_t)length
	    byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
			     length: (size_t)length
			  byteOrder: (of_byte_order_t)byteOrder
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF16String: string
			 length: length
		      byteOrder: byteOrder];
}

- initWithUTF32String: (const char32_t *)string
- (instancetype)initWithUTF32String: (const char32_t *)string
{
	return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string];
}

- initWithUTF32String: (const char32_t *)string
	       length: (size_t)length
- (instancetype)initWithUTF32String: (const char32_t *)string
			     length: (size_t)length
{
	return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string
							      length: length];
}

- initWithUTF32String: (const char32_t *)string
	    byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
			  byteOrder: (of_byte_order_t)byteOrder
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF32String: string
		      byteOrder: byteOrder];
}

- initWithUTF32String: (const char32_t *)string
	       length: (size_t)length
	    byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
			     length: (size_t)length
			  byteOrder: (of_byte_order_t)byteOrder
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithUTF32String: string
			 length: length
		      byteOrder: byteOrder];
}

- initWithFormat: (OFConstantString *)format, ...
- (instancetype)initWithFormat: (OFConstantString *)format, ...
{
	id ret;
	va_list arguments;

	va_start(arguments, format);
	ret = [[OFMutableString_UTF8 alloc] initWithFormat: format
						 arguments: arguments];
	va_end(arguments);

	return ret;
}

- initWithFormat: (OFConstantString *)format
       arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
		     arguments: (va_list)arguments
{
	return (id)[[OFMutableString_UTF8 alloc] initWithFormat: format
						      arguments: arguments];
}

#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString *)path
- (instancetype)initWithContentsOfFile: (OFString *)path
{
	return (id)[[OFMutableString_UTF8 alloc] initWithContentsOfFile: path];
}

- initWithContentsOfFile: (OFString *)path
		encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfFile: (OFString *)path
			      encoding: (of_string_encoding_t)encoding
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithContentsOfFile: path
			  encoding: encoding];
}
#endif

#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
- initWithContentsOfURL: (OFURL *)URL
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
	return (id)[[OFMutableString_UTF8 alloc] initWithContentsOfURL: URL];
}

- initWithContentsOfURL: (OFURL *)URL
	       encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfURL: (OFURL *)URL
			     encoding: (of_string_encoding_t)encoding
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithContentsOfURL: URL
			 encoding: encoding];
}
#endif

- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
	return (id)[[OFMutableString_UTF8 alloc]
	    initWithSerialization: element];
}

- retain
- (instancetype)retain
{
	return self;
}

- autorelease
- (instancetype)autorelease
{
	return self;
}

- (void)release
{
}
225
226
227
228
229
230
231
232

233
234
235
236
237
238
239
225
226
227
228
229
230
231

232
233
234
235
236
237
238
239







-
+







@implementation OFMutableString
+ (void)initialize
{
	if (self == [OFMutableString class])
		placeholder.isa = [OFMutableString_placeholder class];
}

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

	return [super alloc];
}

588
589
590
591
592
593
594
595

596
597
598
599
600
601
602
603
588
589
590
591
592
593
594

595
596
597
598
599
600
601
602
603







-
+









- (void)deleteEnclosingWhitespaces
{
	[self deleteLeadingWhitespaces];
	[self deleteTrailingWhitespaces];
}

- copy
- (id)copy
{
	return [[OFString alloc] initWithString: self];
}

- (void)makeImmutable
{
}
@end