ObjFW  Diff

Differences From Artifact [dbe234c97f]:

  • File src/OFArray.m — part of check-in [a29d403286] at 2009-05-23 16:50:44 on branch trunk — A few renames in OFArray, OFDataArray and OFDictionary.

    OFArray:
    * Rename - object: to - objectAtIndex:.

    OFDataArray:
    * Rename - item: to - itemAtIndex:.

    OFDictionary:
    * Rename - get: to - objectForKey:.
    * Rename - set:to: to - setObject:forKey:.
    * Rename - remove: to - removeObjectForKey:. (user: js, size: 3424) [annotate] [blame] [check-ins using]

To Artifact [c29a774dc8]:

  • File src/OFArray.m — part of check-in [526d04018d] at 2009-05-23 21:53:20 on branch trunk — A few renames.

    OFArray:
    * -[add:] to -[addObject:].
    * -[last] to -[lastObject].

    OFAutoreleasePool:
    * +[addToPool:] to +[addObjectToTopmostPool:].
    * -[addToPool:] to -[addObject:].

    OFDataArray:
    * -[add:] to -[addItem:].
    * -[last] to -[lastItem].

    OFObject:
    * -[addToMemoryPool:] to -[addItemToMemoryPool:]. (user: js, size: 3456) [annotate] [blame] [check-ins using]


65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
}

- initWithObject: (OFObject*)obj
{
	self = [self init];

	@try {
		[array add: &obj];
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	[obj retain];








|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
}

- initWithObject: (OFObject*)obj
{
	self = [self init];

	@try {
		[array addItem: &obj];
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	[obj retain];

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
      andArgList: (va_list)args
{
	id obj;

	self = [self init];

	@try {
		[array add: &first];
		while ((obj = va_arg(args, id)) != nil) {
			[array add: &obj];
			[obj retain];
		}
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	return self;
}

- initWithCArray: (OFObject**)objs
{
	id *obj;

	self = [self init];

	@try {
		for (obj = objs; *obj != nil; obj++) {
			[array add: obj];
			[*obj retain];
		}
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}








|

|


















|







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
      andArgList: (va_list)args
{
	id obj;

	self = [self init];

	@try {
		[array addItem: &first];
		while ((obj = va_arg(args, id)) != nil) {
			[array addItem: &obj];
			[obj retain];
		}
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

	return self;
}

- initWithCArray: (OFObject**)objs
{
	id *obj;

	self = [self init];

	@try {
		for (obj = objs; *obj != nil; obj++) {
			[array addItem: obj];
			[*obj retain];
		}
	} @catch (OFException *e) {
		[self dealloc];
		@throw e;
	}

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
}

- (id)objectAtIndex: (size_t)index
{
	return *((OFObject**)[array itemAtIndex: index]);
}

- (id)last
{
	return *((OFObject**)[array last]);
}

- (BOOL)isEqual: (id)obj
{
	OFObject **objs, **objs2;
	size_t i, len, len2;








|

|







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
}

- (id)objectAtIndex: (size_t)index
{
	return *((OFObject**)[array itemAtIndex: index]);
}

- (id)lastObject
{
	return *((OFObject**)[array lastItem]);
}

- (BOOL)isEqual: (id)obj
{
	OFObject **objs, **objs2;
	size_t i, len, len2;

196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
	for (i = 0; i < len; i++)
		if (![objs[i] isEqual: objs2[i]])
			return NO;

	return YES;
}

- add: (OFObject*)obj
{
	@throw [OFNotImplementedException newWithClass: isa
					   andSelector: _cmd];
}

- removeNObjects: (size_t)nobjects
{







|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
	for (i = 0; i < len; i++)
		if (![objs[i] isEqual: objs2[i]])
			return NO;

	return YES;
}

- addObject: (OFObject*)obj
{
	@throw [OFNotImplementedException newWithClass: isa
					   andSelector: _cmd];
}

- removeNObjects: (size_t)nobjects
{