ObjFW  Check-in [5fdaa5b909]

Overview
Comment:of_asprintf: Use format even if object is nil.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5fdaa5b909b3a5aaa05696da2b08d6eb4d8b9c65e4e4b08dcecd836b28d68fc3
User & Date: js on 2011-02-19 13:14:58
Other Links: manifest | tags
Context
2011-02-19
15:06
OFXMLElement improvements. check-in: 2086095795 user: js tags: trunk
13:14
of_asprintf: Use format even if object is nil. check-in: 5fdaa5b909 user: js tags: trunk
2011-02-17
19:56
Add +[digestSize] and +[blockSize] to OFHash. check-in: 275744ecd3 user: js tags: trunk
Changes

Modified src/of_asprintf.m from [ca529b4e62] to [7a9c826b78].

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
		@try {
			id obj;

			if ((obj = va_arg(ctx->args, id)) != nil)
				tmp_len = asprintf(&tmp, ctx->subfmt,
				    [[obj description] cString]);
			else
				if (!append_str(ctx, "(nil)", 5))
					return false;
		} @catch (id e) {
			free(ctx->buf);
			@throw e;
		} @finally {
			[pool release];
		}








|
<







246
247
248
249
250
251
252
253

254
255
256
257
258
259
260
		@try {
			id obj;

			if ((obj = va_arg(ctx->args, id)) != nil)
				tmp_len = asprintf(&tmp, ctx->subfmt,
				    [[obj description] cString]);
			else
				tmp_len = asprintf(&tmp, ctx->subfmt, "(nil)");

		} @catch (id e) {
			free(ctx->buf);
			@throw e;
		} @finally {
			[pool release];
		}