ObjFW  Check-in [a3fef2953d]

Overview
Comment:Don't allow nil as argument for -[appendString:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a3fef2953d35853b3b50eefa3fd14f7854c07be32dfee25e0fec6ec866e20319
User & Date: js on 2011-02-09 16:35:19
Other Links: manifest | tags
Context
2011-02-09
18:20
Fix #ifdef in +[OFThread yield]. check-in: f33274d615 user: js tags: trunk
16:35
Don't allow nil as argument for -[appendString:]. check-in: a3fef2953d user: js tags: trunk
16:16
Add OFHTTPRequest class. check-in: 3beecbace3 user: js tags: trunk
Changes

Modified src/OFMutableString.m from [e762638600] to [d31ec13d9e].

211
212
213
214
215
216
217




218
219
220
221
222
223
224
	memcpy(string + length, str, len);
	length += len;
	string[length] = 0;
}

- (void)appendString: (OFString*)str
{




	[self appendCString: [str cString]];
}

- (void)appendFormat: (OFString*)fmt, ...
{
	va_list args;








>
>
>
>







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
	memcpy(string + length, str, len);
	length += len;
	string[length] = 0;
}

- (void)appendString: (OFString*)str
{
	if (str == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	[self appendCString: [str cString]];
}

- (void)appendFormat: (OFString*)fmt, ...
{
	va_list args;