ObjFW  Diff

Differences From Artifact [31524fd43b]:

To Artifact [d33bc3adcc]:

  • File src/of_asprintf.m — part of check-in [e1e7ffa903] at 2011-09-22 23:25:42 on branch trunk — Exceptions are now autoreleased.

    This is safe as an "exception loop" can't happen, since if allocating
    an exception fails, it throws an OFAllocFailedException which is
    preallocated and can always be thrown.

    So, the worst case would be that an autorelease of an exception fails,
    triggering an OFOutOfMemoryException for which there is no memory,
    resulting in an OFAllocFailedException to be thrown. (user: js, size: 11946) [annotate] [blame] [check-ins using]


275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
		OFAutoreleasePool *pool;

		ctx->subformat[ctx->subformatLen - 1] = 's';

		@try {
			pool = [[OFAutoreleasePool alloc] init];
		} @catch (id e) {
			[e release];
			return false;
		}

		@try {
			id object;

			if ((object = va_arg(ctx->arguments, id)) != nil)







<







275
276
277
278
279
280
281

282
283
284
285
286
287
288
		OFAutoreleasePool *pool;

		ctx->subformat[ctx->subformatLen - 1] = 's';

		@try {
			pool = [[OFAutoreleasePool alloc] init];
		} @catch (id e) {

			return false;
		}

		@try {
			id object;

			if ((object = va_arg(ctx->arguments, id)) != nil)