ObjFW  Diff

Differences From Artifact [5fcf1bb841]:

To Artifact [e77a1233fc]:


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <sys/types.h>

#import "OFString.h"
#import "OFMutableString_UTF8.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#import "of_asprintf.h"
#import "unicode.h"







<







23
24
25
26
27
28
29

30
31
32
33
34
35
36
#include <sys/types.h>

#import "OFString.h"
#import "OFMutableString_UTF8.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidFormatException.h"

#import "OFOutOfRangeException.h"

#import "autorelease.h"
#import "macros.h"

#import "of_asprintf.h"
#import "unicode.h"
229
230
231
232
233
234
235
236

237
238

239
240
241
242
243
244
245

- (void)release
{
}

- (void)dealloc
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]

						    selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */

}
@end

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







|
>
|
|
>







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246

- (void)release
{
}

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

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

@implementation OFMutableString
+ (void)initialize
{
	if (self == [OFMutableString class])
296
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311

	objc_autoreleasePoolPop(pool);
}

- (void)setCharacter: (of_unichar_t)character
	     atIndex: (size_t)index
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];

}

- (void)appendUTF8String: (const char*)UTF8String
{
	void *pool = objc_autoreleasePoolPush();

	[self appendString: [OFString stringWithUTF8String: UTF8String]];







<
|
>







297
298
299
300
301
302
303

304
305
306
307
308
309
310
311
312

	objc_autoreleasePoolPop(pool);
}

- (void)setCharacter: (of_unichar_t)character
	     atIndex: (size_t)index
{

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

- (void)appendUTF8String: (const char*)UTF8String
{
	void *pool = objc_autoreleasePoolPush();

	[self appendString: [OFString stringWithUTF8String: UTF8String]];
430
431
432
433
434
435
436
437
438

439
440
441
442
443
444

445
446
447
448
449
450
451
			wordStartTableSize: OF_UNICODE_TITLECASE_TABLE_SIZE
		       wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE];
}

- (void)insertString: (OFString*)string
	     atIndex: (size_t)index
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];

}

- (void)deleteCharactersInRange: (of_range_t)range
{
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];

}

- (void)replaceCharactersInRange: (of_range_t)range
		      withString: (OFString*)replacement
{
	[self deleteCharactersInRange: range];
	[self insertString: replacement







<
|
>




<
|
>







431
432
433
434
435
436
437

438
439
440
441
442
443

444
445
446
447
448
449
450
451
452
			wordStartTableSize: OF_UNICODE_TITLECASE_TABLE_SIZE
		       wordMiddleTableSize: OF_UNICODE_LOWERCASE_TABLE_SIZE];
}

- (void)insertString: (OFString*)string
	     atIndex: (size_t)index
{

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

- (void)deleteCharactersInRange: (of_range_t)range
{

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

- (void)replaceCharactersInRange: (of_range_t)range
		      withString: (OFString*)replacement
{
	[self deleteCharactersInRange: range];
	[self insertString: replacement