ObjFW  Check-in [eceebefeab]

Overview
Comment:Rename -[OFDataArray readDataArrayWithSize:].

It is now called -[readDataArrayWithCount:].

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: eceebefeabd6c556b9afdb4e7849788be8a88795f3de00569504513a7fd92edc
User & Date: js on 2013-06-17 08:44:30
Other Links: manifest | tags
Context
2013-06-17
08:54
Replace a few asserts with OF_ENSURE / OBJC_ERROR. check-in: dc17a614e8 user: js tags: trunk
08:44
Rename -[OFDataArray readDataArrayWithSize:]. check-in: eceebefeab user: js tags: trunk
2013-06-16
20:03
Split OFUnboundNamespaceException. check-in: 457e0e82af user: js tags: trunk
Changes

Modified src/OFProcess.m from [4f94efa779] to [499c5dab3d].

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

			if (containsSpaces)
				[argumentsString appendString: @"\""];

			[tmp replaceOccurrencesOfString: @"\\\""
					     withString: @"\\\\\""];
			[tmp replaceOccurrencesOfString: @"\""
					     withString: @"\\\""];;

			[argumentsString appendString: tmp];

			if (containsSpaces)
				[argumentsString appendString: @"\""];
		}








|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

			if (containsSpaces)
				[argumentsString appendString: @"\""];

			[tmp replaceOccurrencesOfString: @"\\\""
					     withString: @"\\\\\""];
			[tmp replaceOccurrencesOfString: @"\""
					     withString: @"\\\""];

			[argumentsString appendString: tmp];

			if (containsSpaces)
				[argumentsString appendString: @"\""];
		}

Modified src/OFSet_hashtable.m from [a6ac6bcbd5] to [953bd32ef3].

271
272
273
274
275
276
277













278
279
280
281
282
283
284
	    ![object isKindOfClass: [OFCountedSet_hashtable class]])
		return [super isEqual: object];

	set = object;

	return [set->_mapTable isEqual: _mapTable];
}














- (OFEnumerator*)objectEnumerator
{
	return [[[OFMapTableEnumeratorWrapper alloc]
	    initWithEnumerator: [_mapTable keyEnumerator]
			object: self] autorelease];
}







>
>
>
>
>
>
>
>
>
>
>
>
>







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
	    ![object isKindOfClass: [OFCountedSet_hashtable class]])
		return [super isEqual: object];

	set = object;

	return [set->_mapTable isEqual: _mapTable];
}

- (id)anyObject
{
	void *pool = objc_autoreleasePoolPush();
	id object;

	object = [[_mapTable keyEnumerator] nextValue];
	object = [object retain];

	objc_autoreleasePoolPop(pool);

	return [object autorelease];
}

- (OFEnumerator*)objectEnumerator
{
	return [[[OFMapTableEnumeratorWrapper alloc]
	    initWithEnumerator: [_mapTable keyEnumerator]
			object: self] autorelease];
}

Modified src/OFStream.h from [b114d5af52] to [27c14268e9].

499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
/*!
 * @brief Reads the specified number of items with an item size of 1 from the
 *	  stream and returns them in an OFDataArray.
 *
 * @warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * @param size The number of items to read
 * @return An OFDataArray with count items.
 */
- (OFDataArray*)readDataArrayWithSize: (size_t)size;

/*!
 * @brief Reads the specified number of items with the specified item size from
 *	  the stream and returns them in an OFDataArray.
 *
 * @warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!







|


|







499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
/*!
 * @brief Reads the specified number of items with an item size of 1 from the
 *	  stream and returns them in an OFDataArray.
 *
 * @warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!
 *
 * @param count The number of items to read
 * @return An OFDataArray with count items.
 */
- (OFDataArray*)readDataArrayWithCount: (size_t)count;

/*!
 * @brief Reads the specified number of items with the specified item size from
 *	  the stream and returns them in an OFDataArray.
 *
 * @warning Only call this when you know that enough data is available!
 *	    Otherwise you will get an exception!

Modified src/OFStream.m from [f3e5357ad2] to [2d4bdd05bf].

482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
	for (i = 0; i < count; i++)
		buffer[i] = OF_BSWAP_DOUBLE(buffer[i]);
#endif

	return size;
}

- (OFDataArray*)readDataArrayWithSize: (size_t)size
{
	return [self readDataArrayWithItemSize: 1
					 count: size];
}

- (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize
				    count: (size_t)count
{
	OFDataArray *dataArray;
	char *tmp;







|


|







482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
	for (i = 0; i < count; i++)
		buffer[i] = OF_BSWAP_DOUBLE(buffer[i]);
#endif

	return size;
}

- (OFDataArray*)readDataArrayWithCount: (size_t)count
{
	return [self readDataArrayWithItemSize: 1
					 count: count];
}

- (OFDataArray*)readDataArrayWithItemSize: (size_t)itemSize
				    count: (size_t)count
{
	OFDataArray *dataArray;
	char *tmp;