ObjFW  Diff

Differences From Artifact [6fb92dcbb6]:

  • File src/OFObject.m — part of check-in [6ce0093f8d] at 2023-04-10 19:22:32 on branch trunk — Remove OFSerialization

    While the idea sounds nice that the tag name is the class, this means the
    serialization includes whether something is mutable or immutable. This means
    doing as much as making something immutable changes the serialization, which
    can then cause issues after being deserialized. (user: js, size: 28645) [annotate] [blame] [check-ins using]

To Artifact [e705635cfb]:


466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
+ (bool)instancesRespondToSelector: (SEL)selector
{
	return class_respondsToSelector(self, selector);
}

+ (bool)conformsToProtocol: (Protocol *)protocol
{
	Class c;

	for (c = self; c != Nil; c = class_getSuperclass(c))
		if (class_conformsToProtocol(c, protocol))
			return true;

	return false;
}

+ (IMP)instanceMethodForSelector: (SEL)selector
{







<
|
<
|







466
467
468
469
470
471
472

473

474
475
476
477
478
479
480
481
+ (bool)instancesRespondToSelector: (SEL)selector
{
	return class_respondsToSelector(self, selector);
}

+ (bool)conformsToProtocol: (Protocol *)protocol
{

	for (Class iter = self; iter != Nil; iter = class_getSuperclass(iter))

		if (class_conformsToProtocol(iter, protocol))
			return true;

	return false;
}

+ (IMP)instanceMethodForSelector: (SEL)selector
{
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
	}

	[self inheritMethodsFromClass: superclass];
}

+ (bool)resolveClassMethod: (SEL)selector
{
	return NO;
}

+ (bool)resolveInstanceMethod: (SEL)selector
{
	return NO;
}

- (instancetype)init
{
	return self;
}








|




|







569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
	}

	[self inheritMethodsFromClass: superclass];
}

+ (bool)resolveClassMethod: (SEL)selector
{
	return false;
}

+ (bool)resolveInstanceMethod: (SEL)selector
{
	return false;
}

- (instancetype)init
{
	return self;
}