ObjFW  Diff

Differences From Artifact [ccf852396a]:

To Artifact [4b7b970c65]:


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@implementation OFXMLElement (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	Class class;
	id object;

	if ((class = objc_getClass([name cStringWithEncoding:
	    OF_STRING_ENCODING_ASCII])) == Nil)
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]];

	if (![class conformsToProtocol: @protocol(OFSerialization)])
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]];







|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@implementation OFXMLElement (Serialization)
- (id)objectByDeserializing
{
	void *pool = objc_autoreleasePoolPush();
	Class class;
	id object;

	if ((class = objc_getClass([_name cStringWithEncoding:
	    OF_STRING_ENCODING_ASCII])) == Nil)
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]];

	if (![class conformsToProtocol: @protocol(OFSerialization)])
		@throw [OFInvalidArgumentException
		    exceptionWithClass: [self class]];