Differences From Artifact [c24561f595]:
- File src/OFSet.m — part of check-in [8939cbdb52] at 2023-01-06 09:04:02 on branch trunk — Update copyright (user: js, size: 8028) [annotate] [blame] [check-ins using]
To Artifact [a5c8b76a0d]:
- File
src/OFSet.m
— part of check-in
[6ce0093f8d]
at
2023-04-10 19:22:32
on branch trunk
— Remove OFSerialization
While the idea sounds nice that the tag name is the class, this means the
serialization includes whether something is mutable or immutable. This means
doing as much as making something immutable changes the serialization, which
can then cause issues after being deserialized. (user: js, size: 7145) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include <stdlib.h> #import "OFSet.h" #import "OFArray.h" #import "OFMapTableSet.h" #import "OFNull.h" #import "OFString.h" | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <stdlib.h> #import "OFSet.h" #import "OFArray.h" #import "OFMapTableSet.h" #import "OFNull.h" #import "OFString.h" static struct { Class isa; } placeholder; @interface OFSetPlaceholder: OFSet @end |
︙ | ︙ | |||
68 69 70 71 72 73 74 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } | < < < < < | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)retain { return self; } - (instancetype)autorelease { |
︙ | ︙ | |||
187 188 189 190 191 192 193 | va_end(arguments); return ret; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { | < < < < < | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | va_end(arguments); return ret; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { OF_INVALID_INIT_METHOD } - (size_t)count { OF_UNRECOGNIZED_SELECTOR } |
︙ | ︙ | |||
358 359 360 361 362 363 364 | for (id object in self) if ([set containsObject: object]) return true; return false; } | < < < < < < < < < < < < < < < < < < < < < < < < < | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | for (id object in self) if ([set containsObject: object]) return true; return false; } - (OFSet *)setByAddingObjectsFromSet: (OFSet *)set { OFMutableSet *new = [[self mutableCopy] autorelease]; [new unionSet: set]; [new makeImmutable]; return new; } |
︙ | ︙ |