Skip to content

Commit ed7195f

Browse files
committed
Update eXtenderZ
1 parent 68c6d78 commit ed7195f

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ let package = Package(
4444
res.append(.package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"))
4545
#endif
4646
if useXtenderZ {
47-
res.append(.package(url: "https://github.com/xcode-actions/eXtenderZ.git", from: "1.0.7"))
47+
res.append(.package(url: "https://github.com/Frizlab/eXtenderZ.git", from: "2.0.0"))
4848
}
4949
return res
5050
}(),

Sources/CNSTaskHelptender/NSTaskHelptender.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ NS_ASSUME_NONNULL_BEGIN
1010
* <https://news.ycombinator.com/item?id=13437182>. */
1111
typedef void SPITaskTerminationSignature(NSTask * _Nonnull);
1212

13-
@protocol SPITaskExtender <HPNExtender>
13+
@protocol SPITaskExtender <XTZExtender>
1414

1515
@property(readonly) SPITaskTerminationSignature ^additionalCompletionHandler;
1616

1717
@end
1818

1919

20-
@interface SPITaskHelptender : NSTask <HPNHelptender>
20+
@interface SPITaskHelptender : NSTask <XTZHelptender>
2121

2222
@end
2323

Sources/CNSTaskHelptender/NSTaskHelptender.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ @implementation SPITaskHelptender
1010

1111
+ (void)load
1212
{
13-
#ifdef HPN_eXtenderZ_STATIC
14-
[HPNCategoriesLoader loadCategories];
13+
#ifdef eXtenderZ_STATIC
14+
[XTZCategoriesLoader loadCategories];
1515
#endif
16-
[self hpn_registerClass:self asHelptenderForProtocol:@protocol(SPITaskExtender)];
16+
[self xtz_registerClass:self asHelptenderForProtocol:@protocol(SPITaskExtender)];
1717
}
1818

19-
+ (void)hpn_helptenderHasBeenAdded:(SPITaskHelptender *)helptender
19+
+ (void)xtz_helptenderHasBeenAdded:(SPITaskHelptender *)helptender
2020
{
2121
[helptender overrideTerminationHandler];
2222
}
2323

24-
+ (void)hpn_helptenderWillBeRemoved:(SPITaskHelptender *)helptender
24+
+ (void)xtz_helptenderWillBeRemoved:(SPITaskHelptender *)helptender
2525
{
2626
[helptender resetTerminationHandler];
2727
}
@@ -45,27 +45,27 @@ - (void)overrideTerminationHandler
4545
{
4646
/* For the fun, below is the declaration without the
4747
* SPITaskTerminationSignature typealias:
48-
* void (^currentTerminationHandler)(NSTask *) = ((void (^(*)(id, SEL))(NSTask *))HPN_HELPTENDER_CALL_SUPER_NO_ARGS_WITH_SEL_NAME(SPITaskHelptender, terminationHandler));
48+
* void (^currentTerminationHandler)(NSTask *) = ((void (^(*)(id, SEL))(NSTask *))XTZ_HELPTENDER_CALL_SUPER_NO_ARGS_WITH_SEL_NAME(SPITaskHelptender, terminationHandler));
4949
*/
50-
SPITaskTerminationSignature ^currentTerminationHandler = ((SPITaskTerminationSignature ^(*)(id, SEL))HPN_HELPTENDER_CALL_SUPER_NO_ARGS_WITH_SEL_NAME(SPITaskHelptender, terminationHandler));
50+
SPITaskTerminationSignature ^currentTerminationHandler = ((SPITaskTerminationSignature ^(*)(id, SEL))XTZ_HELPTENDER_CALL_SUPER_NO_ARGS_WITH_SEL_NAME(SPITaskHelptender, terminationHandler));
5151
[self setPublicTerminationHandler:currentTerminationHandler];
5252

5353
SPITaskTerminationSignature ^newTerminationHandler = ^(NSTask *task) {
5454
/* The assert below is valid, but it retains self, which we do not want. */
5555
// NSCAssert(task == self, @"Weird, got a task in handler which is not self.");
56-
for (id<SPITaskExtender> extender in [task hpn_extendersConformingToProtocol:@protocol(SPITaskExtender)]) {
56+
for (id<SPITaskExtender> extender in [task xtz_extendersConformingToProtocol:@protocol(SPITaskExtender)]) {
5757
SPITaskTerminationSignature ^additionalTerminationHandler = [extender additionalCompletionHandler];
5858
if (additionalTerminationHandler != NULL) additionalTerminationHandler(task);
5959
}
6060
SPITaskTerminationSignature ^terminationHandler = [(SPITaskHelptender *)task publicTerminationHandler];
6161
if (terminationHandler != NULL) terminationHandler(task);
6262
};
63-
((void (*)(id, SEL, SPITaskTerminationSignature ^))HPN_HELPTENDER_CALL_SUPER_WITH_SEL_NAME(SPITaskHelptender, setTerminationHandler:, newTerminationHandler));
63+
((void (*)(id, SEL, SPITaskTerminationSignature ^))XTZ_HELPTENDER_CALL_SUPER_WITH_SEL_NAME(SPITaskHelptender, setTerminationHandler:, newTerminationHandler));
6464
}
6565

6666
- (void)resetTerminationHandler
6767
{
68-
((void (*)(id, SEL, SPITaskTerminationSignature ^))HPN_HELPTENDER_CALL_SUPER_WITH_SEL_NAME(SPITaskHelptender, setTerminationHandler:, self.publicTerminationHandler));
68+
((void (*)(id, SEL, SPITaskTerminationSignature ^))XTZ_HELPTENDER_CALL_SUPER_WITH_SEL_NAME(SPITaskHelptender, setTerminationHandler:, self.publicTerminationHandler));
6969
[self setPublicTerminationHandler:nil];
7070
}
7171

Sources/ProcessInvocation/ProcessInvocation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ public struct ProcessInvocation : AsyncSequence {
674674
g.leave()
675675
}
676676
#if canImport(eXtenderZ)
677-
HPNCheckedAddExtender(p, XcodeToolsProcessExtender(additionalTerminationHandler))
677+
XTZCheckedAddExtender(p, XcodeToolsProcessExtender(additionalTerminationHandler))
678678
#else
679679
p.privateTerminationHandler = additionalTerminationHandler
680680
#endif

0 commit comments

Comments
 (0)