ObjFW  Diff

Differences From Artifact [535e1320bc]:

To Artifact [1f6f789ff3]:


56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
72

73
74
75
76
77
78
79
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79







-
+








-
+







{
	return range.length;
}

- (id)objectAtIndex: (size_t)index
{
	if (index >= range.length)
		@throw [OFOutOfRangeException exceptionWithClass: isa];
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	return [array objectAtIndex: index + range.start];
}

- (void)getObjects: (id*)buffer
	   inRange: (of_range_t)range_
{
	if (range_.start + range_.length > range.length)
		@throw [OFOutOfRangeException exceptionWithClass: isa];
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	range_.start += range.start;

	return [array getObjects: buffer
			 inRange: range_];
}

106
107
108
109
110
111
112
113

114
115
116
117
118
119
106
107
108
109
110
111
112

113
114
115
116
117
118
119







-
+







	return index;
}

- (OFArray*)objectsInRange: (of_range_t)range_
{
	if (range_.start + range_.length > range.length)
		@throw [OFOutOfRangeException exceptionWithClass: isa];
		@throw [OFOutOfRangeException exceptionWithClass: [self class]];

	range_.start += range.start;

	return [array objectsInRange: range_];
}
@end