ObjFW  Diff

Differences From Artifact [732a9e097e]:

To Artifact [0c7540771a]:


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	[delegate release];

	return 0;
}

@implementation OFApplication
@synthesize programName = _programName, arguments = _arguments;
@synthesize environment = _environment;

+ (OFApplication *)sharedApplication
{
	return app;
}

+ (OFString *)programName







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	[delegate release];

	return 0;
}

@implementation OFApplication
@synthesize programName = _programName, arguments = _arguments;
@synthesize environment = _environment, activeSandbox = _activeSandbox;

+ (OFApplication *)sharedApplication
{
	return app;
}

+ (OFString *)programName
568
569
570
571
572
573
574

575
576
577
578
579
580
581




582
583
584
585
#ifdef OF_HAVE_SANDBOX
- (void)activateSandbox: (OFSandbox *)sandbox
{
# ifdef OF_HAVE_PLEDGE
	void *pool = objc_autoreleasePoolPush();
	const char *promises = [[sandbox pledgeString]
	    cStringWithEncoding: [OFLocalization encoding]];


	if (pledge(promises, NULL) != 0)
		@throw [OFSandboxActivationFailedException
		    exceptionWithSandbox: sandbox
				   errNo: errno];

	objc_autoreleasePoolPop(pool);




# endif
}
#endif
@end







>







>
>
>
>




568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
#ifdef OF_HAVE_SANDBOX
- (void)activateSandbox: (OFSandbox *)sandbox
{
# ifdef OF_HAVE_PLEDGE
	void *pool = objc_autoreleasePoolPush();
	const char *promises = [[sandbox pledgeString]
	    cStringWithEncoding: [OFLocalization encoding]];
	OFSandbox *oldSandbox;

	if (pledge(promises, NULL) != 0)
		@throw [OFSandboxActivationFailedException
		    exceptionWithSandbox: sandbox
				   errNo: errno];

	objc_autoreleasePoolPop(pool);

	oldSandbox = _activeSandbox;
	_activeSandbox = [sandbox retain];
	[oldSandbox release];
# endif
}
#endif
@end