Skip to content

Commit e149f91

Browse files
committed
Add IMPLICIT_BRIDGING for autorelease
1 parent b6259dc commit e149f91

File tree

16 files changed

+53
-16
lines changed

16 files changed

+53
-16
lines changed

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/OpenGraph/Runtime/Metadata.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extension Metadata: Swift.Hashable, Swift.CustomStringConvertible {
4040
@inline(__always)
4141
public var description: String {
4242
#if canImport(ObjectiveC)
43-
__OGTypeDescription(self).takeUnretainedValue() as NSString as String
43+
__OGTypeDescription(self) as NSString as String
4444
#else
4545
fatalError("Unimplemented")
4646
#endif

Sources/OpenGraphShims/Graph+Debug.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extension Graph {
1313
guard let description = Graph.description(nil, options: options) else {
1414
return nil
1515
}
16-
guard let dictionary = description.takeUnretainedValue() as? NSDictionary else {
16+
guard let dictionary = description as? NSDictionary else {
1717
return nil
1818
}
1919
return dictionary as? [String: Any]
@@ -30,7 +30,7 @@ extension Graph {
3030
else {
3131
return nil
3232
}
33-
return description.takeUnretainedValue() as? String
33+
return description as? String
3434
}
3535
}
3636

Sources/OpenGraph_SPI/Graph/GraphDescription.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#if OG_OBJC_FOUNDATION
1414
#include <Foundation/Foundation.h>
15-
CFStringRef OGDescriptionFormat = CFSTR("format");
15+
const CFStringRef OGDescriptionFormat = CFSTR("format");
1616

1717
CFTypeRef OG::Graph::description(const Graph * _Nullable graph, NSDictionary* dic) {
1818
// TODO

Sources/OpenGraph_SPI/include/OGComparison.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
OG_ASSUME_NONNULL_BEGIN
3737

38+
OG_IMPLICIT_BRIDGING_ENABLED
39+
3840
OG_EXTERN_C_BEGIN
3941

4042
typedef struct OGFieldRange {
@@ -98,6 +100,8 @@ void OGOverrideComparisonForTypeDescriptor(void *descriptor, OGComparisonMode mo
98100

99101
OG_EXTERN_C_END
100102

103+
OG_IMPLICIT_BRIDGING_DISABLED
104+
101105
OG_ASSUME_NONNULL_END
102106

103107
#endif /* OGComparison_h */

Sources/OpenGraph_SPI/include/OGDebugServer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
OG_ASSUME_NONNULL_BEGIN
1313

14+
OG_IMPLICIT_BRIDGING_ENABLED
15+
1416
typedef struct OGDebugServerStorage OGDebugServerStorage;
1517

1618
typedef const OGDebugServerStorage *OGDebugServer OG_SWIFT_STRUCT;
@@ -28,6 +30,8 @@ OG_EXPORT
2830
void OGDebugServerRun(int timeout) OG_SWIFT_NAME(OGDebugServer.run(timeout:));
2931
OG_EXTERN_C_END
3032

33+
OG_IMPLICIT_BRIDGING_DISABLED
34+
3135
OG_ASSUME_NONNULL_END
3236

3337
#endif

Sources/OpenGraph_SPI/include/OGGraph.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ typedef uint32_t OGAttribute OG_SWIFT_STRUCT OG_SWIFT_NAME(AnyAttribute);
2323

2424
OG_ASSUME_NONNULL_BEGIN
2525

26+
OG_IMPLICIT_BRIDGING_ENABLED
27+
2628
// MARK: - Exported C functions
2729

2830
OG_EXTERN_C_BEGIN
@@ -118,6 +120,8 @@ bool OGGraphAnyInputsChanged(const OGAttribute *inputs, size_t count);
118120

119121
OG_EXTERN_C_END
120122

123+
OG_IMPLICIT_BRIDGING_DISABLED
124+
121125
OG_ASSUME_NONNULL_END
122126

123127
#endif /* OGGraph_h */

Sources/OpenGraph_SPI/include/OGGraphContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
OG_ASSUME_NONNULL_BEGIN
1414

15+
OG_IMPLICIT_BRIDGING_ENABLED
16+
1517
OG_EXTERN_C_BEGIN
1618

1719
OG_EXPORT
@@ -20,6 +22,8 @@ OGGraphRef OGGraphContextGetGraph(OGGraphContextRef context) OG_SWIFT_NAME(gette
2022

2123
OG_EXTERN_C_END
2224

25+
OG_IMPLICIT_BRIDGING_DISABLED
26+
2327
OG_ASSUME_NONNULL_END
2428

2529
#endif /* OGGraphContext_h */

Sources/OpenGraph_SPI/include/OGGraphDescription.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99

1010
OG_ASSUME_NONNULL_BEGIN
1111

12-
#if OG_OBJC_FOUNDATION
12+
OG_IMPLICIT_BRIDGING_ENABLED
13+
1314
OG_EXTERN_C_BEGIN
15+
16+
#if OG_OBJC_FOUNDATION
17+
1418
OG_EXPORT
15-
CFStringRef OGDescriptionFormat OG_SWIFT_NAME(OGGraphRef.descriptionFormat);
16-
OG_EXTERN_C_END
19+
const CFStringRef OGDescriptionFormat OG_SWIFT_NAME(OGGraphRef.descriptionFormat);
20+
1721
#endif
1822

23+
OG_EXTERN_C_END
24+
25+
OG_IMPLICIT_BRIDGING_DISABLED
26+
1927
OG_ASSUME_NONNULL_END
2028

2129
#endif /* OGGraphDescription_h */

Sources/OpenGraph_SPI/include/OGGraphTracing.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ typedef OG_OPTIONS(uint32_t, OGGraphTraceFlags) {
1616

1717
OG_ASSUME_NONNULL_BEGIN
1818

19+
OG_IMPLICIT_BRIDGING_ENABLED
20+
1921
OG_EXTERN_C_BEGIN
2022

2123
OG_EXPORT
@@ -32,6 +34,8 @@ void OGGraphStopTracing(_Nullable OGGraphRef graph) OG_SWIFT_NAME(OGGraphRef.sto
3234

3335
OG_EXTERN_C_END
3436

37+
OG_IMPLICIT_BRIDGING_DISABLED
38+
3539
OG_ASSUME_NONNULL_END
3640

3741
#endif /* OGGraphTracing_hpp */

0 commit comments

Comments
 (0)