ObjFW  Diff

Differences From Artifact [4701092438]:

To Artifact [a914d1de62]:


18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32







-
+








#include <string.h>

#import "OFHTTPRequest.h"
#import "OFString.h"
#import "OFURL.h"
#import "OFDictionary.h"
#import "OFDataArray.h"
#import "OFData.h"
#import "OFArray.h"

#import "OFInvalidFormatException.h"
#import "OFOutOfRangeException.h"
#import "OFUnsupportedVersionException.h"

const char *
238
239
240
241
242
243
244
245
246

247
248


249
250
251
252
253
254
255
256
238
239
240
241
242
243
244

245
246


247
248

249
250
251
252
253
254
255







-

+
-
-
+
+
-







		       encoding: OF_STRING_ENCODING_UTF_8];
}

- (void)setBodyFromString: (OFString *)string
		 encoding: (of_string_encoding_t)encoding
{
	void *pool = objc_autoreleasePoolPush();
	OFDataArray *body = [OFDataArray dataArray];

	[self setBody: [OFData
	[body addItems: [string cStringWithEncoding: encoding]
		 count: [string cStringLengthWithEncoding: encoding]];
	    dataWithItems: [string cStringWithEncoding: encoding]
		    count: [string cStringLengthWithEncoding: encoding]]];
	[self setBody: body];

	objc_autoreleasePoolPop(pool);
}

- (OFString *)description
{
	void *pool = objc_autoreleasePoolPush();