ObjFW  Diff

Differences From Artifact [f9c7af6229]:

To Artifact [2d16a6d32f]:


650
651
652
653
654
655
656

657
658
659
660
661
662
663
664
665
666
667
668
669
670






671
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669


670
671
672
673
674
675
676







+












-
-
+
+
+
+
+
+

- (id)JSONValue
{
	return [self JSONValueWithDepthLimit: 32];
}

- (id)JSONValueWithDepthLimit: (size_t)depthLimit
{
	void *pool = objc_autoreleasePoolPush();
	const char *pointer = [self UTF8String];
	const char *stop = pointer + [self UTF8StringLength];
	id object;
	size_t line = 1;

	object = nextObject(&pointer, stop, &line, 0, depthLimit);
	skipWhitespacesAndComments(&pointer, stop, &line);

	if (pointer < stop || object == nil)
		@throw [OFInvalidJSONException exceptionWithString: self
							      line: line];

	return object;
}
	[object retain];

	objc_autoreleasePoolPop(pool);

	return [object autorelease];
}
@end