Skip to content

Commit 81d694b

Browse files
committed
Fix compile issue
1 parent a46e09f commit 81d694b

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

Sources/OpenGraph/Attribute/Attribute/Attribute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct Attribute<Value> {
3737
public init<Body: _AttributeBody>(
3838
body: UnsafePointer<Body>,
3939
value: UnsafePointer<Value>?,
40-
flags: Flags = [],
40+
flags: _AttributeType.Flags = [],
4141
update: AttributeUpdateBlock
4242
) {
4343
#if os(WASI)

Sources/OpenGraph/Attribute/Attribute/External.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public struct External<Value> {
1515
extension External: _AttributeBody {
1616
public static var comparisonMode: ComparisonMode { .equatableAlways }
1717

18-
public static var flags: Flags { [] }
18+
public static var flags: _AttributeType.Flags { [] }
1919

2020
public static func _update(_: UnsafeMutableRawPointer, attribute _: AnyAttribute) {}
2121
}

Sources/OpenGraph/Attribute/Body/AttributeBody.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public protocol _AttributeBody {
1212
static var _hasDestroySelf: Bool { get }
1313
static func _updateDefault(_ pointer: UnsafeMutableRawPointer)
1414
static var comparisonMode: ComparisonMode { get }
15-
static var flags: Flags { get }
15+
static var flags: _AttributeType.Flags { get }
1616
}
1717

1818
// MARK: - Protocol Default implementation
@@ -22,7 +22,7 @@ extension _AttributeBody {
2222
public static var _hasDestroySelf: Bool { false }
2323
public static func _updateDefault(_ pointer: UnsafeMutableRawPointer) {}
2424
public static var comparisonMode: ComparisonMode { .equatableUnlessPOD }
25-
public static var flags: Flags { .mainThread }
25+
public static var flags: _AttributeType.Flags { .mainThread }
2626
}
2727

2828
extension _AttributeBody {

Sources/OpenGraph/Attribute/Rule/Focus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct Focus<Root, Value>: Rule, CustomStringConvertible {
1717

1818
public var value: Value { root.value[keyPath: keyPath] }
1919

20-
public static var flags: Flags { [] }
20+
public static var flags: _AttributeType.Flags { [] }
2121

2222
public var description: String { "\(Metadata(Value.self).description)" }
2323
}

Sources/OpenGraph/Attribute/Rule/Map.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct Map<Source, Value>: Rule, CustomStringConvertible {
1919

2020
public var value: Value { body(arg.value) }
2121

22-
public static var flags: Flags { [] }
22+
public static var flags: _AttributeType.Flags { [] }
2323

2424
public var description: String { "λ \(Value.self)" }
2525
}

Sources/OpenGraph/Graph/Graph.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extension Graph {
1212
ctx: GraphContext,
1313
body: _AttributeBody.Type,
1414
valueType: Metadata,
15-
flags: Flags,
15+
flags: _AttributeType.Flags,
1616
update: AttributeUpdateBlock
1717
) -> Int {
1818
// TODO: __AGGraphInternAttributeType

Sources/OpenGraphCxx/include/OpenGraph/OGAttributeType.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ OG_ASSUME_NONNULL_BEGIN
1414

1515
typedef struct OGAttributeType OGAttributeType;
1616

17-
typedef struct OGAttributeVTable {
17+
typedef struct OG_SWIFT_NAME(_AttributeVTable) OGAttributeVTable {
1818
unsigned long version;
1919
void (*_Nullable type_destroy)(OGAttributeType *);
2020
void (*_Nullable self_destroy)(const OGAttributeType *, void *);
2121
CFStringRef _Nullable (*_Nullable self_description)(const OGAttributeType *, const void *);
2222
CFStringRef _Nullable (*_Nullable value_description)(const OGAttributeType *, const void *);
2323
void (*_Nullable update_default)(const OGAttributeType *, void *);
24-
} OGAttributeVTable OG_SWIFT_NAME(_AttributeVTable);
24+
} OGAttributeVTable;
2525

26-
typedef struct OGAttributeType {
26+
typedef struct OG_SWIFT_NAME(_AttributeType) OGAttributeType {
2727
OGTypeID self_id;
2828
OGTypeID value_id;
2929
OGClosureStorage update;
@@ -37,7 +37,7 @@ typedef struct OGAttributeType {
3737
OGTypeID type_id;
3838
const void *witness_table;
3939
} body_conformance;
40-
} OGAttributeType OG_SWIFT_NAME(_AttributeType);
40+
} OGAttributeType;
4141

4242
OG_ASSUME_NONNULL_END
4343

Sources/OpenGraphCxx/include/OpenGraph/OGComparison.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ OG_IMPLICIT_BRIDGING_ENABLED
1717

1818
OG_EXTERN_C_BEGIN
1919

20-
typedef struct OGFieldRange {
20+
typedef struct OG_SWIFT_NAME(FieldRange) OGFieldRange {
2121
size_t offset;
2222
size_t size;
23-
} OGFieldRange OG_SWIFT_STRUCT OG_SWIFT_NAME(FieldRange);
23+
} OGFieldRange;
2424

2525
typedef const void *OGComparisonState OG_SWIFT_STRUCT OG_SWIFT_NAME(ComparisonState);
2626

0 commit comments

Comments
 (0)