ObjFW  Diff

Differences From Artifact [1c8a76eb56]:

To Artifact [a3be020022]:


107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

		@try {
			char *buffer = [self allocMemoryWithSize: of_pagesize];

			while (![file isAtEndOfStream]) {
				size_t length;

				length = [file readNBytes: of_pagesize
					       intoBuffer: buffer];
				[self addItemsFromCArray: buffer
						   count: length];
			}

			[self freeMemory: buffer];
		} @finally {
			[file release];







|
|







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

		@try {
			char *buffer = [self allocMemoryWithSize: of_pagesize];

			while (![file isAtEndOfStream]) {
				size_t length;

				length = [file readIntoBuffer: buffer
						       length: of_pagesize];
				[self addItemsFromCArray: buffer
						   count: length];
			}

			[self freeMemory: buffer];
		} @finally {
			[file release];
433
434
435
436
437
438
439
440
441

442
443
444
445
446
447
448

- (void)writeToFile: (OFString*)path
{
	OFFile *file = [[OFFile alloc] initWithPath: path
					       mode: @"wb"];

	@try {
		[file writeNBytes: count * itemSize
		       fromBuffer: data];

	} @finally {
		[file release];
	}
}

- (OFXMLElement*)XMLElementBySerializing
{







<
|
>







433
434
435
436
437
438
439

440
441
442
443
444
445
446
447
448

- (void)writeToFile: (OFString*)path
{
	OFFile *file = [[OFFile alloc] initWithPath: path
					       mode: @"wb"];

	@try {

		[file writeBuffer: data
			   length: count * itemSize];
	} @finally {
		[file release];
	}
}

- (OFXMLElement*)XMLElementBySerializing
{