ObjFW  Check-in [70a65567df]

Overview
Comment:An item size of 0 is invalid for an array.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 70a65567df01d0df6927d103b5bd9d20e36956713630f5adcbfc7b3149f19e07
User & Date: js on 2009-04-25 12:48:28
Other Links: manifest | tags
Context
2009-04-25
12:48
Update to latest rev of buildsys. check-in: 7b4aa35b8d user: js tags: trunk
12:48
An item size of 0 is invalid for an array. check-in: 70a65567df user: js tags: trunk
2009-04-24
13:57
Neither the key nor the value in a dictionary is allowed to be nil. check-in: fa52eae66a user: js tags: trunk
Changes

Modified src/OFArray.m from [02c5a4d259] to [a4f78a390c].

32
33
34
35
36
37
38


39






40
41
42
43
44
45
46
+ bigArrayWithItemSize: (size_t)is
{
	return [[[OFBigArray alloc] initWithItemSize: is] autorelease];
}

- initWithItemSize: (size_t)is
{


	self = [super init];







	data = NULL;
	itemsize = is;
	items = 0;

	return self;
}







>
>

>
>
>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
+ bigArrayWithItemSize: (size_t)is
{
	return [[[OFBigArray alloc] initWithItemSize: is] autorelease];
}

- initWithItemSize: (size_t)is
{
	Class c;

	self = [super init];

	if (is == 0) {
		c = isa;
		[self free];
		@throw [OFInvalidArgumentException newWithClass: c];
	}

	data = NULL;
	itemsize = is;
	items = 0;

	return self;
}