ObjFW  Check-in [75d2dfa322]

Overview
Comment:OFINI*: Add -[description]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 75d2dfa322927eb18799afb5f38387a1119ff213f10d51e20a72c48dddada443
User & Date: js on 2021-03-17 23:22:18
Other Links: manifest | tags
Context
2021-03-21
13:30
Remove Travis support check-in: 4bc6412b3a user: js tags: trunk
2021-03-17
23:22
OFINI*: Add -[description] check-in: 75d2dfa322 user: js tags: trunk
23:14
OFINIFile: Add property containing all categories check-in: deebe3c034 user: js tags: trunk
Changes

Modified src/OFINICategory.m from [af996b6de2] to [3853ee5e40].

92
93
94
95
96
97
98





99
100
101
102
103
104
105
106
107





108
109
110
111
112
113
114
- (void)dealloc
{
	[_key release];
	[_value release];

	[super dealloc];
}





@end

@implementation OFINICategoryComment
- (void)dealloc
{
	[_comment release];

	[super dealloc];
}





@end

@implementation OFINICategory
@synthesize name = _name;

- (instancetype)of_initWithName: (OFString *)name OF_DIRECT
{







>
>
>
>
>









>
>
>
>
>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
- (void)dealloc
{
	[_key release];
	[_value release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"%@ = %@", _key, _value];
}
@end

@implementation OFINICategoryComment
- (void)dealloc
{
	[_comment release];

	[super dealloc];
}

- (OFString *)description
{
	return [[_comment copy] autorelease];
}
@end

@implementation OFINICategory
@synthesize name = _name;

- (instancetype)of_initWithName: (OFString *)name OF_DIRECT
{
482
483
484
485
486
487
488






489
			[stream writeString: tmp encoding: encoding];
		} else
			@throw [OFInvalidArgumentException exception];
	}

	return true;
}






@end







>
>
>
>
>
>

492
493
494
495
496
497
498
499
500
501
502
503
504
505
			[stream writeString: tmp encoding: encoding];
		} else
			@throw [OFInvalidArgumentException exception];
	}

	return true;
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"<%@ \"%@\": %@>",
					   self.class, _name, _lines];
}
@end

Modified src/OFINIFile.m from [3bf40de159] to [2183d90e0a].

169
170
171
172
173
174
175






176
		if ([category of_writeToStream: file
				      encoding: encoding
					 first: first])
			first = false;

	objc_autoreleasePoolPop(pool);
}






@end







>
>
>
>
>
>

169
170
171
172
173
174
175
176
177
178
179
180
181
182
		if ([category of_writeToStream: file
				      encoding: encoding
					 first: first])
			first = false;

	objc_autoreleasePoolPop(pool);
}

- (OFString *)description
{
	return [OFString stringWithFormat: @"<%@: %@>",
					   self.class, _categories];
}
@end