ObjFW  Check-in [8433da5605]

Overview
Comment:Add a missing const
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8433da5605d8ed55990b95ebe78ad43f13e3a74213010ba2cd7797e240c38b29
User & Date: js on 2017-04-09 12:02:26
Other Links: manifest | tags
Context
2017-04-09
12:12
Use uint{16,32}_t for of_char{16,32}_t check-in: af56e971bd user: js tags: trunk
12:02
Add a missing const check-in: 8433da5605 user: js tags: trunk
2017-04-06
20:19
Prepare OFStringTests for different string classes check-in: 561522ae8c user: js tags: trunk
Changes

Modified src/OFMutableString.h from [f425459521] to [d140645479].

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

/*!
 * @brief Appends the specified characters to the OFMutableString.
 *
 * @param characters An array of characters to append
 * @param length The length of the array of characters
 */
- (void)appendCharacters: (of_unichar_t*)characters
		  length: (size_t)length;

/*!
 * @brief Appends a UTF-8 encoded C string to the OFMutableString.
 *
 * @param UTF8String A UTF-8 encoded C string to append
 */







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

/*!
 * @brief Appends the specified characters to the OFMutableString.
 *
 * @param characters An array of characters to append
 * @param length The length of the array of characters
 */
- (void)appendCharacters: (const of_unichar_t*)characters
		  length: (size_t)length;

/*!
 * @brief Appends a UTF-8 encoded C string to the OFMutableString.
 *
 * @param UTF8String A UTF-8 encoded C string to append
 */

Modified src/OFMutableString.m from [b4559a9fab] to [a925bde0fe].

333
334
335
336
337
338
339
340
341
342
343
344
345
346
347

- (void)appendString: (OFString*)string
{
	[self insertString: string
		   atIndex: [self length]];
}

- (void)appendCharacters: (of_unichar_t*)characters
		  length: (size_t)length
{
	void *pool = objc_autoreleasePoolPush();

	[self appendString: [OFString stringWithCharacters: characters
						    length: length]];








|







333
334
335
336
337
338
339
340
341
342
343
344
345
346
347

- (void)appendString: (OFString*)string
{
	[self insertString: string
		   atIndex: [self length]];
}

- (void)appendCharacters: (const of_unichar_t*)characters
		  length: (size_t)length
{
	void *pool = objc_autoreleasePoolPush();

	[self appendString: [OFString stringWithCharacters: characters
						    length: length]];

Modified src/OFMutableString_UTF8.m from [7a27106bbd] to [a6a227ab67].

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
	    [string isKindOfClass: [OFMutableString_UTF8 class]]) {
		if (((OFString_UTF8*)string)->_s->isUTF8)
			_s->isUTF8 = true;
	} else
		_s->isUTF8 = true;
}

- (void)appendCharacters: (of_unichar_t*)characters
		  length: (size_t)length
{
	char *tmp;

	tmp = [self allocMemoryWithSize: (length * 4) + 1];
	@try {
		size_t j = 0;







|







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
	    [string isKindOfClass: [OFMutableString_UTF8 class]]) {
		if (((OFString_UTF8*)string)->_s->isUTF8)
			_s->isUTF8 = true;
	} else
		_s->isUTF8 = true;
}

- (void)appendCharacters: (const of_unichar_t*)characters
		  length: (size_t)length
{
	char *tmp;

	tmp = [self allocMemoryWithSize: (length * 4) + 1];
	@try {
		size_t j = 0;