Differences From Artifact [9b0a605b93]:
- File
src/OFArray.m
— part of check-in
[d1a8c88dc6]
at
2023-08-09 08:14:56
on branch trunk
— Add OFSubdata
This replaces the hack of OFAdjacentData being able to keep a pointer to
the parent. (user: js, size: 17579) [annotate] [blame] [check-ins using]
To Artifact [2c1ad7f305]:
- File src/OFArray.m — part of check-in [6da6276ae7] at 2023-08-09 08:25:51 on branch trunk — More consistent naming for concrete classes (user: js, size: 17579) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
16 17 18 19 20 21 22 | #include "config.h" #include <stdarg.h> #include <stdlib.h> #import "OFArray.h" #import "OFArray+Private.h" | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #include <stdarg.h> #include <stdlib.h> #import "OFArray.h" #import "OFArray+Private.h" #import "OFConcreteArray.h" #import "OFData.h" #import "OFNull.h" #import "OFString.h" #import "OFSubarray.h" #import "OFEnumerationMutationException.h" #import "OFInvalidArgumentException.h" |
︙ | ︙ | |||
42 43 44 45 46 47 48 | @interface OFPlaceholderArray: OFArray @end @implementation OFPlaceholderArray - (instancetype)init { | | | | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | @interface OFPlaceholderArray: OFArray @end @implementation OFPlaceholderArray - (instancetype)init { return (id)[[OFConcreteArray alloc] init]; } - (instancetype)initWithObject: (id)object { return (id)[[OFConcreteArray alloc] initWithObject: object]; } - (instancetype)initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); ret = [[OFConcreteArray alloc] initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFConcreteArray alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)initWithArray: (OFArray *)array { return (id)[[OFConcreteArray alloc] initWithArray: array]; } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFConcreteArray alloc] initWithObjects: objects count: count]; } - (instancetype)retain { return self; } |
︙ | ︙ |