ObjFW  Check-in [6083048589]

Overview
Comment:+[addClassMethod:withTypeEncoding:implementation:] to OFObject.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 60830485891ffbdb532e8a40623c3ed3e660ce0f543a64d3a075dbef3ffdd07d
User & Date: js on 2011-07-30 23:14:22
Other Links: manifest | tags
Context
2011-07-30
23:31
More enhancements in +[OFObject inheritMethodsFromClass:]. check-in: 2828853e17 user: js tags: trunk
23:14
+[addClassMethod:withTypeEncoding:implementation:] to OFObject. check-in: 6083048589 user: js tags: trunk
17:43
Fix a typo. check-in: 5613f7fc46 user: js tags: trunk
Changes

Modified src/OFObject.m from [103c38cd6a] to [6537d810e0].

453
454
455
456
457
458
459





460








461
462
463
464
465
466
467

+ (BOOL)addInstanceMethod: (SEL)selector
	 withTypeEncoding: (const char*)typeEncoding
	   implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
	return class_addMethod(self, selector, implementation, typeEncoding);





#elif defined(OF_OLD_GNU_RUNTIME)








	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
#endif
}

+ (void)inheritInstanceMethodsFromClass: (Class)class
{







>
>
>
>
>
|
>
>
>
>
>
>
>
>







453
454
455
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

+ (BOOL)addInstanceMethod: (SEL)selector
	 withTypeEncoding: (const char*)typeEncoding
	   implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
	return class_addMethod(self, selector, implementation, typeEncoding);
#else
	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
#endif
}

+ (BOOL)addClassMethod: (SEL)selector
      withTypeEncoding: (const char*)typeEncoding
	implementation: (IMP)implementation
{
#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME)
	return class_addMethod(((OFObject*)self)->isa, selector, implementation,
	    typeEncoding);
#else
	@throw [OFNotImplementedException newWithClass: self
					      selector: _cmd];
#endif
}

+ (void)inheritInstanceMethodsFromClass: (Class)class
{