Differences From Artifact [4b2ea9b8f4]:
- File src/OFList.m — part of check-in [0ea8e1ef09] at 2010-04-23 13:10:11 on branch trunk — Nicer OFList API. (user: js, size: 4397) [annotate] [blame] [check-ins using]
To Artifact [156d215610]:
- File
src/OFList.m
— part of check-in
[e2b06423e0]
at
2010-09-05 23:19:08
on branch trunk
— Replace OFObject* with id in many places.
We assume now that every object understands retain, release, etc. so
that we can weaken the type from OFObject* to id. This makes it
possible to use different root object classes. (user: js, size: 4362) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
49 50 51 52 53 54 55 | } - (of_list_object_t*)lastListObject; { return lastListObject; } | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | } - (of_list_object_t*)lastListObject; { return lastListObject; } - (of_list_object_t*)appendObject: (id)obj { of_list_object_t *o; o = [self allocMemoryWithSize: sizeof(of_list_object_t)]; o->object = [obj retain]; o->next = NULL; o->prev = lastListObject; |
︙ | ︙ | |||
72 73 74 75 76 77 78 | count++; [obj retain]; return o; } | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | count++; [obj retain]; return o; } - (of_list_object_t*)prependObject: (id)obj { of_list_object_t *o; o = [self allocMemoryWithSize: sizeof(of_list_object_t)]; o->object = [obj retain]; o->next = firstListObject; o->prev = NULL; |
︙ | ︙ | |||
95 96 97 98 99 100 101 | count++; [obj retain]; return o; } | | | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | count++; [obj retain]; return o; } - (of_list_object_t*)insertObject: (id)obj beforeListObject: (of_list_object_t*)listobj { of_list_object_t *o; o = [self allocMemoryWithSize: sizeof(of_list_object_t)]; o->object = [obj retain]; o->next = listobj; |
︙ | ︙ | |||
120 121 122 123 124 125 126 | count++; [obj retain]; return o; } | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | count++; [obj retain]; return o; } - (of_list_object_t*)insertObject: (id)obj afterListObject: (of_list_object_t*)listobj { of_list_object_t *o; o = [self allocMemoryWithSize: sizeof(of_list_object_t)]; o->object = [obj retain]; o->next = listobj->next; |
︙ | ︙ | |||
169 170 171 172 173 174 175 | } - (size_t)count { return count; } | | | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | } - (size_t)count { return count; } - (BOOL)isEqual: (id)obj { of_list_object_t *iter, *iter2; if (![obj isKindOfClass: [OFList class]]) return NO; if ([(OFList*)obj count] != count) |
︙ | ︙ |