ObjFW  Check-in [57b6030b14]

Overview
Comment:Minor improvements, no functional change
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 57b6030b14681908a4eec785e8e3a281e83bc3703fe994ab65c8f9ed244c49fa
User & Date: js on 2015-04-26 08:10:45
Other Links: manifest | tags
Context
2015-04-26
08:54
Small improvements for OFHTTPClient & OFHTTPServer check-in: 0a249f58cf user: js tags: trunk
08:10
Minor improvements, no functional change check-in: 57b6030b14 user: js tags: trunk
2015-04-20
20:54
OFZIPArchive: Don't compare the GPBF check-in: 178b39b840 user: js tags: trunk
Changes

Modified src/OFStream.h from [b3138c427b] to [4c3277f2ac].

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
 * @param target The target on which the selector should be called when the
 *		 data has been received. If the method returns true, it will be
 *		 called again with the same buffer and maximum length when more
 *		 data has been received. If you want the next method in the
 *		 queue to handle the data received next, you need to return
 *		 false from the method.
 * @param selector The selector to call on the target. The signature must be
 *		   `bool (OFStream *stream, void *buffer, size_t size,
 *		   OFException *exception)`.
 */
- (void)asyncReadIntoBuffer: (void*)buffer
		     length: (size_t)length
		     target: (id)target
		   selector: (SEL)selector;








|







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
 * @param target The target on which the selector should be called when the
 *		 data has been received. If the method returns true, it will be
 *		 called again with the same buffer and maximum length when more
 *		 data has been received. If you want the next method in the
 *		 queue to handle the data received next, you need to return
 *		 false from the method.
 * @param selector The selector to call on the target. The signature must be
 *		   `bool (OFStream *stream, void *buffer, size_t length,
 *		   OFException *exception)`.
 */
- (void)asyncReadIntoBuffer: (void*)buffer
		     length: (size_t)length
		     target: (id)target
		   selector: (SEL)selector;

Modified tests/OFKernelEventObserverTests.m from [c4a91b451f] to [664311d3cf].

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	    (expectedObject = sock2) &&
	    R([observer addObjectForReading: sock2]) &&
	    [observer observeForTimeInterval: 0.01] == 1)

	TEST(@"-[observe] keeping event until read",
	    R(readData = true) && [observer observeForTimeInterval: 0.01] == 1)

	TEST(@"-[observer] time out due to no events",
	    R(readData = false) && [observer observeForTimeInterval: 0.01] == 0)

	TEST(@"-[observe] correct number of events", events == 3)

	[pool drain];
}
@end







|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	    (expectedObject = sock2) &&
	    R([observer addObjectForReading: sock2]) &&
	    [observer observeForTimeInterval: 0.01] == 1)

	TEST(@"-[observe] keeping event until read",
	    R(readData = true) && [observer observeForTimeInterval: 0.01] == 1)

	TEST(@"-[observe] time out due to no events",
	    R(readData = false) && [observer observeForTimeInterval: 0.01] == 0)

	TEST(@"-[observe] correct number of events", events == 3)

	[pool drain];
}
@end

Modified utils/ofzip/OFZIP.m from [0de42f7c0b] to [d4981a261c].

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

OF_APPLICATION_DELEGATE(OFZIP)

static void
help(OFStream *stream, bool full, int status)
{
	[stream writeFormat:
	    @"Usage: %@ -[flnqvx] archive.zip [file1 file2 ...]\n",
	    [OFApplication programName]];

	if (full)
		[stream writeString:
		    @"\nOptions:\n"
		    @"    -f  Force / override files\n"
		    @"    -h  Show this help\n"







|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

OF_APPLICATION_DELEGATE(OFZIP)

static void
help(OFStream *stream, bool full, int status)
{
	[stream writeFormat:
	    @"Usage: %@ -[fhlnqvx] archive.zip [file1 file2 ...]\n",
	    [OFApplication programName]];

	if (full)
		[stream writeString:
		    @"\nOptions:\n"
		    @"    -f  Force / override files\n"
		    @"    -h  Show this help\n"