ObjFW  Diff

Differences From Artifact [712dcb6dbd]:

To Artifact [9e9b9829fb]:


26
27
28
29
30
31
32
33
34
35
36




37



38
39
40
41
42
43
44
26
27
28
29
30
31
32




33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







-
-
-
-
+
+
+
+

+
+
+







#import "macros.h"

#import "asprintf.h"

@implementation OFStream
- init
{
	self = [super init];

	if (isa == [OFStream class])
		@throw [OFNotImplementedException newWithClass: isa
	if (isa == [OFStream class]) {
		Class c = isa;
		[self release];
		@throw [OFNotImplementedException newWithClass: c
						      selector: _cmd];
	}

	self = [super init];

	cache = NULL;
	wBuffer = NULL;

	return self;
}

312
313
314
315
316
317
318
319

320
321
322
323
324
325
326
315
316
317
318
319
320
321

322
323
324
325
326
327
328
329







-
+







						ret_len--;

					@try {
						ret = [OFString
						    stringWithCString: ret_c
							     encoding: encoding
							       length: ret_len];
					} @catch (OFException *e) {
					} @catch (id e) {
						/*
						 * Append data to cache to
						 * prevent loss of data due to
						 * wrong encoding.
						 */
						cache = [self
						    resizeMemory: cache