ObjFW  Check-in [205e68365b]

Overview
Comment:Merge trunk into 1.0 branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.0
Files: files | file ages | folders
SHA3-256: 205e68365b87792cd3ce880a95e45294cef3c60dd3ad4f33870712244e78aeed
User & Date: js on 2021-04-08 17:29:09
Other Links: branch diff | manifest | tags
Context
2021-04-25
20:01
Merge trunk into 1.0 branch check-in: b9744f93bf user: js tags: 1.0
2021-04-08
17:29
Merge trunk into 1.0 branch check-in: 205e68365b user: js tags: 1.0
17:27
src/Makefile: Indentation fix check-in: bc662af57b user: js tags: trunk
01:33
Add back OFThreadPool check-in: 116375820d user: js tags: 1.0
Changes

Modified src/OFXMLElement.m from [fe5473696c] to [a994859558].

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

	if (string == nil)
		@throw [OFInvalidArgumentException exception];

	pool = objc_autoreleasePoolPush();

	parser = [OFXMLParser parser];
	builder = [OFXMLElementBuilder elementBuilder];
	delegate = [[[OFXMLElementElementBuilderDelegate alloc] init]
	    autorelease];

	parser.delegate = builder;
	builder.delegate = delegate;

	[parser parseString: string];







|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

	if (string == nil)
		@throw [OFInvalidArgumentException exception];

	pool = objc_autoreleasePoolPush();

	parser = [OFXMLParser parser];
	builder = [OFXMLElementBuilder builder];
	delegate = [[[OFXMLElementElementBuilderDelegate alloc] init]
	    autorelease];

	parser.delegate = builder;
	builder.delegate = delegate;

	[parser parseString: string];
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
	OFXMLElementElementBuilderDelegate *delegate;

	[self release];

	pool = objc_autoreleasePoolPush();

	parser = [OFXMLParser parser];
	builder = [OFXMLElementBuilder elementBuilder];
	delegate = [[[OFXMLElementElementBuilderDelegate alloc] init]
	    autorelease];

	parser.delegate = builder;
	builder.delegate = delegate;

	[parser parseStream: stream];







|







235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
	OFXMLElementElementBuilderDelegate *delegate;

	[self release];

	pool = objc_autoreleasePoolPush();

	parser = [OFXMLParser parser];
	builder = [OFXMLElementBuilder builder];
	delegate = [[[OFXMLElementElementBuilderDelegate alloc] init]
	    autorelease];

	parser.delegate = builder;
	builder.delegate = delegate;

	[parser parseStream: stream];

Modified src/OFXMLElementBuilder.h from [702d1ff1af] to [21b424ead3].

116
117
118
119
120
121
122
123
124
125
126
    id <OFXMLElementBuilderDelegate> delegate;

/**
 * @brief Creates a new element builder.
 *
 * @return A new, autoreleased OFXMLElementBuilder
 */
+ (instancetype)elementBuilder;
@end

OF_ASSUME_NONNULL_END







|



116
117
118
119
120
121
122
123
124
125
126
    id <OFXMLElementBuilderDelegate> delegate;

/**
 * @brief Creates a new element builder.
 *
 * @return A new, autoreleased OFXMLElementBuilder
 */
+ (instancetype)builder;
@end

OF_ASSUME_NONNULL_END

Modified src/OFXMLElementBuilder.m from [fb50bb7b18] to [032a141300].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFArray.h"

#import "OFMalformedXMLException.h"

@implementation OFXMLElementBuilder
@synthesize delegate = _delegate;

+ (instancetype)elementBuilder
{
	return [[[self alloc] init] autorelease];
}

- (instancetype)init
{
	self = [super init];







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#import "OFArray.h"

#import "OFMalformedXMLException.h"

@implementation OFXMLElementBuilder
@synthesize delegate = _delegate;

+ (instancetype)builder
{
	return [[[self alloc] init] autorelease];
}

- (instancetype)init
{
	self = [super init];

Modified tests/OFXMLElementBuilderTests.m from [e70986486c] to [12c66175fb].

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	nodes[i++] = [node retain];
}

- (void)XMLElementBuilderTests
{
	void *pool = objc_autoreleasePoolPush();
	OFXMLParser *p = [OFXMLParser parser];
	OFXMLElementBuilder *builder = [OFXMLElementBuilder elementBuilder];
	OFString *str = @"<foo>bar<![CDATA[f<oo]]>baz<qux/>"
	    " <qux xmlns:qux='urn:qux'><?asd?><qux:bar/><x qux:y='z'/></qux>"
	    "</foo>";

	p.delegate = builder;
	builder.delegate = self;








|







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	nodes[i++] = [node retain];
}

- (void)XMLElementBuilderTests
{
	void *pool = objc_autoreleasePoolPush();
	OFXMLParser *p = [OFXMLParser parser];
	OFXMLElementBuilder *builder = [OFXMLElementBuilder builder];
	OFString *str = @"<foo>bar<![CDATA[f<oo]]>baz<qux/>"
	    " <qux xmlns:qux='urn:qux'><?asd?><qux:bar/><x qux:y='z'/></qux>"
	    "</foo>";

	p.delegate = builder;
	builder.delegate = self;