Skip to content

Commit 862fbde

Browse files
committed
Make symbol visible
1 parent 03310f5 commit 862fbde

File tree

2 files changed

+17
-21
lines changed
  • pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http

2 files changed

+17
-21
lines changed

pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1-
#import "utils.h"
1+
#import <Foundation/NSLock.h>
2+
#import <Foundation/NSURL.h>
3+
#import <Foundation/NSURLSession.h>
4+
#include <stdint.h>
25

3-
_DidFinish adaptFinishWithLock(_DidFinishWithLock block) {
6+
#if !__has_feature(objc_arc)
7+
#error "This file must be compiled with ARC enabled"
8+
#endif
9+
10+
typedef void (^_DidFinish)(void *closure, NSURLSession *session,
11+
NSURLSessionDownloadTask *downloadTask,
12+
NSURL *location);
13+
typedef void (^_DidFinishWithLock)(NSCondition *lock, NSURLSession *session,
14+
NSURLSessionDownloadTask *downloadTask,
15+
NSURL *location);
16+
17+
__attribute__((visibility("default"))) __attribute__((used)) _DidFinish
18+
adaptFinishWithLock(_DidFinishWithLock block) {
419
return ^void(void *closure, NSURLSession *session,
520
NSURLSessionDownloadTask *downloadTask, NSURL *location) {
621
NSCondition *lock = [[NSCondition alloc] init];

0 commit comments

Comments
 (0)