ObjFW  Diff

Differences From Artifact [487fb8caf6]:

To Artifact [8c09849227]:


552
553
554
555
556
557
558
559

560
561
562

563
564
565
566
567
568
569

570
571
572
573
574
575
576
552
553
554
555
556
557
558

559
560
561

562
563
564
565
566
567
568

569
570
571
572
573
574
575
576







-
+


-
+






-
+







	string = [[OFString alloc] initWithUTF8String: *pointer
					       length: i];
	*pointer += i;

	@try {
		if (hasDecimal)
			number = [OFNumber numberWithDouble:
			    [string doubleValue]];
			    string.doubleValue];
		else if (isHex)
			number = [OFNumber numberWithIntMax:
			    [string hexadecimalValue]];
			    string.hexadecimalValue];
		else if ([string isEqual: @"Infinity"])
			number = [OFNumber numberWithDouble: INFINITY];
		else if ([string isEqual: @"-Infinity"])
			number = [OFNumber numberWithDouble: -INFINITY];
		else
			number = [OFNumber numberWithIntMax:
			    [string decimalValue]];
			    string.decimalValue];
	} @finally {
		[string release];
	}

	return number;
}

646
647
648
649
650
651
652
653
654


655
656
657
658
659
660
661
646
647
648
649
650
651
652


653
654
655
656
657
658
659
660
661







-
-
+
+







{
	return [self JSONValueWithDepthLimit: 32];
}

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

#ifdef __clang_analyzer__
	assert(pointer != NULL);
#endif