ObjFW  Diff

Differences From Artifact [80c8a0ca31]:

To Artifact [f8d1ab3b42]:


254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
	char *t;

	if (fmt == NULL)
		@throw [OFInvalidFormatException newWithClass: isa];

	if ((vasprintf(&t, [fmt cString], args)) == -1)
		/*
		 * This is only the most likely error to happen.
		 * Unfortunately, as errno isn't always thread-safe, there's
		 * no good way for us to find out what really happened.
		 */
		@throw [OFOutOfMemoryException newWithClass: isa];

	@try {
		[self appendCString: t];
	} @finally {
		free(t);







|
<
|







254
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269
	char *t;

	if (fmt == NULL)
		@throw [OFInvalidFormatException newWithClass: isa];

	if ((vasprintf(&t, [fmt cString], args)) == -1)
		/*
		 * This is only the most likely error to happen. Unfortunately,

		 * there is no good way to check what really happened.
		 */
		@throw [OFOutOfMemoryException newWithClass: isa];

	@try {
		[self appendCString: t];
	} @finally {
		free(t);