ObjFW  Diff

Differences From Artifact [5489126d7d]:

To Artifact [4b9a43cc0d]:


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "config.h"

#include <stdlib.h>
#include <string.h>

#include <math.h>

#include <assert.h>

#import "OFString+JSONParsing.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OFNull.h"

#import "OFInvalidJSONException.h"







<
<







16
17
18
19
20
21
22


23
24
25
26
27
28
29
#include "config.h"

#include <stdlib.h>
#include <string.h>

#include <math.h>



#import "OFString+JSONParsing.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFNumber.h"
#import "OFNull.h"

#import "OFInvalidJSONException.h"
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
{
	void *pool = objc_autoreleasePoolPush();
	const char *pointer = self.UTF8String;
	const char *stop = pointer + self.UTF8StringLength;
	id object;
	size_t line = 1;

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

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

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








<
<
<
<







647
648
649
650
651
652
653




654
655
656
657
658
659
660
{
	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, depthLimit);
	skipWhitespacesAndComments(&pointer, stop, &line);

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