@@ -147,15 +147,15 @@ Method_t method = class_get_instance_method(self, selector); IMP oldimp; if (method == NULL) @throw [OFInvalidArgumentException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; if ((oldimp = method_get_imp(method)) == (IMP)0 || newimp == (IMP)0) @throw [OFInvalidArgumentException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; method->method_imp = newimp; /* Update the dtable if necessary */ if (sarray_get_safe(((Class)self)->dtable, @@ -167,11 +167,11 @@ #else Method method; if ((method = class_getInstanceMethod(self, selector)) == NULL) @throw [OFInvalidArgumentException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; return method_setImplementation(method, newimp); #endif } @@ -277,11 +277,11 @@ @throw [OFOutOfRangeException newWithClass: isa]; if ((memchunks = realloc(PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL) @throw [OFOutOfMemoryException newWithClass: isa - andSize: memchunks_size]; + size: memchunks_size]; PRE_IVAR->memchunks = memchunks; PRE_IVAR->memchunks[PRE_IVAR->memchunks_size] = ptr; PRE_IVAR->memchunks_size = memchunks_size; @@ -302,17 +302,17 @@ memchunks_size > SIZE_MAX / sizeof(void*)) @throw [OFOutOfRangeException newWithClass: isa]; if ((ptr = malloc(size)) == NULL) @throw [OFOutOfMemoryException newWithClass: isa - andSize: size]; + size: size]; if ((memchunks = realloc(PRE_IVAR->memchunks, memchunks_size * sizeof(void*))) == NULL) { free(ptr); @throw [OFOutOfMemoryException newWithClass: isa - andSize: memchunks_size]; + size: memchunks_size]; } PRE_IVAR->memchunks = memchunks; PRE_IVAR->memchunks[PRE_IVAR->memchunks_size] = ptr; PRE_IVAR->memchunks_size = memchunks_size; @@ -350,19 +350,19 @@ while (iter-- > PRE_IVAR->memchunks) { if (OF_UNLIKELY(*iter == ptr)) { if (OF_UNLIKELY((ptr = realloc(ptr, size)) == NULL)) @throw [OFOutOfMemoryException newWithClass: isa - andSize: size]; + size: size]; *iter = ptr; return ptr; } } @throw [OFMemoryNotPartOfObjectException newWithClass: isa - andPointer: ptr]; + pointer: ptr]; } - (void*)resizeMemory: (void*)ptr toNItems: (size_t)nitems withSize: (size_t)size @@ -424,11 +424,11 @@ return self; } } @throw [OFMemoryNotPartOfObjectException newWithClass: isa - andPointer: ptr]; + pointer: ptr]; } - retain { PRE_IVAR->retain_count++; @@ -472,45 +472,45 @@ * metaclass and thus instance methods can be sent to class objects as well. */ + addMemoryToPool: (void*)ptr { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + (void*)allocMemoryWithSize: (size_t)size { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + (void*)allocMemoryForNItems: (size_t)nitems withSize: (size_t)size { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + (void*)resizeMemory: (void*)ptr toSize: (size_t)size { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + (void*)resizeMemory: (void*)ptr toNItems: (size_t)nitems withSize: (size_t)size { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + freeMemory: (void*)ptr { @throw [OFNotImplementedException newWithClass: self - andSelector: _cmd]; + selector: _cmd]; } + retain { return self;