1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
} @finally {
char **iter;
close(_readPipe[1]);
close(_writePipe[0]);
OFFreeMemory(argv);
for (iter = env; *iter != NULL; iter++)
OFFreeMemory(*iter);
OFFreeMemory(env);
}
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
|
>
|
|
|
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
} @finally {
char **iter;
close(_readPipe[1]);
close(_writePipe[0]);
OFFreeMemory(argv);
if (env != NULL)
for (iter = env; *iter != NULL; iter++)
OFFreeMemory(*iter);
OFFreeMemory(env);
}
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
|
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
if (ret == 0)
_atEndOfStream = true;
return ret;
}
- (size_t)lowlevelWriteBuffer: (const void *)buffer
length: (size_t)length
{
ssize_t bytesWritten;
if (_writePipe[1] == -1)
@throw [OFNotOpenException exceptionWithObject: self];
if (length > SSIZE_MAX)
|
|
<
|
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
if (ret == 0)
_atEndOfStream = true;
return ret;
}
- (size_t)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length
{
ssize_t bytesWritten;
if (_writePipe[1] == -1)
@throw [OFNotOpenException exceptionWithObject: self];
if (length > SSIZE_MAX)
|