Differences From Artifact [d5d0a02ee8]:
- File
src/OFObject.m
— part of check-in
[5b37fbeb82]
at
2020-12-20 21:26:08
on branch trunk
— Return error instead of using errno for threading
errno is problematic for Amiga libraries and is also not thread-safe on
some systems, even though it should. (user: js, size: 27721) [annotate] [blame] [check-ins using] [more...]
To Artifact [ab465686e4]:
- File src/OFObject.m — part of check-in [1b82d3bf4f] at 2021-03-07 20:25:21 on branch trunk — *.m: Fold methods into one line where it fits (user: js, size: 27614) [annotate] [blame] [check-ins using] [more...]
1 | /* | < < | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
458 459 460 461 462 463 464 | } + (OFString *)description { return [self className]; } | | < | < | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | } + (OFString *)description { return [self className]; } + (IMP)replaceClassMethod: (SEL)selector withMethodFromClass: (Class)class { IMP method = [class methodForSelector: selector]; if (method == NULL) @throw [OFInvalidArgumentException exception]; return class_replaceMethod(object_getClass(self), selector, method, typeEncodingForSelector(object_getClass(class), selector)); } + (IMP)replaceInstanceMethod: (SEL)selector withMethodFromClass: (Class)class { IMP method = [class instanceMethodForSelector: selector]; if (method == NULL) @throw [OFInvalidArgumentException exception]; return class_replaceMethod(self, selector, method, |
︙ | ︙ | |||
606 607 608 609 610 611 612 | #elif defined(OF_APPLE_RUNTIME) id (*imp)(id, SEL) = (id (*)(id, SEL))objc_msgSend; #endif return imp(self, selector); } | | < | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | #elif defined(OF_APPLE_RUNTIME) id (*imp)(id, SEL) = (id (*)(id, SEL))objc_msgSend; #endif return imp(self, selector); } - (id)performSelector: (SEL)selector withObject: (id)object { #if defined(OF_OBJFW_RUNTIME) id (*imp)(id, SEL, id) = (id (*)(id, SEL, id))objc_msg_lookup(self, selector); #elif defined(OF_APPLE_RUNTIME) id (*imp)(id, SEL, id) = (id (*)(id, SEL, id))objc_msgSend; #endif |
︙ | ︙ | |||
666 667 668 669 670 671 672 | id (*imp)(id, SEL, id, id, id, id) = (id (*)(id, SEL, id, id, id, id))objc_msgSend; #endif return imp(self, selector, object1, object2, object3, object4); } | | < | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | id (*imp)(id, SEL, id, id, id, id) = (id (*)(id, SEL, id, id, id, id))objc_msgSend; #endif return imp(self, selector, object1, object2, object3, object4); } - (void)performSelector: (SEL)selector afterDelay: (of_time_interval_t)delay { void *pool = objc_autoreleasePoolPush(); [OFTimer scheduledTimerWithTimeInterval: delay target: self selector: selector repeats: false]; |
︙ | ︙ |