@@ -16,59 +16,59 @@ #include "config.h" #include #import "OFCountedSet.h" -#import "OFCountedMapTableSet.h" +#import "OFConcreteCountedSet.h" #import "OFNumber.h" #import "OFString.h" static struct { Class isa; } placeholder; -@interface OFCountedSetPlaceholder: OFCountedSet +@interface OFPlaceholderCountedSet: OFCountedSet @end -@implementation OFCountedSetPlaceholder +@implementation OFPlaceholderCountedSet - (instancetype)init { - return (id)[[OFCountedMapTableSet alloc] init]; + return (id)[[OFConcreteCountedSet alloc] init]; } - (instancetype)initWithSet: (OFSet *)set { - return (id)[[OFCountedMapTableSet alloc] initWithSet: set]; + return (id)[[OFConcreteCountedSet alloc] initWithSet: set]; } - (instancetype)initWithArray: (OFArray *)array { - return (id)[[OFCountedMapTableSet alloc] initWithArray: array]; + return (id)[[OFConcreteCountedSet alloc] initWithArray: array]; } - (instancetype)initWithObjects: (id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); - ret = [[OFCountedMapTableSet alloc] initWithObject: firstObject + ret = [[OFConcreteCountedSet alloc] initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { - return (id)[[OFCountedMapTableSet alloc] initWithObjects: objects + return (id)[[OFConcreteCountedSet alloc] initWithObjects: objects count: count]; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { - return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject + return (id)[[OFConcreteCountedSet alloc] initWithObject: firstObject arguments: arguments]; } OF_SINGLETON_METHODS @end @@ -76,11 +76,11 @@ @implementation OFCountedSet + (void)initialize { if (self == [OFCountedSet class]) object_setClass((id)&placeholder, - [OFCountedSetPlaceholder class]); + [OFPlaceholderCountedSet class]); } + (instancetype)alloc { if (self == [OFCountedSet class])