@@ -230,28 +230,94 @@ } #endif /// \cond internal @implementation OFBlock -+ (void)initialize ++ alloc +{ + @throw [OFNotImplementedException newWithClass: self + selector: _cmd]; +} + +- init +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void)addMemoryToPool: (void*)ptr +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void*)allocMemoryWithSize: (size_t)size +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void*)allocMemoryForNItems: (size_t)nitems + withSize: (size_t)size +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void*)resizeMemory: (void*)ptr + toSize: (size_t)size +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void*)resizeMemory: (void*)ptr + toNItems: (size_t)nitems + withSize: (size_t)size +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; +} + +- (void)freeMemory: (void*)ptr { + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; } -+ (Class)class +- retain { + if (isa == (Class)&_NSConcreteMallocBlock) + return Block_copy(self); + return self; } - copy { return Block_copy(self); } + +- (size_t)retainCount +{ + if (isa == (Class)&_NSConcreteMallocBlock) + return ((of_block_literal_t*)self)->reserved; + + return SIZE_MAX; +} - (void)release { Block_release(self); } + +- (void)dealloc +{ + @throw [OFNotImplementedException newWithClass: isa + selector: _cmd]; + [super dealloc]; /* Get rid of a stupid warning */ +} @end #if !defined(OF_GNU_RUNTIME) && !defined(OF_OBJFW_RUNTIME) @implementation OFStackBlock @end