373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
*/
return class_replaceMethod(((OFObject*)self)->isa, selector, newImp,
method_getTypeEncoding(method));
#endif
}
+ (IMP)replaceClassMethod: (SEL)selector
withMethodFromClass: (Class)class;
{
IMP newImp;
if (![class isSubclassOfClass: self])
@throw [OFInvalidArgumentException newWithClass: self
selector: _cmd];
|
|
|
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
*/
return class_replaceMethod(((OFObject*)self)->isa, selector, newImp,
method_getTypeEncoding(method));
#endif
}
+ (IMP)replaceClassMethod: (SEL)selector
withMethodFromClass: (Class)class
{
IMP newImp;
if (![class isSubclassOfClass: self])
@throw [OFInvalidArgumentException newWithClass: self
selector: _cmd];
|
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
return class_replaceMethod(self, selector, newImp,
method_getTypeEncoding(method));
#endif
}
+ (IMP)replaceInstanceMethod: (SEL)selector
withMethodFromClass: (Class)class;
{
IMP newImp;
if (![class isSubclassOfClass: self])
@throw [OFInvalidArgumentException newWithClass: self
selector: _cmd];
|
|
|
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
|
return class_replaceMethod(self, selector, newImp,
method_getTypeEncoding(method));
#endif
}
+ (IMP)replaceInstanceMethod: (SEL)selector
withMethodFromClass: (Class)class
{
IMP newImp;
if (![class isSubclassOfClass: self])
@throw [OFInvalidArgumentException newWithClass: self
selector: _cmd];
|
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
if (nItems > SIZE_MAX / size)
@throw [OFOutOfRangeException newWithClass: isa];
return [self resizeMemory: pointer
toSize: nItems * size];
}
- (void)freeMemory: (void*)pointer;
{
void **iter, *last, **memoryChunks;
size_t i, memoryChunksSize;
if (pointer == NULL)
return;
|
|
|
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
if (nItems > SIZE_MAX / size)
@throw [OFOutOfRangeException newWithClass: isa];
return [self resizeMemory: pointer
toSize: nItems * size];
}
- (void)freeMemory: (void*)pointer
{
void **iter, *last, **memoryChunks;
size_t i, memoryChunksSize;
if (pointer == NULL)
return;
|